Allow -[RCTDynamicColor effectiveColor] to be called off UI thread

[ ] I am removing an existing difference between facebook/react-native and microsoft/react-native-macos :thumbsup:
[ ] I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos :thumbsup:
[x] I am making a fix / change for the macOS implementation of react-native
[ ] I am making a change required for Microsoft usage of react-native

Summary
Xcode logs warnings to console about the use of the appearance API on a non-UI thread. This fix should allow the current behaviour.
Changelog

[macOS] [Fixed] - Allow -[RCTDynamicColor effectiveColor] to be called off UI thread
Test Plan
Xcode should warn about the use of the appearance API on a non-UI thread.
Microsoft Reviewers: Open in CodeFlow

I'm not sure what the usage would be to call effectiveColor when not on the UI thread. The call site that's trying to do this seems like the issue to be fixed, not RCTDynamicColor.
Dynamic colors by definition don't resolve to a specific color until resolved within a given UI context. So in this case, we're just caching the last context in which this color was resolved and hoping that it stays accurate. That's by no means guaranteed to be true. Different view hierarchies within the same window/application can have different appearances or the user could change the system setting at runtime, so depending on a cached version of the color seems likely to provide invalid colors.

+1 to what @markavitale said. This seems like this would just silence the flaw and make such bugs more difficult to detect

It gets called from ShadowQueue:
* thread #2, queue = 'com.facebook.react.ShadowQueue', stop reason = breakpoint 2.1
    frame #0: 0x000000010012569c RNTester-macOS`-[RCTDynamicColor effectiveColor](self=0x00006000003db520, _cmd="effectiveColor") at RCTDynamicColor.m:75:9
    frame #1: 0x0000000100125828 RNTester-macOS`-[RCTDynamicColor colorSpaceName](self=0x00006000003db520, _cmd="colorSpaceName") at RCTDynamicColor.m:87:1
    frame #2: 0x00007fff358a6f5c AppKit`-[NSColor hash] + 22
    frame #3: 0x00007fff6911ed5c UIFoundation`attributeDictionaryHash + 181
    frame #4: 0x00007fff3a75a7ac Foundation`hashProbe + 68
    frame #5: 0x00007fff3a75a752 Foundation`-[NSConcreteHashTable getItem:] + 35
    frame #6: 0x00007fff6911e8ff UIFoundation`+[NSAttributeDictionary newWithDictionary:] + 115
    frame #7: 0x00007fff3a7c1158 Foundation`-[NSConcreteAttributedString initWithString:attributes:] + 128
    frame #8: 0x0000000100257384 RNTester-macOS`-[RCTBaseTextShadowView attributedTextWithBaseTextAttributes:](self=0x000000010162ab00, _cmd="attributedTextWithBaseTextAttributes:", baseTextAttributes=0x0000000000000000) at RCTBaseTextShadowView.m:100:11
    frame #9: 0x00000001002622d2 RNTester-macOS`-[RCTTextShadowView attributedTextWithMeasuredAttachmentsThatFitSize:](self=0x000000010162ab00, _cmd="attributedTextWithMeasuredAttachmentsThatFitSize:", size=(width = 640, height = 1.7976931348623157E+308)) at RCTTextShadowView.m:184:65
    frame #10: 0x00000001002628fd RNTester-macOS`-[RCTTextShadowView textStorageAndLayoutManagerThatFitsSize:exclusiveOwnership:](self=0x000000010162ab00, _cmd="textStorageAndLayoutManagerThatFitsSize:exclusiveOwnership:", size=(width = 640, height = 1.7976931348623157E+308), exclusiveOwnership=NO) at RCTTextShadowView.m:236:53
  * frame #11: 0x0000000100260929 RNTester-macOS`RCTTextShadowViewMeasure(node=0x000000010162ad10, width=640, widthMode=YGMeasureModeAtMost, height=NaN, heightMode=YGMeasureModeUndefined) at RCTTextShadowView.m:404:5
    frame #12: 0x0000000100387bbf RNTester-macOS`YGNode::measure(this=0x000000010162ad10, width=640, widthMode=YGMeasureModeAtMost, height=NaN, heightMode=YGMeasureModeUndefined, layoutContext=0x0000000000000000) at YGNode.cpp:153:9
    frame #13: 0x00000001003a2fef RNTester-macOS`YGNodeWithMeasureFuncSetMeasuredDimensions(node=0x000000010162ad10, availableWidth=640, availableHeight=NaN, widthMeasureMode=YGMeasureModeAtMost, heightMeasureMode=YGMeasureModeUndefined, ownerWidth=640, ownerHeight=NaN, layoutMarkerData=0x0000700001215e00, layoutContext=0x0000000000000000, reason=kMeasureChild) at Yoga.cpp:1639:39
    frame #14: 0x0000000100397fbf RNTester-macOS`YGNodelayoutImpl(node=0x000000010162ad10, availableWidth=640, availableHeight=NaN, ownerDirection=YGDirectionLTR, widthMeasureMode=YGMeasureModeAtMost, heightMeasureMode=YGMeasureModeUndefined, ownerWidth=640, ownerHeight=NaN, performLayout=false, config=0x0000600000c8d440, layoutMarkerData=0x0000700001215e00, layoutContext=0x0000000000000000, depth=8, generationCount=8, reason=kMeasureChild) at Yoga.cpp:2723:5
    frame #15: 0x000000010039756c RNTester-macOS`YGLayoutNodeInternal(node=0x000000010162ad10, availableWidth=640, availableHeight=NaN, ownerDirection=YGDirectionLTR, widthMeasureMode=YGMeasureModeAtMost, heightMeasureMode=YGMeasureModeUndefined, ownerWidth=640, ownerHeight=NaN, performLayout=false, reason=kMeasureChild, config=0x0000600000c8d440, layoutMarkerData=0x0000700001215e00, layoutContext=0x0000000000000000, depth=8, generationCount=8) at Yoga.cpp:3867:5
    frame #16: 0x00000001003a792e RNTester-macOS`YGNodeComputeFlexBasisForChild(node=0x00000001026086d0, child=0x000000010162ad10, width=640, widthMode=YGMeasureModeExactly, height=NaN, ownerWidth=640, ownerHeight=NaN, heightMode=YGMeasureModeUndefined, direction=YGDirectionLTR, config=0x0000600000c8d440, layoutMarkerData=0x0000700001215e00, layoutContext=0x0000000000000000, depth=7, generationCount=8) at Yoga.cpp:1357:5
    frame #17: 0x00000001003a3bf2 RNTester-macOS`YGNodeComputeFlexBasisForChildren(node=0x00000001026086d0, availableInnerWidth=640, availableInnerHeight=NaN, widthMeasureMode=YGMeasureModeExactly, heightMeasureMode=YGMeasureModeUndefined, direction=YGDirectionLTR, mainAxis=YGFlexDirectionColumn, config=0x0000600000c8d440, performLayout=false, layoutMarkerData=0x0000700001215e00, layoutContext=0x0000000000000000, depth=7, generationCount=8) at Yoga.cpp:1899:7
    frame #18: 0x000000010039861f RNTester-macOS`YGNodelayoutImpl(node=0x00000001026086d0, availableWidth=640, availableHeight=NaN, ownerDirection=YGDirectionLTR, widthMeasureMode=YGMeasureModeExactly, heightMeasureMode=YGMeasureModeUndefined, ownerWidth=640, ownerHeight=NaN, performLayout=false, config=0x0000600000c8d440, layoutMarkerData=0x0000700001215e00, layoutContext=0x0000000000000000, depth=7, generationCount=8, reason=kAbsMeasureChild) at Yoga.cpp:2834:31
    frame #19: 0x000000010039756c RNTester-macOS`YGLayoutNodeInternal(node=0x00000001026086d0, availableWidth=640, availableHeight=NaN, ownerDirection=YGDirectionLTR, widthMeasureMode=YGMeasureModeExactly, heightMeasureMode=YGMeasureModeUndefined, ownerWidth=640, ownerHeight=NaN, performLayout=false, reason=kAbsMeasureChild, config=0x0000600000c8d440, layoutMarkerData=0x0000700001215e00, layoutContext=0x0000000000000000, depth=7, generationCount=8) at Yoga.cpp:3867:5
    frame #20: 0x00000001003a6192 RNTester-macOS`YGNodeAbsoluteLayoutChild(node=0x000000010240ae70, child=0x00000001026086d0, width=640, widthMode=YGMeasureModeExactly, height=40, direction=YGDirectionLTR, config=0x0000600000c8d440, layoutMarkerData=0x0000700001215e00, layoutContext=0x0000000000000000, depth=6, generationCount=8) at Yoga.cpp:1485:5
    frame #21: 0x000000010039b6f6 RNTester-macOS`YGNodelayoutImpl(node=0x000000010240ae70, availableWidth=640, availableHeight=40, ownerDirection=YGDirectionLTR, widthMeasureMode=YGMeasureModeExactly, heightMeasureMode=YGMeasureModeExactly, ownerWidth=640, ownerHeight=40, performLayout=true, config=0x0000600000c8d440, layoutMarkerData=0x0000700001215e00, layoutContext=0x0000000000000000, depth=6, generationCount=8, reason=kStretch) at Yoga.cpp:3474:7
    frame #22: 0x000000010039756c RNTester-macOS`YGLayoutNodeInternal(node=0x000000010240ae70, availableWidth=640, availableHeight=40, ownerDirection=YGDirectionLTR, widthMeasureMode=YGMeasureModeExactly, heightMeasureMode=YGMeasureModeExactly, ownerWidth=640, ownerHeight=40, performLayout=true, reason=kStretch, config=0x0000600000c8d440, layoutMarkerData=0x0000700001215e00, layoutContext=0x0000000000000000, depth=6, generationCount=8) at Yoga.cpp:3867:5
    frame #23: 0x0000000100399776 RNTester-macOS`YGNodelayoutImpl(node=0x00000001017270b0, availableWidth=640, availableHeight=40.5, ownerDirection=YGDirectionLTR, widthMeasureMode=YGMeasureModeExactly, heightMeasureMode=YGMeasureModeExactly, ownerWidth=640, ownerHeight=480, performLayout=true, config=0x0000600000c8d440, layoutMarkerData=0x0000700001215e00, layoutContext=0x0000000000000000, depth=5, generationCount=8, reason=kStretch) at Yoga.cpp:3118:15
    frame #24: 0x000000010039756c RNTester-macOS`YGLayoutNodeInternal(node=0x00000001017270b0, availableWidth=640, availableHeight=40.5, ownerDirection=YGDirectionLTR, widthMeasureMode=YGMeasureModeExactly, heightMeasureMode=YGMeasureModeExactly, ownerWidth=640, ownerHeight=480, performLayout=true, reason=kStretch, config=0x0000600000c8d440, layoutMarkerData=0x0000700001215e00, layoutContext=0x0000000000000000, depth=5, generationCount=8) at Yoga.cpp:3867:5
    frame #25: 0x0000000100399776 RNTester-macOS`YGNodelayoutImpl(node=0x000000010215fb60, availableWidth=640, availableHeight=480, ownerDirection=YGDirectionLTR, widthMeasureMode=YGMeasureModeExactly, heightMeasureMode=YGMeasureModeExactly, ownerWidth=640, ownerHeight=480, performLayout=true, config=0x0000600000c8d440, layoutMarkerData=0x0000700001215e00, layoutContext=0x0000000000000000, depth=4, generationCount=8, reason=kStretch) at Yoga.cpp:3118:15
    frame #26: 0x000000010039756c RNTester-macOS`YGLayoutNodeInternal(node=0x000000010215fb60, availableWidth=640, availableHeight=480, ownerDirection=YGDirectionLTR, widthMeasureMode=YGMeasureModeExactly, heightMeasureMode=YGMeasureModeExactly, ownerWidth=640, ownerHeight=480, performLayout=true, reason=kStretch, config=0x0000600000c8d440, layoutMarkerData=0x0000700001215e00, layoutContext=0x0000000000000000, depth=4, generationCount=8) at Yoga.cpp:3867:5
    frame #27: 0x0000000100399776 RNTester-macOS`YGNodelayoutImpl(node=0x0000000102142680, availableWidth=640, availableHeight=480, ownerDirection=YGDirectionLTR, widthMeasureMode=YGMeasureModeExactly, heightMeasureMode=YGMeasureModeExactly, ownerWidth=640, ownerHeight=480, performLayout=true, config=0x0000600000c8d440, layoutMarkerData=0x0000700001215e00, layoutContext=0x0000000000000000, depth=3, generationCount=8, reason=kStretch) at Yoga.cpp:3118:15
    frame #28: 0x000000010039756c RNTester-macOS`YGLayoutNodeInternal(node=0x0000000102142680, availableWidth=640, availableHeight=480, ownerDirection=YGDirectionLTR, widthMeasureMode=YGMeasureModeExactly, heightMeasureMode=YGMeasureModeExactly, ownerWidth=640, ownerHeight=480, performLayout=true, reason=kStretch, config=0x0000600000c8d440, layoutMarkerData=0x0000700001215e00, layoutContext=0x0000000000000000, depth=3, generationCount=8) at Yoga.cpp:3867:5
    frame #29: 0x0000000100399776 RNTester-macOS`YGNodelayoutImpl(node=0x00000001021466f0, availableWidth=640, availableHeight=480, ownerDirection=YGDirectionLTR, widthMeasureMode=YGMeasureModeExactly, heightMeasureMode=YGMeasureModeExactly, ownerWidth=640, ownerHeight=480, performLayout=true, config=0x0000600000c8d440, layoutMarkerData=0x0000700001215e00, layoutContext=0x0000000000000000, depth=2, generationCount=8, reason=kStretch) at Yoga.cpp:3118:15
    frame #30: 0x000000010039756c RNTester-macOS`YGLayoutNodeInternal(node=0x00000001021466f0, availableWidth=640, availableHeight=480, ownerDirection=YGDirectionLTR, widthMeasureMode=YGMeasureModeExactly, heightMeasureMode=YGMeasureModeExactly, ownerWidth=640, ownerHeight=480, performLayout=true, reason=kStretch, config=0x0000600000c8d440, layoutMarkerData=0x0000700001215e00, layoutContext=0x0000000000000000, depth=2, generationCount=8) at Yoga.cpp:3867:5
    frame #31: 0x0000000100399776 RNTester-macOS`YGNodelayoutImpl(node=0x000000010160d5d0, availableWidth=640, availableHeight=480, ownerDirection=YGDirectionLTR, widthMeasureMode=YGMeasureModeExactly, heightMeasureMode=YGMeasureModeExactly, ownerWidth=640, ownerHeight=480, performLayout=true, config=0x0000600000c8d440, layoutMarkerData=0x0000700001215e00, layoutContext=0x0000000000000000, depth=1, generationCount=8, reason=kInitial) at Yoga.cpp:3118:15
    frame #32: 0x000000010039756c RNTester-macOS`YGLayoutNodeInternal(node=0x000000010160d5d0, availableWidth=640, availableHeight=480, ownerDirection=YGDirectionLTR, widthMeasureMode=YGMeasureModeExactly, heightMeasureMode=YGMeasureModeExactly, ownerWidth=640, ownerHeight=480, performLayout=true, reason=kInitial, config=0x0000600000c8d440, layoutMarkerData=0x0000700001215e00, layoutContext=0x0000000000000000, depth=1, generationCount=8) at Yoga.cpp:3867:5
    frame #33: 0x000000010039be82 RNTester-macOS`::YGNodeCalculateLayoutWithContext(node=0x000000010160d5d0, ownerWidth=640, ownerHeight=480, ownerDirection=YGDirectionLTR, layoutContext=0x0000000000000000) at Yoga.cpp:4123:7
    frame #34: 0x000000010039ceb3 RNTester-macOS`::YGNodeCalculateLayout(node=0x000000010160d5d0, ownerWidth=640, ownerHeight=480, ownerDirection=YGDirectionLTR) at Yoga.cpp:4225:3
    frame #35: 0x0000000100198bfd RNTester-macOS`-[RCTShadowView layoutWithMinimumSize:maximumSize:layoutDirection:layoutContext:](self=0x00000001026041c0, _cmd="layoutWithMinimumSize:maximumSize:layoutDirection:layoutContext:", minimumSize=(width = 0, height = 0), maximumSize=(width = 640, height = 480), layoutDirection=NSUserInterfaceLayoutDirectionLeftToRight, layoutContext=RCTLayoutContext @ 0x0000700001216060) at RCTShadowView.m:285:3
    frame #36: 0x00000001001884f9 RNTester-macOS`-[RCTRootShadowView layoutWithAffectedShadowViews:](self=0x00000001026041c0, _cmd="layoutWithAffectedShadowViews:", affectedShadowViews=0x0000600003307ca0) at RCTRootShadowView.m:34:3
    frame #37: 0x00000001001c299c RNTester-macOS`-[RCTUIManager uiBlockWithLayoutUpdateForRootView:](self=0x0000600002609c20, _cmd="uiBlockWithLayoutUpdateForRootView:", rootShadowView=0x00000001026041c0) at RCTUIManager.m:520:3
    frame #38: 0x00000001001cb81a RNTester-macOS`-[RCTUIManager _layoutAndMount](self=0x0000600002609c20, _cmd="_layoutAndMount") at RCTUIManager.m:1163:22
    frame #39: 0x00000001001cb634 RNTester-macOS`-[RCTUIManager batchDidComplete](self=0x0000600002609c20, _cmd="batchDidComplete") at RCTUIManager.m:1146:3
    frame #40: 0x00000001000f1ed7 RNTester-macOS`__32-[RCTCxxBridge batchDidComplete]_block_invoke(.block_descriptor=0x0000600000cf98c0) at RCTCxxBridge.mm:1380:9
    frame #41: 0x00000001014a9844 libdispatch.dylib`_dispatch_call_block_and_release + 12
    frame #42: 0x00000001014aa826 libdispatch.dylib`_dispatch_client_callout + 8
    frame #43: 0x00000001014b1dd7 libdispatch.dylib`_dispatch_lane_serial_drain + 777
    frame #44: 0x00000001014b2b90 libdispatch.dylib`_dispatch_lane_invoke + 438
    frame #45: 0x00000001014bffe0 libdispatch.dylib`_dispatch_workloop_worker_thread + 691
    frame #46: 0x0000000101538361 libsystem_pthread.dylib`_pthread_wqthread + 290
    frame #47: 0x000000010153749b libsystem_pthread.dylib`start_wqthread + 15

@tido64 so then the real bug would be the shadow view should not be dealing with color attributes at all since that doesn't affect sizing?

@tido64 so then the real bug would be the shadow view should not be dealing with color attributes at all since that doesn't affect sizing?

You're right. It seems that we only need colorSpaceName here. I don't know if _aquaColor and _darkAquaColor can have different values for colorSpaceName so I kept _effectiveColor. Let me know if we should just cache colorSpaceName instead.

@tido64 can we go one more level up? RCTDynamicColor should be able to be completely unaware of other threads. RCTBaseTextShadowView is the one that is asking for it on a background thread and that's what we should fix

RCTBaseTextShadowView is simply creating an NSAttributedString here:
Libraries/Text/BaseText/RCTBaseTextShadowView.m:100
      if (text) {
        NSAttributedString *rawTextAttributedString =
          [[NSAttributedString alloc] initWithString:[textAttributes applyTextAttributesToText:text]
                                          attributes:textAttributes.effectiveTextAttributes];
        [attributedText appendAttributedString:rawTextAttributedString];
      }

This piece of code works fine with any NSColor value. I think the correct thing to do here is to make RCTDynamicColor behave more like NSColor. I don't know this code base very well but as far as I can tell, we would have to rewrite RCTTextShadowViewMeasure to not create NSAttributedStrings and instead use CoreText directly to measure text.

@tido64 or just not include color attributes? We still should not be referring to NSColors on background threads even if that currently happens to not throw an error of some sort.

The [RCTDynamicColor effectiveColor] method is being called because [NSColor colorSpaceName] is used in NSColor's NSObject hash function.   And the hash is being called because NSAttributedString's implementation uses hashes for its attribute dictionary.
A simple fix is to override hash in RCTDynamicColor.   I tried it and it works:
- (NSUInteger)hash {
  NSUInteger prime = 31, result = 1;
  result = prime * result + [_aquaColor hash];
  result = prime * result + [_darkAquaColor hash];
  return result;
}

When overriding hash we should also override isEqual:, like:
- (BOOL)isEqual:(id)other {
    if (other == self)
      return YES;
    if (!other || ![other isKindOfClass:[self class]])
      return NO;
    return [self isEqualToDynamicColor:other];
}

- (BOOL)isEqualToDynamicColor:(RCTDynamicColor *)other {
    if (self == other)
      return YES;
    if ([_aquaColor isNotEqualTo:other->_aquaColor])
      return NO;
    if ([_darkAquaColor isNotEqualTo:other->_darkAquaColor])
      return NO;
    return YES;
}

Long term react-native layout should be manipulating the NSAttributedStrings and NSColor/UIColors only on the main thread, but such a change is way out of scope of this fix.   But such a think can and probably is being done as part of the Fabric rearchitecture.

A simple fix is to override hash in RCTDynamicColor. I tried it and it works:

Thanks, @tom-un. Your solution does work.


feat: tiny-react event module, imitate vue event system

PR
PR Checklist
Please check if your PR fulfills the following requirements:

[x] The commit message follows our Commit Message Guidelines
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

PR Type
What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?
Currently, in the Vue version of the component, Vue's own event system is used. You can register events on the component by using the "on," "emit," "once," and "off" methods on the component instance.
What is the new behavior?
In React, the current approach to emitting events is by adding methods named in the form of "onClick" to the props to listen for events.
The emit method can check if the event exists in the props, retrieve it, and execute the corresponding event listener.
However, the "on" method cannot be modified through props. Therefore, event listeners must be placed in a specific location, and these event listeners can be accessed through the component. Therefore, you can use a map to associate event listeners with components, and later, "once" and "off" can be implemented based on the event bus and map.
Does this PR introduce a breaking change?

[X] Yes
[ ] No

Other information
PR中文描述
PR清单
请检查您的 PR 是否满足以下要求：

[x] 提交消息遵循我们的提交消息指南
[ ] 添加了对更改的测试（用于错误修复/功能）
[ ] 文档已添加/更新（用于错误修复/功能）

pr类型
这个 PR 带来了什么样的改变？

[ ] 错误修正
[X] 特征
[ ] 代码风格更新（格式、局部变量）
[ ] 重构（无功能更改，无 api 更改）
[ ] 构建相关变更
[ ] CI 相关变更
[ ] 文档内容变更
[ ] 其他...请描述：

行为
目前 vue 版的组件用的是 vue 自身的事件系统，可以通过组件实例上的 on、emit、once、off 方法去组件身上注册事件。
而react 当前的 emit 是通过 props 里添加 onClick 这种形式命名的方法去监听事件。
emit 方法就可通过判断 props 里是否有该事件，去拿到并执行该事件监听函数。
然而，on 方法是不能通过在props 里做修改的，所以 on 必须得将事件监听放在一个地方，而且这个事件监听是可以通过该组件去获取的，那么就可以通过 map 将事件监听和组件对应上，后面的 once 和 off 都可以基于事件总线和 map 去实现。
此 PR 是否引入了重大更改？

[x] 是的
[ ] 不

API

emit

(props) => (evName: string)

on

(props) => (evName: string, evHandler: Function)

once

(props) => (evName: string, evHandler: Function)

off

(props) => (evName: string, evHandler: Function)

example
function App(props) {

  const event = {
    emit: emit(props),
    on: on(props),
    once: once(props),
    off: off(props)
  }

  useEffect(() => {
    event.emit('mounted') // actually emit onMounted event handler
  }, [])

  const eat = () => console.log('eat');

  useEffect(() => {
    event.on('eat', eat);
  })

  const eatOnce = () => {
    emit('eat')
    off('eat', eat)
  };

  return (
吃
)
}

emitEvent

(vm) => {
  dispatch(componentName: string, eventName: string, ...args),
  broadcast(componentName: string, eventName: string, ...args)
}

dispatch: emit events on parent
broadcast: emit events on children

@pe-3 不要混入了其他人的代码


Add cleanup step

The Timer's callback function could be rewritten so that anything printed is eventually cleaned up.

Amazingly helpful: https://discourse.julialang.org/t/how-to-close-a-remote-timer/53295/2
Also, I realized I hadn't actually been using Distributed or interactive threadpools.


Special handling of last signature in a block

Pull Request Description
Fixes #7841 by handling the last signature in a block in a special way.
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:

[x] All code follows the
Scala,
Java,
[x] Unit tests have been written where possible.

The value of this PR is mostly in the new test. The fix itself is straightforward. @kazcw expressed a wish to fix this directly in the Rust parser. However I don't feel qualified to fix the problem that way.


Exception from UserController

I have a clean grails 2.2 app with a few domain classes, and after adding the security UI plugin I'm getting the following exception when accessing /user.
| Error 2013-02-10 20:00:50,400 [http-bio-8080-exec-5] ERROR [/].[default]  - Servlet.service() for servlet [default] in context with path [] threw exception [org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grails.plugins.springsecurity.ui.UserController': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [grails.plugins.springsecurity.ui.UserController]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityUiService': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: net/sf/cglib/core/DebuggingClassWriter] with root cause
Message: net.sf.cglib.core.DebuggingClassWriter
Line | Method
->> 202 | run              in java.net.URLClassLoader$1

|   190 | findClass        in java.net.URLClassLoader
|   306 | loadClass . . .  in java.lang.ClassLoader
|   247 | loadClass        in     ''
|    30 | getClassWriter . in net.sf.cglib.core.DefaultGeneratorStrategy
|    24 | generate         in     ''
|   216 | create . . . . . in net.sf.cglib.core.AbstractClassGenerator
|   144 | create           in net.sf.cglib.core.KeyFactory$Generator
|   116 | create . . . . . in net.sf.cglib.core.KeyFactory
|   108 | create           in     ''
|   104 | create . . . . . in     ''
|   196 | getBean          in grails.plugin.cache.web.filter.AbstractFilter
|   842 | lookupController in grails.plugin.cache.web.filter.PageFragmentCachingFilter
|   176 | doFilter         in     ''
|    63 | doFilter . . . . in grails.plugin.cache.web.filter.AbstractFilter
|    80 | doFilterInternal in com.granicus.grails.plugins.cookiesession.CookieSessionFilter
|   886 | runTask . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
|   908 | run              in     ''
^   680 | run . . . . . .  in java.lang.Thread
The full app is available on Git Hub at https://github.com/grails-galahad/webapp/tree/security-ui.

Fixed in 1.0-RC3 and 3.0.0.M1


Adding Kameleoon (Actions) Destination documentation

Proposed changes
I created the doc file for the new Kameleoon (Actions) Destination. This integration is currently in private beta.
Merge timing
ASAP once approved
(We are currently testing the integration with one customer, and we are looking forward to being listed in the Catalog, switch from private beta to beta.)

@tcgilbert do you have the destination id for this?


Export-SPOTaxonomy  and Debugging PNP PowerShell

I have been trying to make the export taxonomy work for me using the following:
Connect-SPOnline -Url https://mydemo1.sharepoint.com -Credentials (Get-Credential)
Export-SPOTaxonomy -TermSetId 1e193f11-eb5f-4f76-8747-ddbb8902cd2b -TermStoreName "Site Navigation"
but this keeps resulting in the following error:
Export-SPOTaxonomy : Specified argument was out of the range of valid values.
Parameter name: index
Then when I corrected the term store name:
Export-SPOTaxonomy -TermSetId fd829cd1-8970-448f-9152-93c1fbb5eaf3 -TermStoreName "Taxonomy_hrn/SoS5OfY1gQN3xJiX6g=="
I got
Export-SPOTaxonomy : Cannot invoke method or retrieve property from null object. Object returned by the following call stack
is null. "GetTermSet
GetByName
TermStores
Microsoft.SharePoint.Taxonomy.TaxonomySession.GetTaxonomySession
"
At line:1 char:1

Export-SPOTaxonomy -TermSetId fd829cd1-8970-448f-9152-93c1fbb5eaf3 -TermStoreNam ...

  + CategoryInfo          : WriteError: (:) [Export-SPOTaxonomy], ServerException
  + FullyQualifiedErrorId : EXCEPTION,OfficeDevPnP.PowerShell.Commands.ExportTaxonomy

Then when I corrected the guid to point to a termset it all worked and I got my export:
Export-SPOTaxonomy -TermSetId dda17137-1adf-43e4-bf3b-ce7be1fc943e -TermStoreName "Taxonomy_hrn/SoS5OfY1gQN3xJiX6g=="
Then now my issue:
Is there a way to debug these commands in Visual studio stepping through will help me understand what each command expects. I've tried setting break points and attaching to the PowerShell commands but this doesn't seem to be working. I've tried both Visual Studio 2013 and 2015.

There is absolutely a way to debug them. Open the solution in Visual Studio, build the project and make sure that you do NOT have the prebuild package installed (e.g. the one that comes as an MSI). The build command (make sure you build in debug mode) will copy the assemblies to a folder called:
c:\users<username>\Documents\WindowsPowerShell\Modules\etc. etc.
That path is added to your PSModulePath environment variable by default and the moment you launch a powershell session it will automatically load the modules available there. Then in Visual Studio attach the debugger to the powershell session you just launched and you should be set. Make sure that if you use the latest version of the powershell cmdlets in Visual Studio you also need a full copy of the core library on your computer (e.g. the source code) as many of the PnP PowerShell cmdlets are simply wrappers around Core library methods, e.g. the work is done in the core library.

Thanks that worked. The solution was installed using the msi. It actually appeared multiple times in the list of installed programs when I used add/remove programs.


Change username to target | Issue #479

Fixes #479
Reviewers Checklist

[ ] Appropriate logging is done.
[ ] Appropriate error responses.
[ ] Handle every possible exception.
[ ] Make sure there is a docstring in the command functions. Hint: Lookout for
botcmd and re_botcmd decorators.
[ ] See that 100% coverage is there.
[ ] See to it that mocking is not done where it is not necessary.

@HarendraSingh22 Follow commit guidelines https://coala.io/commit . Also, your PR should have only 1 commit, you can squash your commits, see http://api.coala.io/en/latest/Developers/Git_Basics.html#squashing-your-commits

Rebase, squash, and edit your commit message and this'll be good to merge!

how do u do this?
Squash: git rebase -i HEAD~2 and change pick to fixup on the second commit.
Change: git commit --amend and change the message.
There's also plenty of guides online on doing all this if you can't figure it out.

I am a newbie. Just realised I could have asked. I was fearing asking such basic stuff

Sending in a new PR

See #497


Implement facility levelling up

Sub-task of #77
Requires the following endpoints:

[x] /fort/levelup_at_once
[x] /fort/levelup_start
[x] /fort/levelup_end
[x] /fort/levelup_cancel

The upgrading info (next facility, rupie cost, mat cost, time) is contained in the FortPlantDetail object in MasterAsset. These endpoints should use that data to update the database accordingly

Closed by #142


Document recommended ulimit/sysctl settings

Many deployments will need to increase the file descriptor limit, and possibly other ulimit settings. This is true of large deployments on linux and even small ones on OSX. We should have a document explaining this along with other recommended system-level settings.
For comparison, https://docs.datastax.com/en/cassandra/2.0/cassandra/install/installRecommendSettings.html

This is more important now that cockroachdb/cockroach#7562 is in. It's now much more likely that the default ulimit is insufficient. We saw this while rolling out this week's beta candidate to the test clusters: they used to run with a limit of 2000 FDs, but that is no longer enough.


Don't fail the test suite when convert-source-map throws an error

Fixes #8966.

Summary
This prevents rare, non-deterministic errors of the following type (further described in #8966):
SyntaxError: Unexpected end of JSON input
        at JSON.parse (<anonymous>)

      at new Converter (../../node_modules/convert-source-map/index.js:50:48)
      at Object.exports.fromComment (../../node_modules/convert-source-map/index.js:106:10)
      at Object.exports.fromSource (../../node_modules/convert-source-map/index.js:116:22)
      at ScriptTransformer.transformSource (../../node_modules/@jest/transform/build/ScriptTransformer.js:468:61)
      at ScriptTransformer._transformAndBuildScript (../../node_modules/@jest/transform/build/ScriptTransformer.js:524:40)
      at ScriptTransformer.transform (../../node_modules/@jest/transform/build/ScriptTransformer.js:568:25)

The change treats cases in which the convertSourceMap.fromSource operation throws an exception as the same as if it had returned a falsy value; the code already handles the latter case.
Test plan
This includes a unit test for ScriptTransformer. The test fails with SyntaxError: Unexpected end of JSON input when run without the new try-catch block; with the new change, the test passes.

Codecov Report

Merging #9058 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #9058      +/-   ##
==========================================
+ Coverage   64.07%   64.07%   +<.01%
==========================================
  Files         277      277
  Lines       11679    11681       +2
  Branches     2863     2863
==========================================
+ Hits         7483     7485       +2
  Misses       3572     3572
  Partials      624      624

Impacted Files
Coverage Δ

packages/jest-transform/src/ScriptTransformer.ts
69.19% <100%> (+0.27%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d74da1a...e18e684. Read the comment docs.

@SimenB how do we get this merged?


move from cluster role to role for accelerator create

closes: https://github.com/opendatahub-io/odh-dashboard/issues/1875
Description

update service account role to allow accelerator migration the correct permissions to create a new accelerator profile. remove cluster role for this
How Has This Been Tested?

open odh on a cluster (not dev mode) (with gpu nodes)
ensure the gpu migration config map is removed, as well as all accelerator profile instances
restart the dashboard pod
ensure that a new accelerator profile was created

Test Impact

n/a hot fix
Request review criteria:

Self checklist (all need to be checked):

[x] The developer has manually tested the changes and verified that the changes work
[x] Commits have been squashed into descriptive, self-contained units of work (e.g. 'WIP' and 'Implements feedback' style messages have been removed)
[x] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
[x] The developer has added tests or explained why testing cannot be added (unit tests & storybook for related changes)

If you have UI changes:

[ ] Included any necessary screenshots or gifs if it was a UI change.
[ ] Included tags to the UX team if it was a UI/UX change (find relevant UX in the SMEs section).

After the PR is posted & before it merges:

[ ] The developer has tested their solution on a cluster by using the image produced by the PR to main

/approve


Please add Portuguese (Portugal) as a language to traanslate

Enter the jw.org url to access this language:
https://www.jw.org/pt-pt/
Please provide translations for the following terms in your language:
Congregation: Congregação
Assignment: Designação
Publisher: Publicador
Meeting: Reunião
Midweek meeting: Reunião de semana
Weekend meeting: Reunião de fim de semana
Circuit overseer: Superintendente de Circuito
Student (of a meeting): Estudante (de uma reunião)
Assistant (of a student): Ajudante (de um estudante)
Elder: Ancião
Ministerial servant: Servo Ministerial
Ministry: Ministério
Service: Serviço
Report: Relatório
Meeting Schedule: Programação das Reuniões
Schedule: Programação
Pioneer application: Petição de pioneiro
Auxiliary pioneer: Pioneiro Auxiliar
Regular pioneer: Pioneiro Regular
Speaker: Orador
Talk: Discurso
Memorial: Memorial
Chairman: Presidente
Prayer: Oração
Reader: Leitor
Meeting workbook:  Manual de Actividades
Governing Body Update (video): Actualização do Corpo Governante (video)
Organizational Accomplishments (video): Realizações da Organização (video)
Branch office: Filial
Bethel: Betel
Territory: Território
Do you feel fluent to be a proofreader of the language? If yes, please provide your Crowdin username:
verdura

Hello @verdura! Is this the correct version of Portuguese? We've already started translating to it, so we could add you as a proofreader to enable you reviewing the translations as well as suggesting new ones.

Yep! It is... My mistake!
You can add me if you want...

Great. I've sent you an invitation to join the Crowdin project


Other people dynamic list

JIRA link (if applicable)
https://tools.hmcts.net/jira/browse/PRL-1776
Change description
Other people dynamic list
Does this PR introduce a breaking change? (check one with "x")
[ ] Yes
[x] No

This implementation will be replaced by Dynamic multi select implementation from XUI


Add ability to take a screenshot when exception in UITests is throw

Huh failing probably due to https://github.com/VirtusLab/git-machete-intellij-plugin/pull/926 ... leaving in @mkondratek's hands to fix; we might consider reverting PR #926 if the problem persists ☹


Passing crossorigin attribute as props

Hi,
the use of crossorigin=anonymous is not a good default for our use case, as we require credentials to retrieve the images.
Thanks

Thanks @littleiffel

Thanks this is now in 1.0.2


fix: fix min/max value map to color

Checklist

[ x] npm test passes
[x ] tests and/or benchmarks are included
[x ] commit message follows commit guidelines

Description of change

https://github.com/antvis/G2/issues/2440


Docker image not working for me :/

Hi,
So im trying to set this up to play around with before I take it to use at an event but this is all I get at startup of the docker.
And it doesnt cache anything, Could you tel me where im an going wrong?
This is a fresh install of ubuntu 16.04 with all updates done.

There's two parts to running the cache. The first is the cache which you've ran here. The second part is you need to override DNS to make clients use the cache.
https://github.com/steamcache/steamcache#quick-explaination
There is another docker image that will do this for you, the details are here:
https://github.com/steamcache/steamcache-dns

I have pfsense dealing with the dns and it shows it going through to the server in nload as i see the request coming in.

its more it freezes up the putty session upon start

You are running the container in the foreground, you want to execute it to run in the background.
Your docker run command should be something like:
docker run -d -v /data/cache:/data/cache --restart=always --name steamcache -p <IP_ADDRESS>:80:80 steamcache/steamcache:latest
You will also want to use -v to mount a storage folder on your host into the /data/cache directory inside the container, otherwise the storage will not be persistent across container restarts.

So its all running and steam downloads through the container but there is nothing in the /data/cache directory and it seems to download from steam each time.

Also cant get the watchdog.sh script to run

Got it all to work thanks for your help guys :)

Ran into this too, and it was apparently a permission issue. It might've been caused by creating the host-side cache directory myself, instead of allowing Docker to create it, but I fixed the directory permissions recursively, and it was smooth sailing after that.


Add Godex to "Where to buy" section.

Hello!
Can you please add Godex to your "Where to buy" list?
https://godex.io
Thanks in advance!

wrong repository, please close this

Can you please tell me which repository I need?

https://github.com/joshuajbouw/joshuajbouw.github.io

Thank You!


KMS - Validate plaintext-parameter for length

Closes #2426

Test was verified against AWS.

Codecov Report

Merging #4441 (a3e674b) into master (a192a42) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #4441   +/-   ##
=======================================
  Coverage   95.13%   95.13%
=======================================
  Files         494      494
  Lines       56120    56122    +2
=======================================
+ Hits        53392    53394    +2
  Misses       2728     2728

Flag
Coverage Δ

servertests
48.57% <50.00%> (+<0.01%)
:arrow_up:

test_responses
32.31% <0.00%> (-0.01%)
:arrow_down:

unittests
95.04% <100.00%> (+<0.01%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

moto/kms/utils.py
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a192a42...a3e674b. Read the comment docs.


Pokename should permit creating a new Rails project with the pokémon name

In the first version of Pokename it just prints the name of a pokémon in the console. It would be nice to have a option to automatically create a new rails project with the chosen name.
Maybe the default behaviour can be generating the rails project and with a flag (e.g. -p) the gem would just print the name in the console.

Check my pull request.


Variational posteriors distribution of latent variable z_k in CLUE

Hi,
I have a question regarding CLUE that I was hoping you could help me with. While reading the paper, I came across equation (6) of CLUE, which suggests that the embedding z_k is sampled from the product of expert. When each expert (cross-encoder) is Gaussian, then the product is also Gaussian, and z_k should be sampled from this product distribution. However, when I reviewed the code, I found that each embedding is generated from a single modality and then combined by average. I'm wondering if I might have missed something or misunderstood CLUE.
I would be grateful if you could offer any hints or suggestions to help me better understand this. Thank you very much for your time and help!

Hi @bestadcarry! You are right. The product-of-expert distribution should actually be sampled from a precision-weighted average Gaussian, instead of a simple average of independent samples. The CLUE code was initially written during the NeurIPS 2021 competition where we used unweighted average as a rough approximation. After the competition however, we did some additional tests with a proper product-of-expert implementation, but did not find much of a difference in terms of integration accuracy, so the public code was not changed. Sorry for the confusion!

Hi @Jeff1995 , sorry for the late reply. Thanks for the explanation! That makes sense.


Baseline Testing: Zero downtime NKG upgrades

Upgrade to new version doesn't interrupt traffic flow through the data plane.

@pleshakov to reveal his prolonged connection magic

Blocked by #542


Account for page scroll

Transform should account for page scroll delta as well. Otherwise on drag scroll the draggabel will become disconnected from the pointer position.

I second this. Maybe also add a ### scrollTarget parameter that defaults to ### document.body .

Any progress on this?


FEATURE: API v2.

can you do a 'git mv' for the bigger file changes?

Replacing with #148 and #149.


[Bug] LA Fixes to port from Java

Just capturing notes, handful of things to fix that we learned about while refactoring Java.

https://github.com/temporalio/sdk-core/issues/446
Local retry threshold tied to WFT timeout - 3x or whatever, for default.
Use retry state so I'm accepting of changes to retry policy or timeout adjustments w/o causing nondeterminism error.
Cancel of LA if WFT already failed for some other reason - don't orphan LAs

A couple of questions:
Why 3x of wft timeout?
WDYM by “use retry state”?

See https://github.com/temporalio/sdk-core/issues/436


Inverse kinematic

This is a short video that show IK in action https://youtu.be/hr2x5zWY_AQ
The code should be polished and the main thing to add are the constraints.
The constraints addition is not so important because the algorithm that I've used is FABRIK, and it doesn't need to be constrained to look "reasonably" and this mean that use it will be super easy.
In order to use it you don't need to attach a physical bone to the skeleton. You will need to add it only to apply a constraint (That it's not yer implemented).
How to use it:
To use it the first thing to do is create the IK task using this line of code:
var goal_transform = Transform()
var right_arm_chain = $Skeleton.create_ik_task("right_arm_bone", "right_hand_bone", goal_transform )

Then in the process function you have to call the function to solve the chain:
func _process(delta):
	$Skeleton.solve_ik_task( right_arm_chain );

Only if the position of task changes update it using:
var goal_transform = Transform()
$Skeleton.set_ik_task_goal(right_arm_chain , goal_transform )

The main idea is that provide an API that allow us to use IK on skeleton, then implement some function (or node I hope) allow the animation player to use this API to dosome more "complex" operations (like animation blending with IK, or IK solving on event emitted, etc..).
What you want to do is not so difficult right now but it's very uncomfortable because you have to take care of all things like event managing manually.
In the video that I've posted you can see that the IK solver is running only when the body is inside the button area, when it go outside the solver stop running. Here I could integrate it with an animation but as I said above I should take care of all event  managing manually.

In Unity, there's SetIKPositionWeight and SetIKRotationWeight pair with which we can specify how much the IK would affect the animation.
If there was such a function in Godot, I thought it could be a lot easier to deal with such problems that I described above.
For instance, I might add an additional function track in the punching animation which can gradually change the IK weight/influence at the correct moment (i.e. just before the fist hits the target) to achieve the ideal result.
I was wondering if something like this could be implemented with the current binary on/off flag that is included in this PR. And if not, I think it'd be nice to have an API to change IK weight before we can implement more advanced features like the one you described.
Of course, I'm not saying that you should make the change right away, but I just wanted to know if I should open a feature request for it.
The video looks cool, by the way. Can't wait to try it myself :)

The weight essentially is a parameter for blending animation. I'm imagine a scenario where you have an animation tree like this:

For this reason I think that we don't have to manage it inside the IK sover, in this way we can take the two things separated and leave to the proper parts makes their job.
I think that manage IK inside the animation tree rather using the code is the best thing to do

That makes sense. Then I'll wait until we overhaul AnimationTreePlayer before 3.1, hopefully with the IK integration feature you suggested. Thanks for the explanation!

@akien-mga Sadly :|  error: delegating constructors are permitted only in C++11
Compilation error fixed
Code polished
Improved functions naming
Improved ik API workflow
(Updated "How it works" on first comment)

About why I do need to keep some bones rigid in IK.
I have skeleton which I use for animation, it contains limbs of 4 bones, so 2 of bones act as one in case of IK (but that is not a case for animation - some poses simply require this to look ok, i.e. twisiting or muscule bulge simulation, small-scale bending). If IK will require all bones to be IKable, I will have to set up fake bones for IK and manually convert rotations to actual bones in frame loop which will eat-up CPU cycles. Swichig meshes/skeletons are also a problem (i.e. I want to use IK to fixup animation, not just posing, so I will need full skeleton for that).

Talk about full skeleton IK is wrong. If you try this pr you will see that you have to create an IK task where you have to set root and tip bones. If the two bones to handle the muscle are outside of this chain its basis will not be touched.
When you create the task the chain is composed only of direct bones, all other appended bones doesn't partecipate to the solving and its basis is not touched

If this is not your case please send me an image that represent your skeleton

Well, the chain is constructed of 4 bones, [base]upperleg01.L,
upperleg02.L, [kneel is here] lowerleg01.L, lowerleg02.L[tip]
So in this case we need to implement IK over 2 bones - upperleg01 and
lowerleg01 but we neeed to consider whole chain length.
On Thu, May 10, 2018 at 5:45 PM, Andrea Catania<EMAIL_ADDRESS>wrote:

Talk about full skeleton IK is wrong. If you try this pr you will see that
you have to create an IK task where you have to set root and tip bones. If
the two bones to handle the muscle are outside of this chain its basis will
not be touched.
When you create the task the chain is composed only of direct bones, all
other appended bones doesn't partecipate to the solving and its basis is
not touched
https://camo.githubusercontent.com/ae34e0b237bbe5a14a75894fc1e03644cd9d1452/68747470733a2f2f692e696d6775722e636f6d2f3631764d5852572e706e67
If this is not your case please send me an image that represent your
skeleton
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/pull/18699#issuecomment-388075410,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAX05n-s3FbT-V-hg0MRz7vv1ZRGihjks5txFKYgaJpZM4T1-gF
.

@slapin are you saying the "kneel" is the parent to lowerleg01.L?
I'd imagine upperleg02.L should be a parent to both lowerleg01.L and "kneel"

"Kneel" is not a bone, just the reference to understand the layout
Bones are: upperleg01.L upperleg02.L lowerleg01.L lowerleg02.L
upperleg01 is start of chain
lowerleg02 is end of chain
kneel is between upperleg02 and lowerleg01 which splits the limb into
upper part - upperleg01.L upperleg02.L
lower part - lowerleg01.L lowerleg02.L
each bening as single bone by IK and independently by animation.
On Thu, May 10, 2018 at 7:14 PM, Leonard Meagher<EMAIL_ADDRESS>wrote:

@slapin https://github.com/slapin are you saying the "kneel" is the
parent to lowerleg01.L?
I'd imagine upperleg02.L should be a parent to both lowerleg01.L and
"kneel"
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/pull/18699#issuecomment-388102931,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAX0yVxbTxcVCPBXrVO7c73-DNRoE6Aks5txGdNgaJpZM4T1-gF
.

As discussed with @TwistedTwigleg in godotengine/godot-demo-projects/issues/211 I also tried to impement FABRIK but for 2d IK chains. Is your implementation somehow transferable for 2d skeletons, @AndreaCatania?

Yes it's possible, it's not too difficult take the code that I written and change Vector3 with Vector2 etc.. Feel free to do it if you want

Is this merge-ready or is it on hold like the soft body PR?

It works, but reduz said that I need to add a function to blend with current animation pose. I think that I can do it today. I let you know

I can't do it today I will finish it this weekend sorry

I've implemented the blending functionality and this PR is ready to be merged.
Now is possible to use it with animation player so you can use IK easily with your animations.
Here a video: https://youtu.be/PXhF78c6wRs
and here the project to test it, and see how I've implemented it using animation player:
ik.zip

I've implemented the new node SkeletonIK as @reduz proposed.
Now is possible to set a root and tip bone and a target transform or a spatial node as target directly in the SkeletonIK node.
Then by calling the method start now the IK will be solved automatically and if you set a node as target the IK will follow it.
And also is possible to set the interpolation value, that can be changed at runtime, check this project to test it: ik.zip
Let me know what you think about!

The branch is AndreaCatania:ik

Also did not you consider trivial cases like 2 bones with target node and pole?

What do you mean?

Also as was discussed before, was there any ideas regarding gaps in bone chain (for several bones acting as single bone)?

This is really particular case, and could be addressed later when this PR will be merged. A solution could be trivially use two separate SkeletonIK (chain) but should be tested in order to understand the use case and if the result is correct

I mean 2 bone IK is special case and optimization. You can directly solve 2
bone IK and not run any algorithms like CCD/FABRIK, etc.
No iterations, just the result.
This allows to have complicated IK setups cheaply (and be simple for simple
set ups). I hope this is not too hard to understand.
The generic IK case it too slow for real practical (runtime) use,
especially for complex scenes. Most of practical set ups for aim (arms) and
uneven ground (feet) use 2 bone IK.
On Sun, Jun 17, 2018 at 6:40 PM, Andrea Catania<EMAIL_ADDRESS>wrote:

I still don't understand correctly your concerns, anyway the IK chain can
be maded by 1 to infinite bones, and both the root and tip of chain can be
any bones
So if you have for example a leg with a feet you can create the chain that
start from the leg to the shin (2 bones). After solving the chain, the feet
will be correctly placed according to the shin transform.
The target that you set will affect the tip bone that in this case is the
shin and also the feet because the basis where the feet is attached change.
Sorry if I didn't understand what you said and my response is wrong but in
this moment I can achieve the same behavior that I saw on the video without
any problem and easily
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/pull/18699#issuecomment-397887144,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAX090HF5rPCFAZRV-IiiWD9LeFsomSks5t9nh9gaJpZM4T1-gF
.

If you look up the law of cosines, it can solve 2 bone ik pretty easily

Oh, you was talking about optimization... Now I see what you are talking about... Anyway I will see if it worth implement it because FABRIK is not so heavy algorithm expecially in case you have just two bones.
Do you have a prove of its bad performance insue that I can check?

I'm on Andrea on this one, I don't think this is a case worth optimizing.
On Sun, Jun 17, 2018 at 4:58 PM Andrea Catania<EMAIL_ADDRESS>wrote:

Oh, you was talking about optimization... Now I see what you are talking
about... Anyway I will see if it worth implement it because FABRIK is not
so heavy algorithm expecially in case you have just two bones.
Do you have a prove of its bad performance insue that I can check?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/pull/18699#issuecomment-397902425,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z2yIhlKKSygTpvFTG2GKEm9xmqaysks5t9rTqgaJpZM4T1-gF
.

Well, what is bad and good is basically a comparison. My target is 200
characters per scene.
I did not try your implementation, but with some other implementations I
find that I can have
5 characters per scene with CCD and 20 with FABRIK (minus heavy animation
stuff which sucks).
With 2-bone IK I can have 200 characters on the same hardware (running
animation).
Of cource LODs and animation lods and manual LODs are utilized at the same
extent on all the scenes.
On Sun, Jun 17, 2018 at 10:58 PM, Andrea Catania<EMAIL_ADDRESS>wrote:

Oh, you was talking about optimization... Now I see what you are talking
about... Anyway I will see if it worth implement it because FABRIK is not
so heavy algorithm expecially in case you have just two bones.
Do you have a prove of its bad performance insue that I can check?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/pull/18699#issuecomment-397902425,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAX05NqyoSs3x6fTdAUmfrEAeXVNXV7ks5t9rT4gaJpZM4T1-gF
.

with FABRIK you will need a few iterations in best case, while with 2-bone
IK you will
give direct single answer without iterations (and that is 5 lines of code).
On Mon, Jun 18, 2018 at 2:36 AM, Sergey Lapin<EMAIL_ADDRESS>wrote:

Well, what is bad and good is basically a comparison. My target is 200
characters per scene.
I did not try your implementation, but with some other implementations I
find that I can have
5 characters per scene with CCD and 20 with FABRIK (minus heavy animation
stuff which sucks).
With 2-bone IK I can have 200 characters on the same hardware (running
animation).
Of cource LODs and animation lods and manual LODs are utilized at the same
extent on all the scenes.
On Sun, Jun 17, 2018 at 10:58 PM, Andrea Catania<EMAIL_ADDRESS>
wrote:

Oh, you was talking about optimization... Now I see what you are talking
about... Anyway I will see if it worth implement it because FABRIK is not
so heavy algorithm expecially in case you have just two bones.
Do you have a prove of its bad performance insue that I can check?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/pull/18699#issuecomment-397902425,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAX05NqyoSs3x6fTdAUmfrEAeXVNXV7ks5t9rT4gaJpZM4T1-gF
.

In case of 200 characters I think that for 90% of these you don't need IK at all, anyway I will add some functions in order to expose max iterations and bias so you can control how precision should be.
Also is interesting for me test this scene with 200 character to see what we are talking about

For me the most common scenario where I need IK + 200 people is
like
https://www.pixoto.com/images-photography/people/street-and-candids/crowded-spanish-steps-in-rome-5019323078279168
where errors
in feet motion are visible and at the same time you don't want to make it
fixed - that will be easily noticed as repeatitive, so procedural
animation is required.
As Ubisoft can do this I think Godot should too...
https://www.youtube.com/watch?v=kOv5ixy7Y8w
Anyway ease of LOD usage with IK and animations should be required to do
true massive crowds like in Ubisoft games.
(they also replace distant characters with much simpler meshes with much
simpler skeletons, but that is another story).
On Mon, Jun 18, 2018 at 9:01 AM, Andrea Catania<EMAIL_ADDRESS>wrote:

In case of 200 characters I think that for 90% of these you don't need IK
at all, anyway I will add some functions in order to expose max iterations
and bias so you can control how precision should be.
Also is interesting for me test this scene with 200 character to see what
we are talking about
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/pull/18699#issuecomment-397949974,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAX03ozYvBH-62ZiP0n_H8xQfpCbb4wks5t90IlgaJpZM4T1-gF
.

In this picture the error on the feet are visible only on the first line of people sitdown on the wall, and for all others you don't need the IK to fix it.
The same rule goes with Ubisoft video, do you think that all people that are so faraway that seems just a texture have the IK active? I don't think so... you need a perfect IK only for nearest person and should be activated only when required so when a person is out of focus but still near and visible you need to solve IK with just a good precision, but for all other you don't need to solve..
Also when you resolve the IK one time you don't need to re solve it again if you don't move the bones.
Anyway I think that for talk about what we have to change to optimize we first need a scene that runs at low FPS to check it... because in this moment we are talk about a real picture and what you could need to make it in godot

The IK had the problem that when you wanted to make it works with the animation player, the animation player override the bone poistion if executed after IK solver.
In order to make it works correctly I've moved the execution code from process_internal to process, so I'm always sure that the IK solver is processed always after all animation players.
This doesn't make any differences on Editor side and is always possible to override the _process function by a script.

@andreacatania are you happy with the current state of this PR? I think it should be merged if you are happy.

No is required to make a little change that can't be done without merging
this pr : #19888
On Sat, Jul 14, 2018, 13:29 Hein-Pieter van Braam<EMAIL_ADDRESS>wrote:

@AndreaCatania https://github.com/AndreaCatania are you happy with the
current state of this PR? I think it should be merged if you are happy.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/pull/18699#issuecomment-405017097,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH9MR6w_onNbHZvPX5rURJFB281J0Ze5ks5uGdYDgaJpZM4T1-gF
.

I mentioned this before in a private discussion, but I'll leave it here so others can see it too.
I tested this PR, and while it works really well, the interface and way to use it is quite different than in pretty much all other software that let's the user use IK.
With this PR, a target transform is applied to the bone on the tip of the chain, then the rest of the chain "follows". That means that the rotation of the target has to match the one of the desired pose.
This is a lot harder to get right.
The usual approach is to have a target (that only contributes position by default, rotation opt-in) and a pole that dictates how the chain will bend.
From what I have seen, there is an official IK demo that adds a "middle bone helper" (so a pole basically) on top of the FABRIK algorithm.
https://github.com/godotengine/godot-demo-projects/blob/c6b481aaf0cfb677b182b0e3711702c15b0cb413/3d/ik/addons/sade/ik_fabrik.gd
Maybe this PR can be modified so it supports the more "standard" target+pole workflow.

@reduz  I've a problem with process_internal priority.
The execution order seems random, (or better seems related to the area of last mouse click), when I start the animation and IK in the editor the IK sometimes is processed before the animation player and sometimes later...
Even if the priority of AnimatorPlayer is 0 and should be executed before SkeletonIK that has the priority 1.
check video: https://www.youtube.com/watch?v=yBliluCY6M0
Ther's something other that I need to address to properly implement the priority?

Needs a rebase to fix conflicts in skeleton.cpp.

Rebased


The problem of optical flow prediction

I predicted the optical flow very well at a resolution of 960x520, but the prediction effect was very poor at a resolution of 1920x1080. Do you have any solutions。
Thanks

This could be expected since the model is only trained with low-resolution inputs. One workaround is to do the inference at resized low resolution images and finally resize the predicted flow to the original resolution.


[PORT] Updates to AdaptiveDialog to support schema and ambiguity (aka forms and generation scenarios)

Port this change from botbuilder-dotnet/master branch:
https://github.com/microsoft/botbuilder-dotnet/pull/2936

This contains some improvements to the core mechanisms as well as support for dialog schema and identifying and surfacing entity ambiguity in support of generated dialogs.
Core

Added new status of CompleteAndWait which tells a parent dialog that the dialog finished, but the parent should wait for user input.  This is used by the new Ask prompt to defer to a parent dialog to allow utterances beyond what the ask is asking for.
Refactored the path parsing in ObjectPath to be more robust and support tracking.

Adaptive

Added EndOfActions event so that multiple rules can run when plan is finished.
Added entity processing to identify and track ambiguity together with new events for ask, clear, set, clarify entity, choose entity to property mapping.
Manage entity ambiguity queues and emit events.
Added the ability to track path changes in order to support trigger handlers running once per unique values.
Added support in LUISRecognizer for the V3 options and connected it to V3.
SendActivity will swallow empty activities.  This is in order to allow LG to generate empty activities if appropriate.
Added new Ask prompt which supports expectedProperties, retries and defers to parent for recognition.

Schema

Added schema property to adaptive dialog.
JSON Schema definition that can be put in a .dialog resource and is available at runtime.
Extension of $public to identify the properties that are imported/exported from dialog.
Extension of $mappings to list the entities that can map to a property.

Properties

dialog.eventCounter -- incremented each time an event is emitted.  Used as a timestamp.
dialog.expectedProperties -- list of the properties expected to be filled.
dialog.lastEvent -- last event surfaced by the entity ambiguity events.  This is needed in order to do the book keeping around updating the ambiguity queues.
dialog.requiredProperties -- properties that are required to be filled.  Initially comes from schema, but can be manipulated by actions.
dialog.retries -- the number of retries where an ask with the same expectedProperties and trigger is re-executed.
dialog.lastIntent -- the last top intent.  This is to help prevent surfacing the same information like help multiple times.
dialog.lastTriggerEvent -- the last event that triggered a response.
dialog._tracker.paths -- paths with . replaced by _ that are being tracked and the event counter when they were last changed.
dialog._tracker.conditions -- indexed by rule id with the collection of paths used and the event counter when the rule last ran.
turn.schema -- contains the current dialog JSON schema definition.
turn.unrecognizedText -- that parts of an utterance that were not part of an entity.
turn.recognizedEntities -- the entities that were assigned to a property.

Expressions and Trigger Tree

Extended indexOf to work over lists as well as strings.
Fixed a bug where trigger tree did not handle ignore properly.
A number of bug fixes.

Triggers & Selectors

Added the ability to pass in the expression parser to selectors.
Changed the Select method to not rely on rule order.
Added runOnce flag which will track the memory references used so that you can run a rule only once for each unique set of values.
Added priority as an expression that is used by first selector.  By default priority is order trigger handlers are defined.

Testing

Added a mocked LUIS recognizer that caches responses that can be checked in.  This supports using actual LUIS models for testing.
Made it so the test script supports parallel execution of different loaded configurations.
Added support for MockLUIS into test scripts.
Tests for the new features including runOnce, priority and generated dialogs.

Fixes #2975

Completed


Redis cluster

Initial push for the redis package.
Currently its failing because of race conditions with the mock package

Would love to see this merged!

@otherview any chance this can be updated?

Hi @SkinyMonkey and @rogeralsing !
I've got a bit of time to work on this and created https://github.com/AsynkronIT/protoactor-go/pull/393 :)
Closing this PR now :)

@otherview Nice! Thank you for checking this :)


Make T-Rays only display subfloor clientside

Description
GOD PLEASE I AM TIRED OF ENGINEERS LEAVING THEM OPEN AND SEEING THE CABLES AND TUBES EVERYONE I'M GOING INSANE
Screenshots

Additional context

HMMMMMMMMMMMMMMMMMMMMMMMMM

Fixed by #14826


Add a loading icon/spinner to the login page

Currently it looks like nothing is happening once you click on the login button

nice!


Match concrete variable name

I'd like to write HLint hints for specific programming exercises.
One case is naming a variable y when it should preferrably be named year.
hint:
  lhs: 'y'
  note: You might as well call the variable 'year'.
  rhs: year

Unfortunately this lhs pattern becomes a catch-all expression rather than the literal variable name y. Is there any way to match the concrete variable name y, and if not, would it be interesting to extend HLint with this capability?

Interesting! Hadn't thought about that before. My current thoughts are to use the side conditions so you could write:
hint:
  lhs: 'y'
  note: You might as well call the variable 'year'.
  rhs: year
  side: is "y" y

That seems about the cleanest I can come up with. Does that seem reasonable? If so, we can add the is "y" bit to side.

If I understand what you're saying correctly, side: conditions are what's described in Hint.Match, and you're proposing that we add another side condition, is "foo" bar that fixes lhs: 'foo' from being a variable pattern to being a concrete variable named bar?
Before I say yes, maybe I should assess whether HLint is really suited to give this type of hints; here are some other hints that I find hard to encode:

rem x y → x `rem` y. The following triggers even though I have written x `rem` y:
- hint:
    lhs: rem x y
    note: You can write 'rem' as an infix operator.
    rhs: x `rem` y

(year `rem` 4) == 0 → year `rem` 4 == 0. I'm not sure why HLint doesn't already catch this.
Backticks have precedence level 7, == has 4.

Then there are hints that altogether don't lend themselves towards HLint's simplicity, such as "you may want to use guards for this function", "you may want to replace calling f directly with a helper function here", "since the other function is camelCased, this one ought to be, too", and "the order of guards is not optimal".
I don't know if it's easier to extend HLint or write something based directly on haskell-src-exts.

You certainly could write your own tool based on haskell-src-exts, but I've just added enough to HLint to catch everything you want given the rules:
- hint: {lhs: "y", rhs: year, side: subst y == y}
- hint: {lhs: rem x y, rhs: x `rem` y, side: original == subst (x `rem` y)}
# alternatively - hint: {lhs: rem x y, rhs: x `rem` y, side: not (isInfixApp original)}
- hint: {lhs: (a `rem` b) == c, rhs: a `rem` b == c, side: subst original == subst ((a `rem` b) == c)}

In particular I added == to the side conditions, and an explicit subst, so you can write whatever test you want.
Note that HLint never assumes fixity when removing brackets because often people put brackets around different fixity stuff for clarity and it doesn't actually know the fixity of everything (sometimes it guesses).
If this does work for you, I'd love to see a blog post or other write up of how you configured HLint to help students. I think it could be the kind of thing that is useful for lots of people.
I haven't made a release yet - but can do so if that helps testing/use.

Thanks a lot for your effort! I'll look at this tomorrow.

The famous "tomorrow". I still have this project on my radar. Since the subject of the issue is "Match concrete variable names" and you showed how I can do this, I'm closing the issue. I will get back to you with a story of how using hlint for exercise-specific hints once I get back to this. Thanks a lot for your help so far!

Perhaps it makes sense to leave this open instead, so that anyone who wants to pick it up can do so.

@masaeedu The questioner wanted to match concrete variable names. HLint added features to do that. I don't think there's anything more for HLint to do (you could argue some docs wouldn't go amiss...)


Uncaught InvalidStateError: Failed to execute 'setSelectionRange' on 'HTMLInputElement': The input element's type ('number') does not support selection.

I double clicked this:
<input name="num" class="box-input" type="number" pattern="[0-9]*" placeholder="">
chrome console:
Uncaught InvalidStateError: Failed to execute 'setSelectionRange' on 'HTMLInputElement': The input element's type ('number') does not support selection.

Q
A

vue version
1.0.26

Hello, there's nothing related to Vue in what we have given 😓
Please follow the Issue Reporting Guidelines and provide a minimal JSFiddle or JSBin containing a set of reproducible steps that can lead to the behaviour you described.

It's strange...


import of files into Operations sometimes fails

After double clicking a filename, the dialog closes, a success message appears, the changed flight plan is displayed in Views, but immediately jumps back to the old one.

this problem happens also with the new file and import dialog.

often after the single or double click just the wrong widget is on top. The important one is hidden behind.

the initial description is different to what I get.


HNC: Update user doc to recommend against propagating workloads

Part of #1473
PSP replacement may affect HNC in that if users use HNC to propagate pods, some propagation may fail because of the mismatching pod security policy label on the local child namespace.
HNC can propagate pods but we don't recommend it.
Update the user docs to recommend against propagating workloads like Deployment StatefulSet, etc,

Moved to https://github.com/kubernetes-sigs/hierarchical-namespaces/issues/19
/close


[Flow] User is shown as offline while he is online

Connections is empty even though the user is connected on uhuru

Will follow up here.
https://github.com/threefoldtech/twin_aydo/issues/438


external shuffle service in kubernetes

Is this feature still in progress？
(https://docs.google.com/document/d/1uCkzGGVG17oGC6BJ75TpzLAZNorvrAU3FRd2X-rVHSM/edit#heading=h.btqugnmt2h40 )

Yes. The proposal just passed the SPIP process, and we should see PRs soon.

Also there's a separate JIRA on enabling dynamic resource allocation without an external shuffle service at https://issues.apache.org/jira/browse/SPARK-24432 with a WIP PR at https://github.com/apache/spark/pull/24817.

@liyinan926 That's really cool! We are highly interested in this feature and we are going to test it as soon as possible.

@ringtail https://github.com/apache/spark/pull/24817 has been merged and the feature (dynamic resource allocation without an external shuffle service) is now available in the master branch. If you want to try it out in the Kubernetes mode, you can build a custom Spark image from the master branch.

@liyinan926 Thanks. But I think this is not what i want.  In this doc.(https://docs.google.com/document/d/1uCkzGGVG17oGC6BJ75TpzLAZNorvrAU3FRd2X-rVHSM/edit#heading=h.btqugnmt2h40 ) The external shuffle proxy for kubernetes  is the key point. shuffle to local disk or pv is not that elegant. I think shuffle proxy maybe the answer.

Will try this as soon as available.


Health check failed with error: [Errno 99] Cannot assign requested address

Health check failed with error: [Errno 99] Cannot assign requested address

Hi,
Can you please share some code and other context?


Preserve leading underscores for camel_case_key

Elixir's Macro.camelize will ditch any leading underscores and upcase
the first letter.
e.g.
iex(4)> Macro.camelize("_foo")
=> "Foo"

@smdern
Thanks for the discovery and contribution!

@smdern
Thanks for the discovery and contribution!

Np. That was fast. I created a plug that transforms incoming requests and the responses if you're interested, I can contribute that as well..
an example usage
plug TransformParams,
  params: &ProperCase.to_snake_case/1,
  response: [
    json: &ProperCase.to_camel_case/1,
    plain_text: &String.upcase/1,
  ]


Publish VL53L1X + VL53L4CD (plus descriptions)

Closes #60 (released in firmware beta 82 this week)

Looked good on staging, merged


Fix attempting to load multiple libraries on win32

When trying to load multiple library names on win32 load_library will just exit the loop on the first library that fails. Let's instead print some debug info instead.

That's more useful.


unsafe async fn -> async unsafe fn + error

The reordering of the signature pub unsafe async fn test(&mut self) in an impl block breaks compilation, given it makes it pub async unsafe fn test(&mut self). I have no clue if this applies to any and all functions with unsafe async fn, but it breaks with this simple case:
#![feature(async_await)]

struct A;

impl A {
    pub unsafe async fn thing(&mut self) -> Result<(), ()> {
        Err(())
    }
}

If you now use the newest rustfmt (i.e. from latest nightly), it breaks compilation:
error: missing `fn`, `type`, or `const` for impl-item declaration
 --> a.rs:5:8
  |
5 |     pub async unsafe fn thing(&mut self) -> Result<(), ()> {
  |        ^ missing `fn`, `type`, or `const`

A simple case for making this work is just creating a file called a.rs, copy+paste that, run rustfmt a.rs, then rustc a.rs to get the error.

Hmm, I thought the correct ordering has changed to async unsafe fn in https://github.com/rust-lang/rust/pull/61319, but that doesn't apply to methods in impl? That's strange.

This is a bug in the rustc parser. It will be fixed in https://github.com/rust-lang/rust/pull/62241.
Closing as this is not a rustfmt issue. @Proximyst Thank you for reporting!


Use of reflect

There are multiple places where reflect is being used. Wouldnt that cause performance issues?

I'm curious about that, too


CF Push Fixes

@nwmac Can you test this in SCF deployed on CAASP? It doesn't always succeed to push successfully to local PCF Dev, sometimes it times out.


Fixing device.py so that Travis doesn't fail, added test and support for coverall

In the current prod version of the code, Travis throws an error in device.py (#76). Oddly, the error wasn't there when the affected lines of code was first merged. This is a fix for that error so that Travis can build again.
I've also added a test for the set_predefined_color-method and support for coverall.

@balloob or @lwis can you have a look at this solution to the problem please?

My preference would be to maintain the existing behaviour, catch the KeyError and do nothing, but log a warning that the colour could not be resolved.

You need to update your test, and I think the block should look more like;
 def set_predefined_color(self, colorname, *, index=0):
        try:
            color = COLORS[colorname.lower().replace(" ", "_")]
            return self.set_hex_color(color, index=index)
        except KeyError:
            _LOGGER.debug('Could not match color name')

@lwis Thanks! Took me a while to figure out how to update the test but this looks like it's passing through the gates of Travis.

Please use clean branches. Seems like it contains a lot of unrelated commits


[release-2.1] update go module

https://github.com/open-cluster-management/backlog/issues/9921

/lgtm
/approved


Can I program a custom MIDI input driver with Moony?

I wonder if I can use Moony to cleverly route manipulate my CC input to use two MIDI-CC buttons to increase/decrease output MIDI channel?
I'm looking for plugins that can do this, but I can see anything, there's  bunch of great plugins that can convert notes to CC and vice versa, remap stuff, but Moony seems like the tool I need to do it in a n elegant way.
I Basically need to take MIDI input, use two MIDI CCs as special controls to increase/decrease an Int between 1 and 16, and pass everything through, altering the MIDI channel of the messages to use the selected channel.
How can I learn to do this stuff?
Are there any resources that I can use to learn how Moony works and how to program such stuff in LUA?
PS: I've noticed Moony has "C" and "A" input types. I thought it's about Control and Audio, but it's Control and Atom. I know Ardour has audio plugins written in LUA.
Is it possible manipulate standard MIDI messages at all with Moony? Or t is only intended as an internal tool for Synthpod? Is it possible to make a MIDI variant aswell?

How can I learn to do this stuff?

There's the reference one can consult [1]
There's an introductory talk from this years LAC [2] (I guess I should links that to moony's web presence)
There's a dozen or so presets/templates shipping with moony

[1] https://openmusickontrollers.gitlab.io/moony.lv2/
[2] https://www.youtube.com/watch?v=JdnQcSQiW7Q&list=PLpEMKw8jHgdRA3ydjZvt73q4Nc4W0jvuz&index=30

Is it possible manipulate standard MIDI messages at all with Moony? Or t is only intended as an internal tool for Synthpod? Is it possible to make a MIDI variant aswell?
LV2 knows 4 types of ports:

Control port (your average knob value)
Audio port
CV port
Atom event sequence port

All event data in LV2 goes through atom ports. MIDI is just a special type of LV2 atom. Moony can handle arbitrary types of atoms, MIDI included.

I Basically need to take MIDI input, use two MIDI CCs as special controls to increase/decrease an Int between 1 and 16, and pass everything through, altering the MIDI channel of the messages to use the selected channel.

Sure, moony has been developed to be able to do such mappings.
I'll try to quickly prototype something that should get you going, stay tuned...

Here a bare minimum that should do what you want (without handling all the nasty corner cases)
Moony_A1_x_A1_unfa_midi_sprinkler.preset.lv2.zip

Or t is only intended as an internal tool for Synthpod?

Not at all. moony runs in any LV2 host, or as single JACK app when loaded into jalv.

First thing to learn about Lua is to not write it in CAPITALS [1], serious Lua developers may not even talk back to you ;)
[1] https://www.lua.org/about.html

program such stuff in LUA?
If you're generally interested in Lua (it is used as scripting language in many audio apps), there's a book (take fourth edition for latest Lua which moony is based on) I can warmly recommend [1].

[1] https://www.lua.org/pil/

Wow. Thank you so much! You've confirmed to me that Moony is the tool for the job, and you've provided all help I could ask for :) I'll investigate the code you've prepared for me and see if I can use it and hack it to suit my live performance needs.
I must say that being able to manipulate MIDI events withing a plugin, with a simple scripting language is something I never even dreamed of - I always thought I'll have to code my own LV2 plugins for that or run some strange MIDI processing programs - but with this I can keep all that contained within a single Carla plugin host project and keep it elegant.  I'm really excited about your work - the tools you're crafting are unique and very powerful.

Very much appreciated.

I'm trying to use the code you wrote but I haven't been able to get it to work so far. It doesn't forward the messages. As I understand it has a MIDI responder that checks the Controller how can I define an arbitrary CC number (or better: how can I use Sherlock to sample what I need to set as triggers) - can I use Sherlock to find that out?

Ok, I've figured out I can use Sherlock to find out event names that Moony will use for Inc/Dec operations. I've watched half of your LAC talk so far, as I don't want to understand sequencing, because that's too much for me right now, I first want to get the hang of simple manipulation of events.
BTW: Can I use the Controllers tab to have a nice preview of what is my active instrument?
Can I display the Cur value there somehow?

I used prints to identify what parts of the code execute, and the function run works, but the function controller is never called.

which host do you use?
Oldish versions of e.g. carla didn't support multiple atom ports, so would never receive any MIDI.
To test if you receive any MIDI try the following code:
function run(n, control, notify, seq, forge)
    for frames, atom in seq:foreach() do
        print(frames, atom)
    end
end

This should print something in the log window when receiving e.g. MIDI

Output in log window should look like:
0 (chunk: 0x7f547c0069e0)

That's probably it. I have nothing. I use carla-git KXStudio package (version 2:1.9.7+git20170828v5).

That should be new enough to work, will try to reproduce in carla here

Can confirm, carla-git has the same problem again, gets confused with multiple atom ports and probably does not know where to send MIDI, to, best tell @falktk, so he can fix it again...
Works in any other host, though (qtractor, jalv, ardour, synthpod)

I have run it in jalv and it works. I guess I'll use jalv and make myself a script to run it before Carla to have it as a part of the chain.

does this apply to the latest stable release of moony?
I have 0.22.0 installed here.

I have package  moony.lv2 in version 0.22.0-1kxstudio1.

@falkTX thanks for chiming in

Here's what I crafted so far:
Live.tar.gz
The bash script run.sh loads Moony in jalv, then loads Carla. I've modified the code so it ignores events with val = 0, because I had everything working with double steps, instead of single.
It works! Now I can prepare myself more patches, wire them up in Carla to specific MIDI ports after MIDI splitter and I'm ready to go jam with a band.

It works! Now I can prepare myself more patches, wire them up in Carla to specific MIDI ports after MIDI splitter and I'm ready to go jam with a band.

;)

BTW: Can I use the Controllers tab to have a nice preview of what is my active instrument?
Can I display the cur value there somehow?

Yes you can with the StateResponder [1] (which can be a bit tricky to use...)
[1] https://openmusickontrollers.gitlab.io/moony.lv2/#responder-state

Wow, so there are more options than just knob widgets? I guess a simple number display would do just fine. I'll keep a note of what instrument is where or just memorize it. I'm starting to read through he docs. Thanks!

Wow, so there are more options than just knob widgets?

Load the preset "State: Responder" and you'll see them all

I loaded it, but I get an error. Can't tell why, though, because it looks fine to me.

What is at line 39?


Timing driven optimization of combinational logic

Thank you for adding the recent timing driven optimization flow! The flow looks very promising and thus I am planning to use this flow for my research. In my scenario I want to optimize (timing-driven) a purely combinational design under various input arrival times and output required times.
Is there a way to specify such constraints? Apologies if it is more of an OpenSTA question. I see that the examples are all sequential designs that optimize based on a clock period target.
I was also wondering how I should fit this in an overall placement flow because 1) the design should be floorplanned and placed before OpenPhySyn 2) OpenPhySyn will resize cell and add buffers which may not fit in the original floorplan. Should I run multiple iterations of 1) and 2) until convergence?

Hi @rajarshiroy
Thanks for your interest.

Regarding the combinational logic, OpenPhySyn works based on whatever is fed from OpenSTA. So to work with combinational circuits all you need to do is provide the appropriate SDC commands for combination circuits. You are probably looking for commands such as:

set_max_delay -from
set_max_delay -to
set_input_delay/set_output_delay
set_input_transition
set_load
And other SDC commands. They are supported by OpenSTA and hence OpenPhySyn.

As for the flow, we usually do it in iterative phases as you mentioned: Placement -> OpenPhySyn Opt. -> Legalize -> OpenPhySyn Opt -> Legalize..etc. However, tightning the -transition_pessimism_factor and -capacitance_pessimism_factor for the repair_timing command might make the optimization more tolerable for legalization movements to have fewer iterations.
Additionally, OpenPhySyn supports using hooking any legalization tool to legalize the design incrementally using the legalization flags in the repair_timing command but unfortunately, I do not ship any legalizer with the tool for now, but if you have a one that you use  you can easily hook it up at this line and remove the #ifdef guards.

Thank you for the speedy clarifications @ahmed-agiza ! Will set up my flows based on your pointers.


Im a little confused

Hi! So happy this is working!
However I don't know much about code... ive done the first line: phantom-windows.exe 'sever and port'
Then it shows up on my friends list which is great and I can go on the server! However I have no idea what the rest of the code means.

Any help will be great!

Hi! So happy this is working!
However I don't know much about code... ive done the first line: phantom-windows.exe 'sever and port'
Then it shows up on my friends list which is great and I can go on the server! However I have no idea what the rest of the code means.

Any help will be great!

I would suggest my setup, on the latest version of phantom: -workers 16 -6 -bind_port 19133 -server (server ip)

Hey @DivineStag! The other lines are just examples for people looking to reconfigure phantom based on their Minecraft server's setup.
Thanks for the help!

A. Norris

From: Justin Head<EMAIL_ADDRESS>Sent: Saturday, August 15, 2020 6:59:51 PM
To: jhead/phantom<EMAIL_ADDRESS>Cc: DivineStag<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [jhead/phantom] Im a little confused (#114)
Hey @DivineStaghttps://github.com/DivineStag! The other lines are just examples for people looking to reconfigure phantom based on their Minecraft server's setup. It sounds like you got everything working with the simplest command, so that's all you should need 😄
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/jhead/phantom/issues/114#issuecomment-674429966, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQTISYPGHGXGPPVHYENAAUDSA3EJPANCNFSM4P7MHYZQ.


Add a license to the repository

I recently came across your project Qiskit_Playground and I noticed that the repository github.com/benkoehlL/Qiskit_Playground currently does not have a license specified.
Why Adding a License is Important?
As GitHub documents

Public repositories on GitHub are often used to share open source software. For your repository to truly be open source, you'll need to license it so that others are free to use, change, and distribute the software.

Would be possible to add a valid license to this repository? Probably something really OpenSource such as the Apache 2.0 license would fit really well.
Thanks!

Dear Juan,
I will certainly try to licence it, if you are interested in using my
repository (I intend it to be a place for learning about Qiskit and Quantum
Algorithms in general and in my opinion there is nothing new).
Would you kindly help me set up such a licence. I am not familiar with ways
to do it.
Anyway, thank you very much for your interest. Please also consider
contributing to the repository.
Best,
Benjamin
Am Donnerstag, 5. September 2024 schrieb Juan Cruz-Benito <
@.***>:

I recently came across your project Qiskit_Playground and I noticed that
the repository github.com/benkoehlL/Qiskit_Playground currently does not
have a license specified.
Why Adding a License is Important?
As GitHub documents
https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository
Public repositories on GitHub are often used to share open source
software. For your repository to truly be open source, you'll need to
license it so that others are free to use, change, and distribute the
software.
Would be possible to add a valid license to this repository? Probably
something really OpenSource such as the Apache 2.0 license
https://www.apache.org/licenses/LICENSE-2.0 would fit really well.
Thanks!
—
Reply to this email directly, view it on GitHub
https://github.com/benkoehlL/Qiskit_Playground/issues/2, or unsubscribe
https://github.com/notifications/unsubscribe-auth/A3PBM6UIRFVZ3EWQ4GCAENLZVBNSTAVCNFSM6AAAAABNWQ7ISOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUYDOOBUG44DSMY
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Thank you Juan. I added the licence you suggested.
Have fun!
Am Donnerstag, 5. September 2024 schrieb Juan Cruz-Benito <
@.***>:

I recently came across your project Qiskit_Playground and I noticed that
the repository github.com/benkoehlL/Qiskit_Playground currently does not
have a license specified.
Why Adding a License is Important?
As GitHub documents
https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository
Public repositories on GitHub are often used to share open source
software. For your repository to truly be open source, you'll need to
license it so that others are free to use, change, and distribute the
software.
Would be possible to add a valid license to this repository? Probably
something really OpenSource such as the Apache 2.0 license
https://www.apache.org/licenses/LICENSE-2.0 would fit really well.
Thanks!
—
Reply to this email directly, view it on GitHub
https://github.com/benkoehlL/Qiskit_Playground/issues/2, or unsubscribe
https://github.com/notifications/unsubscribe-auth/A3PBM6UIRFVZ3EWQ4GCAENLZVBNSTAVCNFSM6AAAAABNWQ7ISOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUYDOOBUG44DSMY
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Thanks!


improve doc add systemd unit to start UI

These changes would be much better if they used heredocs. See how that's done in the README and implement those here too.


BigOperator selection

Hello
The current WpfMath didn't seem to be able to choose \sin \cos \tan etc.
I tried the original of SourceSpan as the Source of BigOperator. Please merge if you like.

Hi!
If I understood you correctly, and we're talking about selection highlighting in formulas: like, if you wrote \sin{2+2}, then \sin won't highlight correctly.
You seem to resolve this by changing every CharAtom inside of a formula instantiation to have its source to be replaced with "origin". I don't think this is the right fix.
See: here we have a "Predefined formula fragment", which serves exactly the purpose of differentiating the formula-internal source and external source.
Say, we have a user formula \sin{2+2}. We know (from PredefinedTexFormulas.xml) that \sin corresponds to \mathrm{sin}.
This \mathrm{sin} doesn't have any source in the original formula; we have no general way of creating this mapping. Everything inside of a formula was somehow generated by it, but we have no idea how. That's why it don't work.
Your fix works for very simple cases (and even then, it doesn't work completely right: instead of accociating the box around all the characters with the source, it will instead associate every character individually), and will break for more complex cases.
I would lean towards more complex solution which somehow overrides the source for the root formula atom, and not its internal atoms. Also, this particular line is very wrong: on one hand, it tries to differentiate between the original and predefined formula source, and on the other hand, it tries to override the source it has itself defined, by passing origin: this._source.
Sorry, but I couldn't accept this contribution, because I don't believe this is the right approach to the problem.


Dependency: Upgrade reason-fontkit and reason-glfw

This upgrades reason-glfw to 3.2.1015, and reason-fontkit to 2.2.0, which picks up @zxey 's fix for #330 .
Thank you @zxey for your investigation and fix!

Fixes #330