In statefulset, declare to use pvc, the status of pvc is always pending

Environmental Info:
K3s Version:
v1.28.14+k3s1
Node(s) CPU architecture, OS, and Version:

Cluster Configuration:

Describe the bug:

In stafulsets, declare to use pvc, the status of pvc is always pending，but pod is running ,pvc pv  is bound
apiVersion: apps/v1
kind: StatefulSet
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"apps/v1","kind":"StatefulSet","metadata":{"annotations":{},"name":"nginx-statefulset","namespace":"default"},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"nginx"}},"serviceName":"nginx","template":{"metadata":{"labels":{"app":"nginx"}},"spec":{"containers":[{"image":"<IP_ADDRESS>:3443/xrwang/nginx:latest","imagePullPolicy":"IfNotPresent","name":"nginx","ports":[{"containerPort":80}],"volumeMounts":[{"mountPath":"/usr/share/nginx/html","name":"data"}]}]}},"volumeClaimTemplates":[{"apiVersion":"v1","kind":"PersistentVolumeClaim","metadata":{"annotations":{"path":"/share","value":"10"},"creationTimestamp":null,"name":"data"},"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"10Gi"}},"storageClassName":"inner-nfs-sc"}}]}}
  creationTimestamp: "2024-11-06T01:39:25Z"
  generation: 1
  name: nginx-statefulset
  namespace: default
  resourceVersion: "2700347"
  uid: a3aa0b0f-4a18-4bd2-8962-ed0796e8546a
spec:
  persistentVolumeClaimRetentionPolicy:
    whenDeleted: Retain
    whenScaled: Retain
  podManagementPolicy: OrderedReady
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: nginx
  serviceName: nginx
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: nginx
    spec:
      containers:
      - image: nginx:latest
        imagePullPolicy: IfNotPresent
        name: nginx
        ports:
        - containerPort: 80
          protocol: TCP
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /usr/share/nginx/html
          name: data
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
  updateStrategy:
    rollingUpdate:
      partition: 0
    type: RollingUpdate
  volumeClaimTemplates:
  - apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      annotations:
        path: /share
        value: "10"
      creationTimestamp: null
      name: data
    spec:
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 10Gi
      storageClassName: nfs-sc
      volumeMode: Filesystem
    status:
      phase: Pending
status:
  availableReplicas: 1
  collisionCount: 0
  currentReplicas: 1
  currentRevision: nginx-statefulset-68489d88f8
  observedGeneration: 1
  readyReplicas: 1
  replicas: 1
  updateRevision: nginx-statefulset-68489d88f8
  updatedReplicas:

Steps To Reproduce:

Installed K3s:

Expected behavior:

Actual behavior:

Additional context / logs:

storageClassName: nfs-sc

This is not a storageclass that comes with K3s. I suspect that whatever provisioner you're using to provision this volume is not working properly. Either that or perhaps the NFS server that is exporting the share is not configured properly.

Can you show the PVC or PV itself? Logs? Anything useful at all?


Allow null enum values to be parsed in duplicated field resolution

This caused a nasty production bug for me when constructing a query against duplicated columns using optional args. For instance, given the document setup:
class ExampleDocument
{
    Colors Color { get; set; }
    string Name { get; set; }
}

I had a method which was something to the tune of:
IEnumerable<ExampleDocument> ListDocuments(Colors? color, string? name)
    =>  _querySession
        .Query<ExampleDocument>()
        .Where(a => (color != null && a.Color == color)
                 && (name == null || a.Name == name))
        .ToList();

That caused a hard error because a null value for color was causing the duplicated field handler to error out, despite the fact that it would never be evaluated against the column itself due to the OR evaluation.

@jeremydmiller is okay with this, merged the same.


chore: add new template with fabric8-hub-token to push new client

We are working on separating client and services from fabric8-services. You can find more details about why at  fabric8-services/fabric8-wit#2063.
Now we need some way using which we should be able to push a newly generated client to a different repository. (e.g. if we have some change in https://github.com/fabric8-services/fabric8-cluster, after successful deployment of fabric8-cluster, we would like to create and push a newly generated client to https://github.com/fabric8-services/fabric8-cluster-client) for which we need fabric8-hub-token to be injected as env (FABRIC8_HUB_TOKEN), which we can use to push to https://github.com/fabric8-services/fabric8-cluster-client repo.
cc @xcoulon, @alexeykazakov

[test]


api queries

made four API ready queries and documentation around it.
The index.md page cards grid seems to breakdown, and some of the text in tables wraps around no matter how many ----- I put in the header line. Alex will need your help there :)

@andrewhong5297 The card grids won't work in your local env; they require the Material insiders plugin which doesn't work with the version of mkdocs you have to install in order to have mkdocs work with our docs... it's some backflip ninja stuff david did to get it all working - the grids will appear on the live site!
As for the wrapping, I don't know that we can help that if you go over a certain text length. Will merge then take a look at it myself.
Also asked David to add you to our GitHub team so you can just create branches here rather than having to fork lol

got it - haha thanks Alex!


Program running crash in win10

hello sir.
I used VS2015 to run this program, and it crashed during a video call
and the backtrace as fallows.

0d4f4590()
wdmaud.drv!60c68aa8()
wdmaud.drv!60c67f4e()
wdmaud.drv!60c677fe()
wdmaud.drv!60c6769c()

this is most likely a duplicate of https://github.com/alfredh/baresip/issues/888

ok


Issue #1198: Add documentation for OOPs (Java Domain)

Description 📜
I have included all the information about the OOP principal.
Partially resolves #1198

Type of change 📝

[ ] Documentation (Content Creation in the form of codes or tutorials)

Domain of Contribution 📊

[ ] Java_Domain

Checklist ✅

[ ] I follow Contributing Guidelines & Code of conduct of this project.
[ ] I have performed a self-review of my own code or work.
[ ] I have commented my code, particularly in hard-to-understand areas.
[ ] My changes generates no new warnings.
[ ] I'm GWOC'21 contributor

Screenshots / Gif (Optional) 📸

@sakshamlamba109 Please find some time and complete the initial review.

/assign documentation


Add a second test about lists

This PR builds on top of #170 and adds a second test. This one is here to defeat the symbolic engine with a big path explosion and an infinite recursion, which it does for now. I still need to figure out how to add fuel to this.

And now with a simpler test that hands, while technically it should be possible to find something.

It now strikes me that those tests might be more relevant as execution tests, rather than prover tests.


Tooling for bisecting crate versions to find violation ranges

When we find criteria violations in a crate, we need to record a version range of when the crate was affected. It can be difficult to track down when the violation was introduced because git history typically does not track which commits were included in a published crate version. The most reliable method for us to do this is to bisect published crate versions until we locate the version which first introduced the violation. Doing this manually can take a long time and is difficult for those not familiar with crates.io. Since cargo-vet already has support for inspecting crate sources at a particular version, it would be nice to include a feature to bisect the crate versions on top of the source inspection feature.
Split off from #446.

So it seems straightforward enough to build bisection tooling, but per the discussion in #446 I think the high-order bit is that the bisections in this workflow are unnecessarily eager, and we could largely eliminate the burden by deferring it until when it's actually relevant.
In other words, I think ideally we'd have a setup where you could record a violation in a specific version, and the tooling would conservatively assume it exists in all versions of the crate until a version is specified.
A simple way to do this today would just be to record the violation version broadly (*, or >LAST_KNOWN_GOOD_VERSION), record what we actually know in the notes, and then go back and update the audit entry if/when more specificity is desired. This depends on being able to actually update the audit record, so it's not very workable in a cross-organization context, but it might work for @djkoloski's use-case. WDYT?

Yes, I think this would work for our use case and obviate the need for tooling to bisect the exact offending version


Canon 5D - focus box positions is not quite right

See attached screen shot (LR at top, DPP at bottom). The scaling for the focus boxes is not correct, resulting in the boxes being displayed at the wrong place in the image.
Changing lines 31 & 32 in CanonDelegates.lua (new_ideas branch) as below fixes this.
local imageWidth = ExifUtils.findFirstMatchingValue(metaData, { "Canon Image Width", "Exif Image Width" })
local imageHeight = ExifUtils.findFirstMatchingValue(metaData, { "Canon Image Height", "Exif Image Height" })
I have also checked this for 40D, 50D, 7D and 5D3. For the 50D, 7D & 5D3, "Canon Image Width" == "AF Image Width" and "Canon Image Height" == "AF Image Height". For the 40D the "Canon Image Width" and "Canon Image Height" values are incorrect.
Results:

50D, 7D & 5D3 - can use either "Canon Image Width/Height" or "AF Image Width/Height"
5D - need to use "Canon Image Width/Height"
40D - need to use "AF Image Width/Height"

Hey guys, if possible add samples images to this repo for all of us as well:
https://github.com/musselwhizzle/Focus-Points-Sample-Images

btw, @musselwhizzle I found this resource which absolutely grate for testing bodies we dont own :-)
http://www.rawsamples.ch

awesome

@musselwhizzle this should have been solved a few days ago. Let's @philmoz confirm this and close this

I can confirm this is now fixed in the master branch.


Performance on ImageNet

Hi,
Thank you so much for sharing the work!
If I understand correctly, you got the best performance on ImageNet(79.14) when lamda=e (from table 2). And I guess this is the only difference between your loss and SupContrastive on ImageNet, right?
Also, have you done some ablation study on batch size and how did it affect the performance?
Thank you in advance!

@zhangdan8962  Thanks for your interest in our work.

We are not quite sure what you mean by "the only difference". Our method uses the hierarchical information from ImageNet, and is therefore fundamentally different from SupCon.
We don't study the batch size.


So how to we actually use this?

Installed via hacs, added the following to the config:
media_player:
  - platform: snapcast_player
    host: <IP_ADDRESS>
    start_delay: 1s

Snapserver is running as an addon on HA.
Is there any additional configuration required on snapserver?
Here's what I use: https://github.com/rwjack/addon-snapserver-spotify
(I have also made the change locally to expose 4953)
When I go into media, select snapcast_player, and try google TTS, I get no output on my snapclient devices.

Am I supposed to add port 4953 as some sort of parameter to the snapserver config?

Snapcast container netstat
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 <IP_ADDRESS>:35167        <IP_ADDRESS>:*               LISTEN      -
tcp        0      0 <IP_ADDRESS>:1705            <IP_ADDRESS>:*               LISTEN      321/snapserver
tcp        0      0 <IP_ADDRESS>:1704            <IP_ADDRESS>:*               LISTEN      321/snapserver
tcp        0      0 <IP_ADDRESS>:1780            <IP_ADDRESS>:*               LISTEN      321/snapserver
tcp        0      0 <IP_ADDRESS>:44153           <IP_ADDRESS>:*               LISTEN      323/librespot
udp        0      0 <IP_ADDRESS>:46867        <IP_ADDRESS>:*                           -
udp        0      0 <IP_ADDRESS>:5353            <IP_ADDRESS>:*                           323/librespot

Snapcast config
[server]
threads = -1
datadir = /data/snapserver/
[stream]
stream = spotify:///librespot?name=Spotify&username=x&password=x&devicename=HA_Snapcast&bitrate=320&volume=100
stream = tcp://<IP_ADDRESS>:4953?name=snap_tts&mode=client
buffer = 1000
codec = flac
send_to_muted = true
sampleformat = 48000:32:2
[http]
enabled = true
bind_to_address = <IP_ADDRESS>
doc_root = /usr/share/snapserver/snapweb/
[tcp]
enabled = true
[logging]
debug = false

OK, now I see the new media player as a SNAPWEB source, I see 4953 is exposed and reachable, but still no audio plays...
media_player:
  - platform: snapcast_player
    host: hass-ipv4-addr
    start_delay: 1s

It needs to be mode=server to work. Given that you're running locally you'll also be able to use a pipe once I get #3 merged, so the config would be somthing like:
media_player:
  - platform: snapcast_player
    host: /path/to/pipe
    start_delay: 1s

not sure how I would get the pipe configured, since snapcast is running within a docker container on HA itself as an addon.
Still no audio with mode=server
Could you share your working configuration?

@s-knibbs any updates on this?

I don't have any updates I'm afraid. I've been dealing with some serious health issues so unfortunately this isn't something I'm going to be able to maintain.

Understood. Hope you get well soon!
I'll keep this open in case anybody comes up with something..

I tried making changes within my snapserver config and here's what I found out.
When the snapserver codec is set to flac:
[stream]
codec = flac

On my client which is configured to the TTS snap group, I get this error and literally need to kill the process, even systemd can't shut it down:
Jul 27 12:12:36 overlord snapclient[673620]: Got error callback: FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM
Jul 27 12:12:36 overlord snapclient[673620]: Got error callback: FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC

So I tried setting the codec to pcm, which "works" - I can hear TTS now, but it's like a sped up modified anime voice or something, which is odd, because when I try playing the same Google or Piper TTS on the Browser output from HA, it works normally. So this seems to be a conversion issue of some sort between HA's TTS and the Snapserver.
Weird TTS:

Normal TTS:

TTS stream:

Thanks, your solution worked for me!  I have Home Assistant installed in docker on Raspberry Pi 4. I added your configuration line:
stream = tcp://<IP_ADDRESS>:4953?name=TTS&codec=pcm&mode=server

to the snapcast config file and now snapcast_player broadcasts TTS from Home Assistant to the snapcast server and then to snapclients to every room.
I also added this configuration to Home Assistant - configuration.yaml file:
# Snapcast Player
 - platform: snapcast_player
#    host: <IP_ADDRESS>
   host: <IP_ADDRESS>
   port: 4953
   start_delay: 1s

For me this works perfectly.  There is no truncation of phrases, as was the case when using vlc_telnet integration.
I wish a speedy recovery to the developer.
Thanks a lot.

Just wanted to share my setup:
Homeassistant configuration:

platform: pipe
name: Snapcast pipe
fifo_path: /root/docker/snapcast/audio/snapcast_fifo

Works perfectly! Thank you

Oh, and make sure the domain/host name of your HA is set correctly for this to work. TTS over Snapcast is so nice! Hope you are well.


Output of mindmatch.py

Hello! I was just trying out mindmatch.py and there is something I don’t get from the output.
If we take for example the provided data/output_match.csv :
user_id,match_ids
1,93;217;463;645;783;1101
[…]
217,97;304;731;792;1010;1134
Shouldn't user_id 217 also have 1 in its match_ids?
I also tried the function on some data of mine and I get the same situation.

Hi @InezPereira, thanks for the feedback. And yes, it should be the same. I'll check the output for you soonish.

@InezPereira this is really a bug from the linear programming setup, it seems! I'm investigating on this issue. Mainly, there is a shifted solution that still satisfies the constraints that we gave.

Hi @titipata! I'm sure you have been super busy with Neuromatch 2.0, but I was wondering if you have had time to look at this bug or have any suspicion of what might be failing. :)


2.1.1 Slow

Haven't been keeping track of your recent changes but 2.1.1 is significantly slower then 2.1.0.

Hi.  Could you give devices specs that hava performance problems? Number of cores and ram,  model

I just updated the nugets and threw it onto my iphone 6s Plus. And noticed much slower load times. When i popped back to 2.1.0 everything was smooth again.

@highplains

Do you use custom Config (ImageService.Instance.Initialize method)? 2.1.0 had a nasty bug, which caused it to be ignored: https://github.com/luberda-molinet/FFImageLoading/issues/223
How many images on page? Is it a ListView?
Could you make a comparsion video? It would help a lot.
I'll try to prepare a new bug with threading/scheduler performance logging option. It would help a lot to have those logs. Could you run it for me?

no custom config
listview, but also noticed a huge delay on a page with no list view and a few images.
let me see what i can do.
ill run you logs.

@highplains Thanks, I'll prepare it and notify you.

There was one small renderer change to unify behavior with XF standard Image. After every ImageSource change, bitmap is instantly set to null to remove effect of loading old image appearing effect, eg in ListViews when view is reused.
There were also some task scheduler changes but when I tested it there was a performance gain, not opposite.

That is strange during my tests of 2.1.1 prereleases it was significantly faster.
@michaeldimoudis do you have any feedback? how is it on your side?

@molinch Hi I haven't noticed anything major with the 2.1.1 releases, just what I previously mentioned which you've fixed. My ListView scrolling performance is better now (I also optimised my ViewCell XAML, so together with FFImageLoading improvements it's much better).
Loading a list of images on a clean install is OK on my end. I would like it be faster but it's OK. I'm not sure if it's the image sizes, the limited amount of threads on the device, or FFImageLoading. I think it's just the size of the images and limited amount of threads on the device.
One thing I did notice is, an image didn't seem loaded in the ListView, it had the placeholder, but when I went to the detail view the image was there. Going back to ListView it was not there. I had to hard close the app and open it to get the image on the ListView again. But that's the only minor thing I just noticed with this new 2.1.1 release.
I also didn't notice any wrong images loading briefly in the ListView with the 2.1.1 release, but did notice it in the 2.1.1 pre's.
Oh and just this error on the first launch after the build with the new 2.1.1 release. But I only ever got it once.
2016-06-04 12:38:12.362 ContinuousFeedbackiOS[97190:6563997] Warning: Unhandled exception: System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. ---> System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException (ExceptionResource resource) [0x00000] in /Users/builder/data/lanes/2922/7b89851d/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/throwhelper.cs:72
at System.Collections.Generic.Dictionary2[TKey,TValue].Insert (System.Collections.Generic.TKey key, System.Collections.Generic.TValue value, Boolean add) [0x0008e] in /Users/builder/data/lanes/2922/7b89851d/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/collections/generic/dictionary.cs:336    at System.Collections.Generic.Dictionary2[TKey,TValue].Add (System.Collections.Generic.TKey key, System.Collections.Generic.TValue value) [0x00000] in /Users/builder/data/lanes/2922/7b89851d/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/collections/generic/dictionary.cs:192
at FFImageLoading.Work.WorkScheduler+d__25.MoveNext () [0x000ab] in :0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/2922/7b89851d/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at FFImageLoading.Work.WorkScheduler+d__25.MoveNext () [0x002bc] in :0
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException (ExceptionResource resource) [0x00000] in /Users/builder/data/lanes/2922/7b89851d/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/throwhelper.cs:72
at System.Collections.Generic.Dictionary2[TKey,TValue].Insert (System.Collections.Generic.TKey key, System.Collections.Generic.TValue value, Boolean add) [0x0008e] in /Users/builder/data/lanes/2922/7b89851d/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/collections/generic/dictionary.cs:336    at System.Collections.Generic.Dictionary2[TKey,TValue].Add (System.Collections.Generic.TKey key, System.Collections.Generic.TValue value) [0x00000] in /Users/builder/data/lanes/2922/7b89851d/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/collections/generic/dictionary.cs:192
at FFImageLoading.Work.WorkScheduler+d__25.MoveNext () [0x000ab] in :0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/2922/7b89851d/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at FFImageLoading.Work.WorkScheduler+d__25.MoveNext () [0x002bc] in :0 <---
Cheers.

@highplains Do you have specific transformations?
Could you post your CachedImage XAML or c# code for the image request?

@highplains I added some performance logging options:

Download 2.1.2 nuget
Create custom logger as here:

		public class CustomLogger : FFImageLoading.Helpers.IMiniLogger
		{
			public void Debug(string message)
			{
				Console.WriteLine(message);
			}

			public void Error(string errorMessage)
			{
				Console.WriteLine(errorMessage);
			}

			public void Error(string errorMessage, Exception ex)
			{
				Error(errorMessage + System.Environment.NewLine + ex.ToString());
			}
		}

Use custom FFImageLoading config as here:

			var config = new FFImageLoading.Config.Configuration()
			{
				VerboseLogging = true,
				VerbosePerformanceLogging = true,
				Logger = new CustomLogger(),
			};
			ImageService.Instance.Initialize(config);

Run Release build and send me logs which are produced.

Thanks

Everything seems to be on latest release. Want me to still send logs?

@highplains There's no need if everything is ok. I'll close the issue then. Thanks.


Linalg BLAS Level 1 Routines

I thought that I would submit a pull request to get some feedback before continuing. Here are bindings for BLAS Level 1 Routines for Koka.

I restructured the codebase a little so that if I do write bindings for MAGMA then it is as simple as naming the file linalg-magma.kk. But everything either uses a blasvector or blasmatrix which are value structs that have their length and a pointer to their buffer. They do need to be freed up manually but they should only really as an intermediate between Koka vectors and BLAS.

A potential problem I found is that BLAS loves to mutate pointers, so if a user were to pass in blasvector there is almost no guarantee that it will be the same vector. I wonder what is the best way to solve this issue.

I don't know that I would try to solve the issue in a low level bindings api. You could solve the issue at a higher level by doing something like:
Which could copy the vector and provide an 'immutable' api, but making no guarantees about the mutability of the mut variable.
val x = with-blas(my-vector) fn(mut)
    mut.operations()

One issue is if mut escapes it's scope, for that you can make the with-blas have the following type signature:
double-vector/with-blas(v: bvector<double,s0>, f: forall<s::S> (bvector<double,s>) -> e a)
  f(v.copy)

This way since the vector has a forall<s> it means that the types will not unify with any s outside the lambda's scope. You just need v.copy to be able to take in one vector with one scope and return a new one with a new scope type. (These are called scope types). Of course you can add the scope type to your low level struct, or you can make a separate type to use for the higher level api (just a value type with the low level struct as it's field).

I don't know that I would try to solve the issue in a low level bindings api. You could solve the issue at a higher level by doing something like:
val x = with-blas(my-vector) fn(mut)
    mut.operations()

Which could copy the vector and provide an 'immutable' api, but making no guarantees about the mutability of the mut variable, and just allow as many mutable operations in the mutable section of the api.
One issue is if mut escapes it's scope, for that you can make the with-blas have the following type signature:
double-vector/with-blas(v: bvector<double,s0>, f: forall<s::S> (bvector<double,s>) -> e a)
  f(v.copy)

// Or
double-vector/with-blas(v: bvector<double>, f: forall<s::S> (mut-bvector<double,s>) -> e a)
  f(v.copy)

This way since the vector has a forall<s> it means that the types will not unify with any s outside the lambda's scope. You just need v.copy to be able to take in one vector with one scope and return a new one with a new scope type. (These are called scope types). Of course you can add the scope type to your low level struct, or you can make a separate type to use for the higher level api (just a value type with the low level struct as it's field).

I think copying on mutating parameters might be the best option. Some of the functions take in pointers not to use as input but to instead use it as output. That way we can still retain the original vector if it gets mutated for output.

Yeah, it kind of depends on how many of the apis are mutating and whether they are "output parameters" or not. If it is just an output parameter, and not expected to be initialized, you can always allocate an empty array in a small c wrapper function, and not even expose the parameter in koka.

Of course you can always do the same as our vector apis, and copy only when the reference count of the parameter that is going to be mutated is > 1.

I'll work on the safe API layer after completing the rest of the layers as well as adding some Lapack bindings to make the library more complete.


Add support for untagged union types

While working on the Smithy specifications for OpenSearch we've come across a need to represent a field that may have more than one type. In this instance the field is int | boolean, which could be represented as a plain Document type in Smithy, but this would be too broad of a typing.
Our primary target from Smithy is OpenAPI where this could map onto a oneOf:
{
  "oneOf": [
    {"type": "integer"},
    {"type": "boolean"}
  ]
}

I understand that probably the largest challenge for adding this to the Smithy language is determining how to and implementing support for this in the various language generators. As we are only targeting OpenAPI an intermediary step of a trait that only affects OpenAPI translation may be a viable solution for now.

I don't think this is something we can ever reasonably support. You've already called out the difficulty in representing this in a variety of programming languages, and that is a critical issue that can't be ignored.
The way you would achieve the same effect in Smithy is to use a Document, as you mentioned, or to use a custom trait/protocol that knows to flatten unions in serialization.

You might also be interested in the Alloy library from disneystreaming supports untagged unions and integrates it with OpenAPI conversions: https://github.com/disneystreaming/alloy/blob/main/modules/core/resources/META-INF/smithy/unions.smithy#L54

I don't think this is something we can ever reasonably support. You've already called out the difficulty in representing this in a variety of programming languages, and that is a critical issue that can't be ignored.
The way you would achieve the same effect in Smithy is to use a Document, as you mentioned, or to use a custom trait/protocol that knows to flatten unions in serialization.

Is there a world where this is feasible if it's limited to only simply differentiable types? e.g. int | string, int | [int], [int] | map<string, int>, but structA | structB is disallowed.
Obviously still inconvenient to implement in some languages, but I feel would remove a lot of ambiguity in deserialization.

You can't necessarily know what's simply differentiable or not, it's highly dependant on the protocol. You could imagine an XML protocol that does things like <float value="1.3"/> / <int value="1> and so on to remove that ambiguity,  or similar for json. Ultimately whatever happens at the serialization layer is invisible to sdk and service tooling users, so while deserialization does matter it doesn't matter as much as long as it's deterministic. That's why Alloy's strategy of having an @untagged trait works - tooling users get the well-supported union types and the serialization layer is free to do what is must. They can attach validation to that trait to make sure their deserialization is deterministic, and if they want to convert to openapi they could write a plugin that handles the translation.

Closing as this is something we do not plan to support in Smithy.


Update level_1.py

pri_p was not defined in inc_rng:
pri_p = ip_[x-1]  #T. x is supposed to be > 0 ...

Todor, this loop is conditional on x>0, see above.
On Jun 4, 2017 11:38 AM, "Twenkid"<EMAIL_ADDRESS>wrote:

pri_p was not defined in inc_rng:
pri_p = ip_[x-1] #T. x is supposed to be > 0 ...
You can view, comment on, or merge this pull request online at:
https://github.com/boris-kz/CogAlg/pull/1
Commit Summary

Update level_1.py

File Changes

M level_1.py
https://github.com/boris-kz/CogAlg/pull/1/files#diff-0 (7)

Patch Links:

https://github.com/boris-kz/CogAlg/pull/1.patch
https://github.com/boris-kz/CogAlg/pull/1.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/boris-kz/CogAlg/pull/1, or mute the thread
https://github.com/notifications/unsubscribe-auth/AUAXGXB6DRgfR7B4C6tQmIw3uYsEHjJ0ks5sAs-AgaJpZM4NvaDW
.

Sorry, I had to add a new comment, but clicked Update. :)

OK, I saw what you mean, you update it using p after the comp.

Todor, are you talking about Le1() or inc_rng()?
in inc_rng() pri_p is part of last tuple, with range defined a >=0:
...
for x in range(r+1, W):
    p, fd, fv = ip_[x]       # compared to a pixel at x-r-1:
    pp, pfd, pfv = ip_[x-r]  # previously compared p(ignored), its fd, fv to next p
    fv += pfv  # fv is summed over extended-comp range
    fd += pfd  # fd is summed over extended-comp range

    **pri_p,** pri_fd, pri_fv = ip_[x-r-1]  # for comp(p, pri_p), pri_fd and pri_fv ignored

in Le1(), there already is an explicit x>0 and then assignment pri_p = p in the first run, when x=0.

Yes, I replied before I saw your last. It may be confusing but concise, which is my priority.
The logic of it may be even more confusing with redundant assignments.

Sorry, it's not more concise than yours, which I already use in inc_rng(). But it's more logical and faster because you don't need to access memory. You can use yours in your fork :).

OK. You're probably right about the access (I don't know how it's actually cached, but a local variable should be faster than a list redirection).
Regarding the conciseness:
Something that I find confusing/mind-overloading in reading the code are the excessively long tuples + very short names, which makes following which assigns to which harder.
Usually above a few or 5-7 parameters it gets too much and they are bundled in classes/structs, or at least they have more suggestive names.
That allows when one understands and knows all the members not to get distracted by thinking of each element every time, it's "complexity hiding".
We talked about the short identifiers, that's confusing/overloading also due to the lack of "discrimination detail". The code looks "the same".
So, I'll think about trying to convert the code to simple holder-classes.
Something like:
...
class  NPattern:
init(s, fd=0, fv=0, r=0, x=0, vP=[], dP=[]):
s.fd = fd; s.fv = fv; s.r = r; s.x = x;
s.vP = vP; s.dP = [];
etc.
(s is short for "self")
Then:
nP = NPattern() #default values
Then:
nP = NPattern();
vP = VPattern();
dP = DPattern();
There could be a bundle of all:
class Pattern:
init(s, NPattern nP, VPattern vP, DPattern dP):
s.nP = nP; s.vP = vP; s.dP = dP;
init(s): #default
s.nP = NPattern(); s.vP = VPattern(); s.dP = s.DPattern();
class InputVars:
init(s, p=0, pri_p=0, _p = [], ... )
s.p = p;
s.pri_p = pri_p;
... # _p, _d, _m, fd, fv, dy, my, x, y, _x, W, r, A,
also
class Compared:
#....
pri_s, I, D, V, rv, p_, ow, alt_,
pri_sd, Id, Dd, Vd, rd, d_, owd, dalt_,
x, ip, vP, dP_, vP, dP= \
class Queues:
#...
Then:
P = Pattern()
input = InputVars()
queues = ...
if x > 0:
compared =  comp(input, vP, dP, queues)
Otherwise we care for details such as are we sending the vars in the right order, is it small or capital p/v. ...
The accesses to members with the "." is also suggestive/helpful for the programmers to remind them where the var belongs:
nP.fd = ...
nP.fv = ...
As of efficiency - I assume that we are after correct and intelligible code for now.  That goes for other new contributors, too.  Otherwise we are making confused decisions - ancient-Assembly-style-like commands and identifiers in a very high level language.
I suspect that you find the tuples convenient for your style, but if you know how much and what types of variables you will send/receive, I think classes will do the same.
The tuples are more "careless", one doesn't have to define explicit types and set names to them.

 It hides relevant info that I want to have at a
glance. Because the code not fixed in stone, I improve all the time.
I segment variables into groups by splitting declarations into multiple
lines, and put group names and expanded variable names in comments.
You can split them into more lines with expanded comments, but black-boxing
will practically insure that people won't know what's inside. That's not
intelligible, and it makes the code way too rigid.
On Sun, Jun 4, 2017 at 4:21 PM, Twenkid<EMAIL_ADDRESS>wrote:

OK. You're probably right about the access (I don't know how it's actually
cached, but a local variable should be faster than a list redirection).
Regarding the conciseness:
Something that I find confusing/mind-overloading in reading the code are
the excessively long tuples + very short names, which makes following which
assigns to which harder.
Usually above a few or 5-7 parameters it gets too much and they are
bundled in classes/structs, or at least they have more suggestive names.
That allows when one understands and knows all the members not to get
distracted by thinking of each element every time, it's "complexity hiding".
We talked about the short identifiers, that's confusing/overloading also
due to the lack of "discrimination detail". The code looks "the same".
So, I'll think about trying to convert the code to simple holder-classes.
Something like:
...
class NPattern:
init(s, fd=0, fv=0, r=0, x=0, vP=[], dP=[]):
s.fd = fd; s.fv = fv; s.r = r; s.x = x;
s.vP = vP; s.dP = [];
etc.
(s is short for "self")
Then:
nP = NPattern() #default values
Then:
nP = NPattern();
vP = VPattern();
dP = DPattern();
There could be a bundle of all:
class Pattern:
init(s, NPattern nP, VPattern vP, DPattern dP):
s.nP = nP; s.vP = vP; s.dP = dP;
init(s): #default
s.nP = NPattern(); s.vP = VPattern(); s.dP = s.DPattern();
class InputVars:
init(s, p=0, pri_p=0, _p = [], ... )
s.p = p;
s.pri_p = pri_p;
... # _p, _d, _m, fd, fv, dy, my, x, y, _x, W, r, A,
also
class Compared:
#....
pri_s, I, D, V, rv, p_, ow, alt_,
pri_sd, Id, Dd, Vd, rd, d_, owd, dalt_,
x, ip, vP, dP_, vP, dP= \
class Queues:
#...
Then:
P = Pattern()
input = InputVars()
queues = ...
if x > 0:
compared = comp(input, vP, dP, queues)
Otherwise we care for details such as are we sending the vars in the right
order, is it small or capital p/v. ...
The accesses to members with the "." is also suggestive/helpful for the
programmers to remind them where the var belongs:
nP.fd = ...
nP.fv = ...
As of efficiency - I assume that we are after correct and intelligible
code for now. That goes for other new contributors, too. Otherwise we are
making confused decisions - ancient-Assembly-style-like commands and
identifiers in a very high level language.
I suspect that you find the tuples convenient for your style, but if you
know how much and what types of variables you will send/receive, I think
classes will do the same.
The tuples are more "careless", one doesn't have to define explicit types
and set names to them.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/boris-kz/CogAlg/pull/1#issuecomment-306064388, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AUAXGen7sY2A_nYXAFaKiwu5mI-g52B9ks5sAxGsgaJpZM4NvaDW
.

To me that's too many almost-the-same-name variables with "," for a glance and repetitive code, to me your code is hiding the actual processing with the syntax...
OOP (or just Structured programming) is not black boxing, it's also at a glance (after F12 in PyCharm or others) and you can change it all the time.
It hides the low level details only on site of usage at a higher level of abstraction, the low level implementation code of the classes is always there and you should understand it/read it first of course.
It's not stopping you for changing it, with PyCharm you go there with F12. It's in one place and you can always change the implementation details, while keeping the overall interface design, and one change will reflect all sites of usage (unlike retyping it). And when you want a fresh item, you won't type p, ps, pd, ... = (0, 0, 0, 0, ... [], []) but just pD = PD(). If you want to change the default values - click, F12, change - and now on all sites it would be (0,1,1, 0, ... [1], [0]) or whatever.
It also sets explicit and "active" names (not optional comments), which programmer uses (and remembers better) and that suggests thinking of these operations/sets of data together as a whole.
...
Well, if I don't get used to your style, I'll have to create a converter.

To me that's too many almost-the-same-name variables with "," for a glance
and repetitive code,

It looks almost-the-same until you know what they mean, and repetition
forces you to learn it.

to me your code is hiding the actual processing with the syntax...

It's just as important to know what's being processed.

OOP (or just Structured programming) is not black boxing, it's also at a
glance (after F12 in PyCharm or others) and you can change it all the time.
It hides the low level details only on site of usage at a higher level of
abstraction, the low level implementation code of the classes is always
there and you should understand it/read it first of course.

It's a matter of degree. It will get more structured with tuples on higher
levels, but there is a difference between being able to look and change,
vs. having it in your face all the time. The reality is that you won't
learn and change low-level details unless you have to look at them.

It's not stopping you for changing it, with PyCharm you go there with F12.
It's in one place and you can always change the implementation details,
while keeping the overall interface design, and one change will reflect all
sites of usage (unlike retyping it). And when you want a fresh item, you
won't type p, ps, pd, ... = (0, 0, 0, 0, ... [], []) but just pD = PD(). If
you want to change the default values - click, F12, change - and now on all
sites it would be (0,1,1, 0, ... [1], [0]) or whatever.

You don't have to type, there is a copy-paste. I will use tuples, etc., but
the first level is where you have to focus on everything.
And right now I am using it to design level_1_2D, where I do have to review
every variable at every step.
Well, if I don't get used to your style, I'll have to create a converter.

Go ahead,  but make sure you understand it first. You are right that there
should be simplified, more structured representation for beginners, but I
don't need it because it's already in my mind.
And it's very easy to do with tuples, I don't see any reason for added
complexity of classes.

You don't have to type, there is a copy-paste.

It's not the point, there's Intellisense etc. Copy-paste is distracting and a bad programming style. Usually it's done due to speed hacking/laziness to structure it.
This is a specific case, you have your preferred style and choices, but in general I think having 35 parameters and commas of hardly visually distinguishable identifiers makes you count commas and stare, rather than think about the semantics, which might be very simple with another notation, but now hidden or made harder to follow due to the comma_underscore overload.
https://en.wikipedia.org/wiki/Duplicate_code

You can do it in your fork, Todor, I will take a look.
On Mon, Jun 5, 2017 at 7:55 AM, Twenkid<EMAIL_ADDRESS>wrote:

You don't have to type, there is a copy-paste.
It's not the point, there's Intellisense etc. Copy-paste is distracting
and a bad programming style. Usually it's done due to speed
hacking/laziness to structure it.
This is a specific case, you have your preferred style and choices, but in
general I think having 35 parameters and commas of hardly visually
distinguishable identifiers makes you count commas and stare, rather than
think about the semantics, which might be very simple with another
notation, but now hidden or made harder to follow due to the
comma_underscore overload.
https://en.wikipedia.org/wiki/Duplicate_code
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/boris-kz/CogAlg/pull/1#issuecomment-306170288, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AUAXGcMgOUEp6A3MvTdQOSA5lpz7pcnnks5sA-yzgaJpZM4NvaDW
.

Interesting discussion. In context of OOP, I would say that for algorithms it is hardly a good match. Notion of type classes is more natural for description of the world. In context of readability, I would say that yes, it should be improved, but everything from algorithm point of view it is possible to define in algebraic way, topological way (algebraic or not, doesn't matter). The fair point, that intermediate experiments could be carried out any possible way. I like, for example, graph representation for its simplicity, that is why I deeply interested in spectral graph theory and relevant approaches. We would like groups, then explain it on graphs, we would like to deal with topology — define it as graph. Result of level 1 is essentially a graph. @boris-kz approach goes from low level to high level, guys in «Normalized Cuts and Image Segmentation» the other way trying to get global impression of an image.
I think that once formulated rigorously it would be possible to prove, that those approaches end up in the same results using mathematical induction.

@aloschilov , how would you improve level 1?

A small suggestion:
I think the "if x > 0" checks are not needed inside the cycle, they fail in all but the first pass.
It's better:
p = ip_[0]
pri_p = p
for x in range(1,X):  # cross-compares consecutive pixels, outputs sequence of d, m, v:
p = ip_[x]  # new pixel, for comp to prior pixel, could use pop()?
pri_s, I, D ...  =    comp(p, pri_p, ... )
pri_p = p
#if X < 1, the cycle will be skipped on its own, and you 2 pixels are needed for a comparison

Regarding Alexander's point - I also'd like different auxiliary or main representations and visualizations of the algorithm; shorter/generalized, flowcharts, various graphs/call graphs and views, and AST - https://en.wikipedia.org/wiki/Abstract_syntax_tree - or other more abstract, obvious and "meta" models that would generate that code and justify the existence of the variables step-by-step from other simple representations and other kind of search.
It could be some custom-type specifically induced AST model, appropriate for the semantics of that code. It may possibly be something like an editor/IDE that's adjusted and it generates code, schematics.
I'm digging in these directions in order to improve productivity.
Saying  "schematics" - I think the enormous amount of parameters in calls is appropriate for digital logic designs, thus if you don't want to compress them in the notation, I think block diagrams/tables with connection lines and tuples as "buses" may feel more clear and easier to read and remember.
https://www.google.bg/search?q=block+diagram+cpu+pins&biw=1455&bih=756&tbm=isch&imgil=9xb8r2L6l0r_CM%253A%253BXvM1MJUX7GMTtM%253Bhttps%25253A%25252F%25252Fwww.tutorialspoint.com%25252Fcomputer_logical_organization%25252Fcpu_architecture.htm&source=iu&pf=m&fir=9xb8r2L6l0r_CM%253A%252CXvM1MJUX7GMTtM%252C_&usg=__aYBkU5hQEHG7RQJRrbeTArQhZaY%3D#imgrc=_

Thanks, Todor,
You are probably right about "if x > 0", but does this test incur any performance penalty?
Regarding schematics, I personally don't need them, but if it helps others, great.
Let me know when you have something, or want to talk.

You are right, except that it should be direct pri_p = ip_[0].

Right.  I kept p = ip[0] in order not to hide the sequence of transferring the value.

BTW, does "if x > 0" incur any performance penalty on current microprocessors?

I don't know. We may consider basic profiling tests, it's not complicated, a few "time" routines.
It's possible that the interpreter/compiler figures out that x only grows so that it stops checking it. Also  it's a tiny fraction of the computation, comp() and the inc_... functions are the core, so it won't make a big difference for now.
One of the biggest performance bottlenecks IMO is the usage of so many parameters to the functions, that's not only a readability issue.
I'm not sure about Python's internals, Python is slow anyway, but in bare-metal calls in C/C++ setting (x86, 64-bit), the calls to subroutines that have more than 4 input parameters on Windows,  and 6 integers + more floats  under Linux, access the stack (RAM, probably L1 or L2 cache) instead of direct passing through the registers.

Those parameters are future selection criteria. They are partly redundant,
but which ones are pruned should depend on evaluation on higher levels.
It's an upfront investment in the quality of subsequent selection, which
will speed-up higher levels.
On Sat, Jun 10, 2017 at 6:01 AM, Todor Arnaudov<EMAIL_ADDRESS>wrote:

You are right, except that it should be direct pri_p = ip_[0].
Right. I kept p = ip[0] in order not to hide the sequence of transferring
the value.
BTW, does "if x > 0" incur any performance penalty on current
microprocessors?
I don't know. We may consider basic profiling tests, it's not complicated,
a few "time" routines.
It's possible that the interpreter/compiler figures out that x only grows
so that it stops checking it. Also it's a tiny fraction of the computation,
comp() and the inc_... functions are the core, so it won't make a big
difference for now.
One of the biggest performance bottlenecks IMO is the usage of so many
parameters to the functions, that's not only a readability issue.
I'm not sure about Python's internals, Python is slow anyway, but in
bare-metal calls in C/C++ setting (x86, 64-bit), the calls to subroutines
that have more than 4 input parameters on Windows, and 6 integers + more
floats under Linux, access the stack (RAM, probably L1 or L2 cache) instead
of direct passing through the registers.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/boris-kz/CogAlg/pull/1#issuecomment-307555464, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AUAXGXdLaN2_5QUhj26wE4FitPB0zTyMks5sCmmMgaJpZM4NvaDW
.

My point was not about not sending them. If they are packed and sent as reference/pointer, during the call they will occupy one or a few addresses and be sent by registers, instead of a line of values pushed to the stack, then read back in the beginning of the function that's called a million time per image.
Performance-wise, for the parts without recursion, some functions could be put inline in order to save on calls and unnecessary transfers of the values of parameters, but that's better done after the algorithm is clear, or if we manage to automate it.
(Usually recursion could be "unrolled" as well, but it might be more complicated and require us to built an artificial stack to store and retrieve the intermediate results.)
https://en.wikipedia.org/wiki/Inline_expansion

Yes, I will pack them into formal tuples. It's just a bit too fluid at this point, and actual code will be in level_1_2D.

@boris-kz
There is some sense in https://en.wikipedia.org/wiki/Cosine_similarity, especially taking into consideration https://ru.wikipedia.org/wiki/Коэффициент_Отиаи . This would allow you to get a rid of dimensions issue. At least such measure could allow to compare patterns.
What to compare on pixels level?
<x, y, weight> treating it as special case of feature vector.
Going further similarity could be closer to the second link provided.
It would allow to address clustering in context of similarity measure and would allow to address classification all the same, since allow to measure possibility, probability.
The main drawback of current implementation of level 1 from what I see, that grouping only consequent elements would not meet criteria of noise stability, the same is true for gradient approach, which guys used at ski learn kit example. According to the first impression noise instability also impacts https://en.wikipedia.org/wiki/Convolutional_neural_network.
It would guarantee fuzziness you was interested in.

Alexander,

I don't want to guarantee fuzziness, it should be optional. Because the
level of noise should be learned. Such noise is represented in level_1 as
min_r, which is a feedback. Assuming higher-than-actual level of noise
means treating informative inputs as noise, which will needlessly degrade
resolution.

I plan to use some sort of cosine similarity to compare 2D patterns, that
will probably be level_2_2D. There is no need for it on level_1_2D (and
especially on level_1), because pixel "vectors" are orthogonal.

My approach is comparison-first, which forms patterns, and probability is
replaced by averages per summed-variable per pattern. Basically, pattern is
a non-arbitrarily-defined sample, which obviates statistical methods.

Appreciate your interest!
On Mon, Jun 12, 2017 at 10:16 PM, Alexander Loschilov <
<EMAIL_ADDRESS>wrote:

@boris-kz https://github.com/boris-kz
There is some sense in https://en.wikipedia.org/wiki/Cosine_similarity,
especially taking into consideration https://ru.wikipedia.org/wiki/
Коэффициент_Отиаи . This would allow you to get a rid of dimensions
issue. At least such measure could allow to compare patterns.
What to compare on pixels level?
<x, y, weight> treating it as special case of feature vector.
Going further similarity could be closer to the second link provided.
It would allow to address clustering in context of similarity measure and
would allow to address classification all the same, since allow to measure
possibility, probability.
The main drawback of current implementation of level 1 from what I see,
that grouping only consequent elements would not meet criteria of noise
stability, the same is true for gradient approach, which guys used at ski
learn kit example. According to the first impression noise instability also
impacts https://en.wikipedia.org/wiki/Convolutional_neural_network.
It would guarantee fuzziness you was interested in.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/boris-kz/CogAlg/pull/1#issuecomment-307986766, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AUAXGZSHEamCSkstEx5_QKA8yB3MAsvSks5sDfDzgaJpZM4NvaDW
.

OK, I did some packing / unpacking with vP and dP in ycomp() of level_1_2D.py, how does it look?

Thanks. :)

Boris, I don't understand the intent of this code:  @boris-kz
def ycomp(t_, t, fd, fv, x, y, X, Y, a, r, vP, dP, vP, dP_, vP, dP):
...
dolp_ = dP[8]
...
dP is defined as a hash table:
def Le1(f):
,,,
fd, fv, x, y, vP, dP, vP, dP_, vP, dP, F_  = 0,0,0,0, {},{}, [],[],[],[],[]
However:
dolp_ = dP[8]
... is reading the 8-th element from an expected list.
dolp_ also is supposed to be a list (by the naming convention),  so if you want to use it like that, it should be declared:
dolp_ = []
Then:
dolp_.append(...)
Or maybe it's supposed to be:
dolp_ = dP_[8]
the 8-th element of dP_ is supposed to be an array itself?
?

Todor,
...

dolp_ = dP[8]
...
dP is defined as a hash table:
def Le1(f):
,,,
fd, fv, x, y, vP, dP, vP, dP_, vP, dP, F_ = 0,0,0,0, {},{},
[],[],[],[],[]

I thought that's a tuple, is that the same? Tuple elements can also be
accessed by position? PyCharm doesn't give me an error, though I didn't try
to run it.
However:

dolp_ = dP[8]
... is reading the 8-th element from an expected list.

I meant it as 9th element, starting from 0?
dolp_ also is supposed to be a list (by the naming convention), so if you

want to use it like that, it should be declared:
dolp_ = []

Yes, I had that before switching to tuples. Not sure it's necessary, I
don't get an error and already have it in line 100:
Id, Dd, Ddy, Md, Mdy, Dq, d_, dolp_, olp, dolp = 0,0,0,0,0,0, [],[], 0,0 #
init. dP and olp

Then:
dolp_ = dP_[8]
the 8-th element of dP_ is supposed to be an array itself?

I guess I can always convert a tuple into list, if that's necessary. The
only difference is security: tuples are immutable.

That:
fd, fv, x, y, vP, dP, vP, dP_, vP, dP, F_  = 0,0,0,0, {},{}, [],[],[],[],[]
would be a tuple if there's an assignment:

t = fd, fv, x, y, vP, dP, vP, dP_, vP, dP, F_  = 0,0,0,0, {},{}, [],[],[],[],[]
t
(0, 0, 0, 0, {}, {}, [], [], [], [], [])
t[9]
[]
t[8]
[]
t[5]
{}
t[4]
{}

However dP is defined as a dictionary {}
Without an assignment, that's declaration and initialization of many variables in one line:

fd, fv, x, y, vP, dP, vP, dP_, vP, dP, F_  = 0,0,0,0, {},{}, [],[],[],[],[]
fd
0
dP
{}

Yes, the 9-th, if you count [0]as "the first", I thought of it as the "0-th"...

As an initial comprehension, is there any difference between tuple and
dictionary?
Assignment follows comprehension, in this case in line 100. I didn't
initialize it in the beginning because PyCharm did not show it as an error,
so I thought it can figure what it is with multi-pass.
On Fri, Jun 16, 2017 at 9:08 PM, Todor Arnaudov<EMAIL_ADDRESS>wrote:

That:
fd, fv, x, y, vP, dP, vP, dP_, vP, dP, F_ = 0,0,0,0, {},{},
[],[],[],[],[]
would be a tuple if there's an assignment:
t = fd, fv, x, y, vP, dP, vP, dP_, vP, dP, F_ = 0,0,0,0, {},{},
[],[],[],[],[]
t
(0, 0, 0, 0, {}, {}, [], [], [], [], [])
t[9]
[]
t[8]
[]
t[5]
{}
t[4]
{}
However dP is defined as a dictionary {}
Without an assignment, that's declaration and initialization of many
variables in one line:
fd, fv, x, y, vP, dP, vP, dP_, vP, dP, F_ = 0,0,0,0, {},{},
[],[],[],[],[]
fd
0
dP
{}
Yes, the 9-th, if you count [0]as "the first", I thought of it as the
"0-th"...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/boris-kz/CogAlg/pull/1#issuecomment-309180171, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AUAXGeKxx_GYdTd4VoJ6a5R_a1Gn0d7Mks5sEycegaJpZM4NvaDW
.

Yes. Tuples are an ordered list of variables, where the identifiers are not saved.
A dictionary (hash table) is an unordered set of key-value pairs.  The value is normally read by the key.
d = {}
d['some'] = 734
or d['fd'] = 0
OK, I assume you mean that (it's line 102 in my view)
        _o = len(dP_), dolp  # len(dP_) is index of current dP, dolp formed by comb_P()
        olp_.append(o)  # index and dolp of terminated dP is buffered at current vP_

        Id, Dd, Ddy, Md, Mdy, Dq, d_, **dolp_,** olp, dolp = 0,0,0,0,0,0, [],[], 0,0  # init. dP and olp

Then:
dP = pri_sd, Id, Dd, Ddy, Md, Mdy, Dq, d_, dolp, dolp_
Thus:
dP[8] holds dolp_, an empty list
Some error messages with tuples from my console:

t[dP]
Traceback (most recent call last):
File "", line 1, in
TypeError: tuple indices must be integers or slices, not dict
t["dP"]
Traceback (most recent call last):
File "", line 1, in
TypeError: tuple indices must be integers or slices, not str

Ok, so there is no comprehension for tuples, I just declared vP and dP in Le1().
Is this vP and dP packing actually worth it, either for speed or for clarity?

I don't know, if you mean this:
t = (a,b) = (1,2)
It does, this keeps both a,b as separate identifiers, and their values go to the tuple as t[0], t[1].
Clarity -  yes, speed - I don't know.
BTW, I noticed that: ycomp() returns the lists of patterns:
return vP_, dP_  # or vC2_, dC2_ formed by comb_P and then cons_P2?
However this value is not fetched from the caller side:
for y in range(1, Y):
    p_ = f[y, :]  # y is index of new line ip_
    t_ = comp(p_, X)
    **ycomp(t_, _t_, fd, fv, _x, y, X, Y, a, r, vP, dP, vP_, dP_, _vP_, _dP_)**
    # internal comb_P()) cons_P2(): triggered by P2) C2 termination
    _t_ = t_

Lists are sent by address, so the content is changed without reading it back.
A small test:
s = [1,2,4,8]
def f(a):
a.append(16)
return(a)

f(s)
[1, 2, 4, 8, 16]
s
[1, 2, 4, 8, 16]
s = f(s)
s
[1, 2, 4, 8, 16, 16]

return vP_, dP_ # or vC2_, dC2_ formed by comb_P and then cons_P2?
However this value is not fetched from the caller side:

Yes, I just changed this to:
vP_, dP_ = ycomp(t_, t, fd, fv, x, y, X, Y, a, r, vP, dP, vP, dP_,
vP, dP)
I didn't pay much attention to this because I am still figuring comb_P2(),
which is called from ycomp() when the patterns are terminated.
There is an issue of possible "forking" into multiple same-sign patterns
and how to account for resulting redundancy.
Are you available to talk about it?

I'm afraid I'm not prepared yet, I lack the needed intuition.
I still haven't resolved the task for rendering better-representations-for-me  - have been researching graph visualisation /  automatic parser generators / call graph generators (eventually making a custom IDE for CogAlg).
I've been also improving my computer vision/openCV/numpy/... expertise.

Intuition doesn't fall from the sky, that's why we need to talk. I don't
think you need visualisation, either of the code or of the results. My
approach is almost immediately symbolic, you need to understand the symbols
and the reasoning behind them. That's what theory-first means.
On Sun, Jun 18, 2017 at 9:12 AM, Todor Arnaudov<EMAIL_ADDRESS>wrote:

I'm afraid I'm not prepared yet, I lack the needed intuition.
I still haven't resolved the task for rendering
better-representations-for-me - have been researching graph visualisation /
automatic parser generators / call graph generators (eventually making a
custom IDE for CogAlg).
I've been also improving my computer vision/openCV/numpy/... expertise.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/boris-kz/CogAlg/pull/1#issuecomment-309276951, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AUAXGXfznVGjYCz4QMMQmXy5h4-UKk_Nks5sFSJEgaJpZM4NvaDW
.

Yes, by intuition I mean experience with the code, I've not read it much, so let me do it.
Visualizations, graphs etc. are to make it easier and faster and to refactor and convert the code. I want it more connected with obvious sequences of relations and transformations.

As of  the comment:
for x in range(1, X):  # cross-compares consecutive pixels
    **p = p_[x]  # new pixel, comp to prior pixel, pop() is faster?**

Pop() removes the last element (p_[X-1]) and will reduce the length at each step.

f=[1,2,3]
d = f.pop()
d
3
f
[1, 2]

With an index, it's like this:

f=[1,2,3]
d = f.pop(1)
f
[1, 3]

So the query would be:
p = p_.pop(1)
... for all steps.
I doubt a deletion of an internal element would be faster than reading, it requires addressing it anyway, then deletion.
In general, once we have complete code, I think we (me) should convert it to C/C++.

I am pretty sure pop() is faster, because index has a fixed increment
(doesn't need to be computed). Deletion is probably not performed, this is
more like a mapping operation in functional programming.
That's the point of these built-in functions: they are optimized for speed.
BTW, it's p = p_.pop(), increment is assumed to be 1 unless otherwise
specified.
I think there are plenty of tools for conversion to C (or maybe Go), but
they work better if python code is optimized.
On Sun, Jun 18, 2017 at 5:24 PM, Todor Arnaudov<EMAIL_ADDRESS>wrote:

As of the comment:
for x in range(1, X): # cross-compares consecutive pixels
**p = p_[x]  # new pixel, comp to prior pixel, pop() is faster?**

Pop() removes the last element (p_[X-1]) and will reduce the length at
each step.
f=[1,2,3]
d = f.pop()
d
3
f
[1, 2]
With an index, it's like this:
f=[1,2,3]
d = f.pop(1)
f
[1, 3]
So the query would be:
p = p_.pop(1)
... for all steps.
I doubt a deletion of an internal element would be faster than reading, it
requires addressing it anyway, then deletion.
In general, once we have complete code, I think we (me) should convert it
to C/C++.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/boris-kz/CogAlg/pull/1#issuecomment-309303911, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AUAXGZWRnHYtdj8V9fJkfrjcbq37o6XEks5sFZWUgaJpZM4NvaDW
.

The docs and test show it removes the last element, thus if you use .pop() the input has to be stored and scanned in reverse order.
https://docs.python.org/3.6/tutorial/datastructures.html
list.pop([i])
Remove the item at the given position in the list, and return it. If no index is specified, a.pop() removes and returns the last item in the list. (The square brackets around the i in the method signature denote that the parameter is optional, not that you should type square brackets at that position. You will see this notation frequently in the Python Library Reference.)

The  fast Python is Cython:  http://cython.org/#documentation
http://notes-on-cython.readthedocs.io/en/latest/std_dev.html

The docs and test show it removes the last element, thus if you use .pop()
the input has to be stored and scanned in reverse order.

That's fine, I won't be reusing initial input queue. Those inputs will be
stored in p_ per new pattern anyway.

The fast Python is Cython: http://cython.org/#documentation
http://notes-on-cython.readthedocs.io/en/latest/std_dev.html

That's cool, but not urgent. I think built-in functions are already in C
anyway. And PyPy may come along obviate it soon enough.

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/boris-kz/CogAlg/pull/1#issuecomment-309411087, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AUAXGSz1czoYQSNOiQE9b4hk4vcJ8p2Iks5sFlkggaJpZM4NvaDW
.

comb_P( ...
P.reverse(); P += x_buff_; P.reverse() # front concat for next P comp

P.append(x_buff_) ?

In the draft part:

if m_dw_ddx > a: _S /= cos (ddx)

_S is not defined. Is it something among these (m_dw, ... ) / ddx?

Or it should be initialized with 1 or something?

What's the name behind "S"? It appears near "s" code?, but more likely related to  "coS"?

Also this "a" (average) is supposed to fed/computed from somewhere, isn't it?

def cons_P2(P): # at CP2 term, sub-level 4? ...

I see it is a draft, what it's supposed to return?

comb_P( ...

No, you can't append a list to a list

In the draft part:
if m_dw_ddx > a: _S /= cos (ddx)

_S is not defined. Is it something among these (m_dw, ... ) / ddx?

S is my generic term for summed variables: I, D, M...

Also this "a" (average) is supposed to fed/computed from somewhere,
isn't it?

Yes, this is an average specific to a given variable, I haven't fully
defined it yet

def cons_P2(P): # at CP2 term, sub-level 4? ...
I see it is a draft, what it's supposed to return?

cons_P2() is supposed to normalize P2s (2D patterns) for the angle of
scanning, by */ cos(dx) and possibly re-scanning the blob.
So, it will return replacement P2s.
This is why we need to talk, Todor.

Boris, please stop with the "surely careless nonsense" priming.

you deleted the underscores, it is:
P.reverse(); P += x_buff_; P.reverse() # front concat for next P comp

Why should I delete the underscores? They are used by the editor as a markup symbol with the star, I put the code in "code" section once I found it a minute later, you've seen the draft.
OK, in Python + for a list is append.

cons_P2() is supposed to normalize P2s (2D patterns) for the angle of
scanning, by */ cos(dx) and possibly re-scanning the blob.
So, it will return replacement P2s.

This is why we need to talk, Todor.

I'll attend that "lecture", but the less I've studied the code, the more it would be a listening.
It could be this afternoon, I'll be in the hangouts if I'm available.

you deleted the underscores, it is:
P.reverse(); P += x_buff_; P.reverse() # front concat for next P
comp
Why should I delete the underscores? They are used by the editor as a
markup symbol with the star,

You did it again, get a better editor.

It's just quote of your answer. "Get a better editor" - blame github.

Blame also your naming convention, underscores in the beginning and the end of an identifier is a bad style, it's usually used only for automatically generated code or at least with a number or a name, а_1, а_2, а_3, but not as a last or first character.

So github converts it when you quote code? That's nuisance. I want to keep the underscores, it's the least cluttering symbol.

Yes:
_P_
Becomes
P
They are kept with the <> section - insert code.

Thanks.

The markdowns might be useful, though:
https://guides.github.com/features/mastering-markdown/
https://help.github.com/articles/basic-writing-and-formatting-syntax/
function fancyAlert(arg) {
  if(arg) {
    $.facebox({div:'#foo'})
  }
}

(but it seems not to color the Python?)
Unordered

Item 1
Item 2

Item 2a
Item 2b

Ordered

Item 1
Item 2
Item 3

Item 3a
Item 3b

Task Lists

[x] @mentions, #refs, links, formatting, and tags supported
[x] list syntax required (any unordered or ordered list supported)
[x] this is a complete item
[ ] this is an incomplete item

Thanks, let's use <> for now.
On Wed, Jun 21, 2017 at 8:07 AM, Todor Arnaudov<EMAIL_ADDRESS>wrote:

The markdowns might be useful, though:
https://guides.github.com/features/mastering-markdown/
https://help.github.com/articles/basic-writing-and-formatting-syntax/
function fancyAlert(arg) {
if(arg) {
$.facebox({div:'#foo'})
}
}
(but it seems not to color the Python?)
Unordered

Item 1
Item 2

Item 2a
Item 2b

Ordered

Item 1
Item 2
Item 3

Item 3a
Item 3b

Task Lists

@mentions, #refs, links, formatting, and tags supported
list syntax required (any unordered or ordered list supported)
this is a complete item
this is an incomplete item

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/boris-kz/CogAlg/pull/1#issuecomment-310058677, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AUAXGekIPOZNXOqRPxYvJj1pd6UtoMvRks5sGQeUgaJpZM4NvaDW
.


enhancement recommendation

Back in the old 1.12 enderio days, one of the versions allowed a block icon to be dragged onto the travel anchor. I think this made for a great quality of life feature, as it made traveling around a mega-base easier/more aesthetically pleasing.
would be great to see Icon support added as a milestone for future dev. depending on licensing, you may be able to even use some of the EnderIO code for this.

like that idea, would be less clutter and covering everything up.. or a key that has to be pressed for the names of the anchors to show.


line labels are not rendered correctly in live editor

Hi,
Consider this simple example: http://knsv.github.io/mermaid/live_editor/#/edit/Z3JhcGggTFIKQS0tPnx0ZXN0fEI7
graph LR
A-->|test|B;

in the live editor this renders like

But in the documentation all the examples i can see have a background set for the arrow labels. Am i missing a flag to enable these ? Browser versions here are FF 45.2.0 and Chrome 51

Thanks for the report and sorry about the late response. This is matter of configuration in the editor code and should be fixed.

Fixed.

How can i set the background color of lable?

@xiaoxiao426 This issue is 3 years old. Please, check the documentation or open a new issue if you need to.


Autopush is miserably slow...

I believe it's just the compilation step that's so laggy...

Try
couchapp autopush --update-delay 0

The default delay is 5 secs.


tests/language/accessor_conflict_export_test.dart crashes rastak_developer

The crash is actually in dart2js:
Assertion failure: Unexpected erroneous element <x: Duplicate export of 'x'.
Try adding 'hide x' to one of the exports.>.
#0      invariant (package:compiler/src/diagnostics/invariant.dart:60:5)
#1      ResolverVisitor.handleResolvedSend (package:compiler/src/resolution/members.dart:2833:14)
#2      ResolverVisitor.handleUnqualifiedSend (package:compiler/src/resolution/members.dart:2938:14)
#3      ResolverVisitor.visitSend (package:compiler/src/resolution/members.dart:2976:14)
#4      Send.accept (package:compiler/src/tree/nodes.dart:620:38)
#5      CommonResolverVisitor.visit (package:compiler/src/resolution/resolution_common.dart:35:54)
#6      ResolverVisitor.resolveArguments (package:compiler/src/resolution/members.dart:698:33)
#7      ResolverVisitor.handleStaticOrTopLevelAccess (package:compiler/src/resolution/members.dart:2606:41)
#8      ResolverVisitor.handleStaticMemberAccess (package:compiler/src/resolution/members.dart:1832:14)
#9      ResolverVisitor.handlePrefixSend (package:compiler/src/resolution/members.dart:2207:33)
#10     ResolverVisitor.handleQualifiedSend (package:compiler/src/resolution/members.dart:2321:14)
#11     ResolverVisitor.visitSend (package:compiler/src/resolution/members.dart:2973:14)
#12     Send.accept (package:compiler/src/tree/nodes.dart:620:38)
#13     CommonResolverVisitor.visit (package:compiler/src/resolution/resolution_common.dart:35:54)
#14     ResolverVisitor.visitExpressionStatement (package:compiler/src/resolution/members.dart:531:5)
#15     ExpressionStatement.accept (package:compiler/src/tree/nodes.dart:1587:38)
#16     CommonResolverVisitor.visit (package:compiler/src/resolution/resolution_common.dart:35:54)
#17     ResolverVisitor.visitNodeList (package:compiler/src/resolution/members.dart:3512:7)
#18     NodeList.accept (package:compiler/src/tree/nodes.dart:827:38)
#19     CommonResolverVisitor.visit (package:compiler/src/resolution/resolution_common.dart:35:54)
#20     ResolverVisitor.visitIn (package:compiler/src/resolution/members.dart:494:31)
#21     ResolverVisitor.visitBlock (package:compiler/src/resolution/members.dart:514:5)
#22     Block.accept (package:compiler/src/tree/nodes.dart:883:38)
#23     CommonResolverVisitor.visit (package:compiler/src/resolution/resolution_common.dart:35:54)
#24     ResolverTask.resolveMethodElementImplementation.<anonymous closure> (package:compiler/src/resolution/resolution.dart:259:17)
#25     CompilerDiagnosticReporter.withCurrentElement (package:compiler/src/compiler.dart:1604:15)
#26     ResolverTask.resolveMethodElementImplementation (package:compiler/src/resolution/resolution.dart:215:21)
#27     ResolverTask.resolveMethodElement.<anonymous closure> (package:compiler/src/resolution/resolution.dart:329:16)
#28     CompilerDiagnosticReporter.withCurrentElement (package:compiler/src/compiler.dart:1604:15)
#29     ResolverTask.resolveMethodElement (package:compiler/src/resolution/resolution.dart:293:21)
#30     ResolverTask.resolve.<anonymous closure> (package:compiler/src/resolution/resolution.dart:100:32)
#31     CompilerTask.measure (package:compiler/src/common/tasks.dart:69:46)
#32     ResolverTask.resolve (package:compiler/src/resolution/resolution.dart:80:12)
#33     _CompilerResolution.computeWorldImpact.<anonymous closure> (package:compiler/src/compiler.dart:2007:61)
#34     _HashVMBase&MapMixin&&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:259)
#35     _CompilerResolution.computeWorldImpact (package:compiler/src/compiler.dart:2003:30)
#36     Compiler.analyzeElement.<anonymous closure> (package:compiler/src/compiler.dart:1077:23)
#37     CompilerDiagnosticReporter.withCurrentElement (package:compiler/src/compiler.dart:1604:15)
#38     CompilerTask.measureSubtaskElement (package:compiler/src/common/tasks.dart:211:20)
#39     Compiler.analyzeElement (package:compiler/src/compiler.dart:1064:19)

Similar problem in third_party/dart-sdk/tests/language/accessor_conflict_export2_test.dart.


Implement Pinning and Unpinning Multiple Notes

Description
This PR introduces the functionality to pin and unpin multiple notes at once. Users can now select multiple notes and perform the following actions:
Pin multiple notes: Selected notes will be pinned and displayed at the top of the list.
Unpin multiple notes: Pinned notes can be unpinned and will return to their original positions in the notes list.

Fixes #183

Type of change
-feature addded
Screen Recording :
Screencast from 2024-10-15 11-59-38.webm
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation update
[ ] Tests update

Checklist

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] My changes generate no new warnings
[ ] New and existing unit tests pass locally with my changes
[ ] I have maintained a clean commit history by using the necessary Git commands
[ ] I have checked that my code does not cause any merge conflicts

Screenshots (if applicable)
Add screenshots to help explain the changes (if necessary).

badiya @Saurabhchaudhary9799 💯


docs: why not recommend conda instead of pip pyobc?

Twice gave up using pyautogui on mac because could not get pip pyobjc to compile
conda install -c jcarlin pyobjc-framework-quartz=3.0.4
worked like a charm in a couple of seconds
love pyautogui!!!!

pyobjc has some problems installing on El Capitan, I was able to get it to install by doing:
MACOSX_DEPLOYMENT_TARGET=10.11 pip install pyobjc
your milage may vary.

Could you write up detailed steps for doing this and make a documentation PR?

Closing this, as I think the issue with pyobjc is fixed now.


32 tasks for NEURON tests

Description
Please include a summary of the change and which issue is fixed or which feature is added.

[ ] Issue 1 fixed
[ ] Issue 2 fixed
[ ] Feature 1 added
[ ] Feature 2 added

Fixes # (issue)
How to test this?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce if there is no integration test added with this PR. Please also list any relevant details for your test configuration
cmake ..
make -j8
nrnivmodl mod
./bin/nrnivmodl-core mod
./x86_64/special script.py
./x86_64/special-core --tstop=10 --datpath=coredat

Test System

OS: [e.g. Ubuntu 20.04]
Compiler: [e.g. PGI 20.9]
Version: [e.g. master branch]
Backend: [e.g. CPU]

Use certain branches in CI pipelines.

CI_BRANCHES:NEURON_BRANCH=master,NMODL_BRANCH=master,SPACK_BRANCH=develop

Addressing this behind the scenes in hpc/gitlab-pipelines!62 instead.


Triangulation redesign

Main focus: Get the coordinates for a location I can see in the distance
Secondary focus: Get my location if my GPS isn't working

[x] Choose between determining my location or a distant location (destination?)
[x] Default to determining destination
[ ] Show image that indicates what will need to be done (on first open / in guide, available in a help option)
[ ] If determining my location, ask if they want to use GPS to do so (snackbar)
[ ] Add instructions to each location
[x] Display as an accordion view
[ ] Show completion status in accordion view title
[ ] Retain previous state (with reset button) - allows for putting your phone away while moving to a new location
[x] Triangulate a distant location (#1445)
[x] Display camera preview if permission is granted (otherwise show a button to use camera) (#1186)
[ ] Draw on a mapview so it is easier to visualize what is going on
[ ] Display distance on the map (or next to each entered location) so the user can ensure it looks accurate
[ ] Rename beacon to known location on triangulation tool
[ ] Add label to triangulation buttons
[ ] Consider a new location input view for the destination picker (my location input): It has a button to "Use my location" and a small link to set location manually

Instructions:
Destination

You want to know the coordinates of a place you can see.

Location 1

Record your location and the direction to the destination.

Location 2

Ensure you are at least X ft from the first location and record your location and the direction to the destination again.

My location

You don’t know where you are, but can see at least 2 places that you know the location of. Only use this if you are unable to get an accurate GPS reading.

Location 1

Choose a known location that you can see and record the direction from where you are to that location.

Location 2

Choose another known location that you can see and record the direction from where you are to that location.

I also need to restyle the accordion view for better readability / space usage


Process script updates one by one

Previously we assembled the complete history of all batches and then processed all updates.
With this change we now process them one by one, update the state and only accumulate the events that are ready.
The state update is cheap and can be done as part of processing the request.
Handling the CFD update could be done outside of sync, but we could regard that update as part of sync.
Only once the CFD is updated the sync is actually complete, because only then the state is communicated in the system, so it might be better to keep that within this scope.

@luckysori I did another iteration on this, because I was not convinced anymore that processing the CFD update should not be in scope of sync. I don't think we have to trigger another sync while we are still updating the CFDs with the result of the previous sync.
I found a simpler solution for optimizing the memory consumption further, while not moving the CFD update outside, I think it's good enough to aim for that. The changeset is smaller.

Looks like this is not actually an optimization, see: https://github.com/itchysats/itchysats/pull/3197#issuecomment-1282219467

Closing this for now, because we don't see an actual performance improvement by this code.


Added missing SQL Keywords and stopped autocapitalisation of backslash preceded keywords

Extracted the keywords from https://crate.io/docs/reference/sql/sql.html and from https://crate.io/docs/reference/sql/reference/lexical_structure.html#key-words-and-identifiers

Codecov Report

Merging #175 into master will increase coverage by 0.04%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #175      +/-   ##
==========================================
+ Coverage   81.11%   81.15%   +0.04%
==========================================
  Files          16       16
  Lines        1859     1863       +4
==========================================
+ Hits         1508     1512       +4
  Misses        351      351

Impacted Files
Coverage Δ

src/crate/crash/repl.py
51.56% <100%> (ø)
:white_check_mark:

src/crate/crash/test_repl.py
100% <100%> (ø)
:white_check_mark:

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 980778c...41767f8. Read the comment docs.

Coverage increased (+0.04%) to 81.267% when pulling 41767f86393cfc811c0f0b41d7393308c43dc9cf on mika/keywordsBackslash into 980778ca11ac4b999c2f232edae65961e994856f on master.

Coverage increased (+0.04%) to 81.267% when pulling 41767f86393cfc811c0f0b41d7393308c43dc9cf on mika/keywordsBackslash into 980778ca11ac4b999c2f232edae65961e994856f on master.

Coverage increased (+0.05%) to 81.277% when pulling a1fbf8a83df0a3f75d08f097407bb4fce7c22d93 on mika/keywordsBackslash into 980778ca11ac4b999c2f232edae65961e994856f on master.

Coverage increased (+0.05%) to 81.277% when pulling a1fbf8a83df0a3f75d08f097407bb4fce7c22d93 on mika/keywordsBackslash into 980778ca11ac4b999c2f232edae65961e994856f on master.

Coverage increased (+0.06%) to 81.287% when pulling f5b8ff3b8b83302994d0cea8bde8b0d29fa08599 on mika/keywordsBackslash into 980778ca11ac4b999c2f232edae65961e994856f on master.

Coverage increased (+0.06%) to 81.287% when pulling f5b8ff3b8b83302994d0cea8bde8b0d29fa08599 on mika/keywordsBackslash into 980778ca11ac4b999c2f232edae65961e994856f on master.

Coverage increased (+0.06%) to 81.287% when pulling f5b8ff3b8b83302994d0cea8bde8b0d29fa08599 on mika/keywordsBackslash into 980778ca11ac4b999c2f232edae65961e994856f on master.

Coverage increased (+0.06%) to 81.287% when pulling fd4334c22e134f888c2e5c9038beee08327851e8 on mika/keywordsBackslash into 980778ca11ac4b999c2f232edae65961e994856f on master.


chore: fix package.meta.docs.rs for fdb crate

fdb crate's package.meta.docs.rs should use fdb-7_1 for
features so that experimental features documentation shows up on
docs.rs.

Codecov Report

Merging #22 (b36058a) into main (271e264) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #22   +/-   ##
=======================================
  Coverage   81.59%   81.59%
=======================================
  Files          22       22
  Lines        8508     8508
=======================================
  Hits         6942     6942
  Misses       1566     1566

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 271e264...b36058a. Read the comment docs.


Navigation events not fired correctly

Bug

Environment info

Library
Version

@gorhom/animated-tabbar
1.6.0

react-native
0.61.5

react-native-reanimated
1.9.0

react-native-gesture-handler
1.6.1

react-native-svg
12.1.0

Steps To Reproduce

Create a simple tab bar with 2 pages
Use redux or reactn to change some data in tab A
Try to render conditionally based on data changed from tab A

Describe what you expected to happen:

I expect to see the updates in tabs!
If I use the default react-navigation tab bar, it's working correctly! (try to comment out the tabBarComponent: TabBar line in createBottomTabNavigator() options)

Reproducible sample code
null

hi @MohamadKh75 ,
hmm that's not navigation events, its the tab them self not re-rendering when you add/remove tabs ? right ?

Hey @gorhom
Well, it's version 4 so i won't add/remove tabs dynamically! But the problem is about NOT re-rendering 👌🏻

could you provide a simple reproducible code, so I could look into it quick.
thanks

Sure @gorhom!
Take a look at here!
P.S: if you comment out this line, it will work just fine :thinking:

hi @MohamadKh75 ,
i briefly investigate the issue, and it seems some thing went wrong with ReactN, not sure why, but i got your code working by replacing your B & C screens with the following:
B Screen
import React, { useGlobal } from 'reactn';
import { View, Text } from 'react-native';

export const B = () => {
  const [{ flag }] = useGlobal();
  return (
    <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
      <Text>Flag is {flag === true ? 'True' : 'False'}</Text>
    </View>
  );
};

C Screen
import React, { useGlobal } from 'reactn';
import { View, Button } from 'react-native';

const C = () => {
  const [global, setGlobal] = useGlobal();
  return (
    <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
      <Button
        title='Change the flag!'
        onPress={() => setGlobal(prevState => ({ flag: !prevState.flag }))}
      />
    </View>
  );
};

export { C };

hope it help you 👍

Thanks for your help and effort ❤
If the problem is with reactn, then why commenting this line, solve the problem 🤔?
Any idea?

@gorhom ping :grin:

hi @MohamadKh75 , sorry i didn't reply earlier, however, i still do not know what is the issue 🤷♂
since its not related directly to react-navigation or this library, i am afraid i won't be spending time on it, however if you are interested to investigate it further, feel free to submit a pr to resolve the issue, if not, i will have to close this issue
good luck

Okay then
Tnx ❤


Tidy up most errors and warnings from lint tools.

Fix some shadowing by test code (ctx -> ctxt), struct initializations and case change for TTLs.
I only did this for the etcd middleware. I didn't touch the missing comments from etcd.go:type Etcd and the the record methods since I don't know if you intended to expose them.

I think of lot of the methods don't need to be exported at all. I still need to do #166, which would prolly make it more obvious what we need and what not.
Thanks for this one though.