profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/kashmervil/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Aleksandr Kirsanov kashmervil JetBrains Saint Petersburg Rider Team

kashmervil/trik-sharp 6

Library for Robotics programming in F#

kashmervil/trik-upload 1

Plugin for Visual Studio for working with remote linux machines

ramntry/SLL 1

Simple Lazy Language Implementation

doreshnikov/java-indent-check 0

Java file indentation checker for jetBrains 2018 internship ".editorconfig support" project

kashmervil/fsharp 0

The Open Edition of the F# compiler, core library and tools

kashmervil/FSharp.Reactive 0

Extensions and wrappers for using the Reactive Extensions (Rx) with F#.

kashmervil/homeworks 0

Homeworks at university programming class

kashmervil/KinectController 0

Controller for trik robots

kashmervil/mono 0

Mono open source ECMA CLI, C# and .NET implementation.

kashmervil/MonoPi 0

A Raspberry Pi GPIO manipulation library for Mono/.NET implementing libbcm2835 and wiringPi

PullRequestReviewEvent

Pull request review commentJetBrains/rd

Implementation of created extensions listener

 public interface IProtocol : IRdDynamic     [NotNull] IScheduler Scheduler { get; }     [NotNull] IWire Wire { get; }         [NotNull] ProtocolContexts Contexts { get; }+    [NotNull] RdSignal<ExtCreationInfo> ExtCreatedNetworked { get; }

Backend part of hiding this signal?

slavam2605

comment created time in 7 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentJetBrains/rd

Implementation of created extensions listener

 abstract class RdBindableBase : IRdBindable, IPrintable {      protected var parent : IRdDynamic? = null -    private var bindLifetime: Lifetime? = null-+    lateinit var bindLifetime: Lifetime

It breaks the contract that existed previously. It was possible to add extensions via getOrCreateExtension before the bind happened, now it will result in an exception

slavam2605

comment created time in 13 days

Pull request review commentJetBrains/rd

Implementation of created extensions listener

+using JetBrains.Diagnostics;++namespace JetBrains.Rd+{+  public struct CreatedExtInfo

Sorry for raising naming issues yet again, but maybe ExtCreationInfo?

slavam2605

comment created time in 13 days

Pull request review commentJetBrains/rd

Implementation of created extensions listener

 abstract class RdBindableBase : IRdBindable, IPrintable {                 val newExtension = create()                 if (newExtension is IRdBindable) {                     bindableChildren.add(if (highPriorityExtension) 0 else bindableChildren.size, name to newExtension)-                    bindLifetime?.let {-                        newExtension.identify(protocol.identity, rdid.mix(".$name"))-                        newExtension.bind(it, this, name)-                    }+                    newExtension.identify(protocol.identity, rdid.mix(".$name"))

Shouldn't there be a check for a lifetime being terminated?

slavam2605

comment created time in 13 days

Pull request review commentJetBrains/rd

Implementation of created extensions listener

 abstract class RdExtBase : RdReactiveBase() {         lifetime.bracket(             { //                extScheduler = sc-                extProtocol = Protocol(parentProtocol.name, parentProtocol.serializers, parentProtocol.identity, sc, extWire, lifetime, serializationContext, parentProtocol.contexts).also {+                extProtocol = Protocol(parentProtocol.name, parentProtocol.serializers, parentProtocol.identity, sc, extWire, lifetime, serializationContext, parentProtocol.contexts, parentProtocol.extCreatedLocal, createExtSignal()).also {                     it.outOfSyncModels.flowInto(lifetime, super.protocol.outOfSyncModels) { model -> model }+                    parentProtocol.extCreatedNetworked.localChange {

Am I right that the code won't be executed for the case of local ext creation since the lifetime will be terminated? And that is the guarantee behind that

extCreatedNetworked.advise(lifetime) { message ->
  if (extCreatedNetworked.isLocalChange) return@advise
    extCreatedLocal.fire(message)
}

If that's the case, I find it very confusing and hard to understand. It hides the real reasons by the peculiarities and corner cases of lifetime-related API that skips the execution for Lifetime.Terminated, while leaving out the code that uses local cookies for remote updates with unclear execution flow. It's hard to tell for sure if a particular API won't throw an exception in the case of Lifetime.Terminated, so usually people don't mess with terminated lifetimes.

Sorry if that's not the case

slavam2605

comment created time in 13 days

Pull request review commentJetBrains/rd

Implementation of created extensions listener

 class Protocol internal constructor(     val lifetime: Lifetime,     serializationCtx: SerializationCtx? = null,     parentContexts: ProtocolContexts? = null,+    parentExtCreatedLocal: Signal<Triple<RName, RdId?, Long>>? = null,

The current order of properties is different between properties declaration order in the interface

slavam2605

comment created time in 13 days

Pull request review commentJetBrains/rd

Implementation of created extensions listener

 class Protocol internal constructor(      override val contexts: ProtocolContexts = parentContexts ?: ProtocolContexts(serializationContext) +    override val extCreatedNetworked: RdSignal<Triple<RName, RdId?, Long>>+    +    override val extCreatedLocal: Signal<Triple<RName, RdId?, Long>> = parentExtCreatedLocal ?: Signal()

let's move initialization in init block same as the other signal, looks inconsistent

slavam2605

comment created time in 13 days

Pull request review commentJetBrains/rd

Implementation of created extensions listener

 class MessageBroker(private val defaultScheduler: IScheduler) : IPrintable {         }     } -+    fun tryGetById(rdId: RdId): IRdWireable? {+        return subscriptions[rdId]

Isn't Sync.lock(lock) required here?

slavam2605

comment created time in 13 days

Pull request review commentJetBrains/rd

Implementation of created extensions listener

 interface IProtocol : IRdDynamic {     val outOfSyncModels: ViewableSet<RdExtBase>      val contexts : ProtocolContexts++    val extCreatedNetworked: RdSignal<Triple<RName, RdId?, Long>>

Let's use ISignal in these two properties, also Networked seems weird from both naming used in rd in general and it's duality with the 'local' and from the common English perspectives. Also, for consistency with .NET part I'd go with CreatedExtInfo/ExtCreationInfo instead of Triple. Maybe we can go with a pair of

extCreatedLocally: ISignal<ExtCreationInfo> 
extCreatedRemotely: ISignal<ExtCreationInfo> 

?

slavam2605

comment created time in 13 days

Pull request review commentJetBrains/rd

Implementation of created extensions listener

 interface IScheduler {     }      fun flush()+}++interface ISchedulerWithBackground : IScheduler {

Documentation please

slavam2605

comment created time in 13 days

Pull request review commentJetBrains/rd

Implementation of created extensions listener

 abstract class RdBindableBase : IRdBindable, IPrintable {                 bindLifetime = lf             },             {-                bindLifetime = lf+                bindLifetime = Lifetime.Terminated

the previous code effectively did the same thing. Shouldn't it nullize bind lifetime instead? cc @knah

slavam2605

comment created time in 13 days

PullRequestReviewEvent
PullRequestReviewEvent