FFT module revamp + updating dune-lang

Introduction
Hello everyone. In order to be able to add more features to the Audio processing library I'm currently building on top of Owl (see: https://github.com/gabyfle/SoundML), I needed to be able to compute Discrete Cosine & Sine transforms (in order to compute MFCC and other related things). The Owl's FFT module was so far pretty empty even if very usefull, only exposing real and complex discrete fourier transforms, but with only few prameters available.
After checking out what was done in the well known Scipy Python library and comparing with what was done inside Owl, I found out that Owl was using FFTPACK for the computation. In order to stay a maximum compatible with the existing Owl's API, I used (like in the Scipy library) pocketfft which comes as a C++ header-only library.
In fact these additions should not break any code (it's 100% same API), and it might even enhance it because we gained some of the features of pocketfft:

It is now possible to specify the number of threads used to make the computation (meaning that for large arrays, we might gain from the multi-threaded code of pocketfft)
4 new functions were added : dct, idct, dst, idst inside the Owl.Fft module
Deleted old FFTPACK code
Updated the ocamlformat version to the current latest (0.26.2) and deleted deprecated options from the .ocamlformat file
Updated the dune version to the current latest (3.16) and added flags to remove warnings inside the examples folder

I hope that these new features / enhancements will please you ! Please, feel free to let me know if you find out anything wrong/unexpected.
gabyfle.
Main changes:

Fast Fourier Transform API:

val fft:  ?axis:int -> ?norm:int -> ?nthreads:int -> (Complex.t, 'a) t -> (Complex.t, 'a) t

val ifft:  ?axis:int -> ?norm:int -> ?nthreads:int -> (Complex.t, 'a) t -> (Complex.t, 'a) t

val rfft :  ?axis:int -> ?norm:int -> ?nthreads:int -> otyp:('a, 'b) kind -> ('c, 'd) t -> ('a, 'b) t

val irfft :  ?axis:int -> ?n:int -> ?norm:int -> ?nthreads:int -> otyp:('a, 'b) kind -> ('c, 'd) t -> ('a, 'b) t

val dct :  ?axis:int -> ?ttype:int -> ?norm:int -> ?ortho:bool -> ?nthreads:int -> ('a, 'b) t -> ('a, 'b) t

val idct :  ?axis:int -> ?ttype:int -> ?norm:int -> ?ortho:bool -> ?nthreads:int -> ('a, 'b) t -> ('a, 'b) t

val dst :  ?axis:int -> ?ttype:int -> ?norm:int -> ?ortho:bool -> ?nthreads:int -> ('a, 'b) t -> ('a, 'b) t

val idst :  ?axis:int -> ?ttype:int -> ?norm:int -> ?ortho:bool -> ?nthreads:int -> ('a, 'b) t -> ('a, 'b) t

Dune version from (lang dune 2.0) to (lang dune 3.16)
ocamlformat version from version=0.20.0 to version=0.26.2

Things would be much easier to review if ocamlformat update and dune lang bump were in two separate commits and not mixed with owl logic.

Yes actually that's what I was thinking about when seeing the enormous diff. I'll revert the changes made by the new version of OCaml format. And push a new commit so it'll be easier for you to check the changes.

Things would be much easier to review if ocamlformat update and dune lang bump were in two separate commits and not mixed with owl logic.

Yes actually that's what I was thinking about when seeing the enormous diff. I'll revert the changes made by the new version of OCaml format. And push a new commit so it'll be easier for you to check the changes.

I force-pushed to the branch only the modifications I added to the Owl logic, and discarded the ones that were due to the ocamlformat version update. The diff should be way smaller now for code review.

@gabyfle  Thanks a lot for this nice contribution! Do you think you could also add some extra examples and tests for the revised FFT module?

@gabyfle  Thanks a lot for this nice contribution! Do you think you could also add some extra examples and tests for the revised FFT module?

Hi, thanks for the review. I just saw that CI failed, I'll try to investigate as it compiles well on my Ubuntu installation.
Of course, I'll add some tests though I'm unfamiliar with Alcotest, I'll try my best and feel free to correct me if I'm misusing it.

@jzstark I added a tests/unit_fft.ml file that tests the (64bits) module using various data generated from values computed with scipy.fft module for reference.
This allowed me to spot two little issues in the implementation:

I was passing arguments to the C code in wrong order for the DCT and DST functions (which I didn't spot since I was using axis:1 in my testings!)
The normalization factor of the DCT function was incorrect due to a wrong delta (which in fact is a direct consequence from copy/pasting code from the DST function)

These issues are fixed and all the added tests are passing. I'm unsure whether or not I'm using Alcotest correctly, I did tried to stick to the same scheme used by Owl for the testing of the other modules. Let me know if there's any issue regarding the tests added, or if you're willing to add any test.

I'll get rid of the submodule and directly put a copy of the pocketfft library into the repository to avoid CI failing.

Hi @jzstark,
The CI should be fixed. I added manually the pocketfft code into the repository, so the pocketfft_hdronly.h: no such file or directory should not occur anymore. Let me know what do you think of this !

Thank you so much for the fix @gabyfle ! Really appreciate the workload doing this.  It already works on the ubuntu  + OCaml 5.1  environment, which is actually quite nice. But it would still be great if we can find out how to fix the issues on mac and OCaml 4.x versions.  Unfortunately I don't have the environments at hands to give it a quick local debugging now.

@jzstark Ubuntu compile for versions 4.x should be fixed now. The only issue I'll have now is that I don't have a MacOS computer to run the builds on my machine for the moment. I'll let you know once it's done !

@mseri  Thanks a lot for looking into this issue. Yes I think the error on 4.10 is more likely an Action problem with the OCaml version numbers now that the installation works on other platforms. I will first update the github action setup with your new PR.
@gabyfle Thanks for the quick fixes and very solid PR!

This works well and passes all the tests with ocaml 4.14.1 on my mac.
I don't understand the failure for 4.10, see below. However I think we could just drop support: do we really care about supporting 4.10? I think anything after 4.12 or even 4.14 would be more than enough.
(cd _build/default/src/owl && /usr/bin/cc -x c++ -O2 -fno-strict-aliasing -fwrapv -fdiagnostics-color=always -std=c++11 -g -O3 -march=native -funroll-loops -fno-math-errno -fno-rounding-math -fno-signaling-nans -fexcess-precision=fast -DSFMT_MEXP=19937 -fno-strict-aliasing -I/opt/homebrew/Cellar/openblas/0.3.28/include -g -I /Users/runner/work/owl/owl/_opam/lib/ocaml -I /Users/runner/work/owl/owl/_opam/lib/bigarray-compat -I /Users/runner/work/owl/owl/_opam/lib/camlzip -I /Users/runner/work/owl/owl/_opam/lib/ctypes -I /Users/runner/work/owl/owl/_opam/lib/ctypes/stubs -I /Users/runner/work/owl/owl/_opam/lib/integers -I /Users/runner/work/owl/owl/_opam/lib/npy -I /Users/runner/work/owl/owl/_opam/lib/owl-base -I /Users/runner/work/owl/owl/_opam/lib/stdlib-shims -I /Users/runner/work/owl/owl/_opam/lib/zip -o owl_fftpack_float64.o -c owl_fftpack_float64.cc)
clang: warning: optimization flag '-fno-signaling-nans' is not supported [-Wignored-optimization-argument]
clang: warning: optimization flag '-fexcess-precision=fast' is not supported [-Wignored-optimization-argument]
In file included from src/owl/fftpack/owl_fftpack_float64.cc:7:
In file included from src/owl/core/owl_core.h:9:
In file included from src/owl/core/owl_macros.h:9:
In file included from /Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/math.h:315:
In file included from /Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/limits:117:
/Users/runner/work/owl/owl/_opam/lib/ocaml/version:1:1: error: expected unqualified-id
4.10.2
^
/Users/runner/work/owl/owl/_opam/lib/ocaml/version:3:3: error: invalid preprocessing directive
# The version string is the first line of this file.
  ^
/Users/runner/work/owl/owl/_opam/lib/ocaml/version:4:3: error: invalid preprocessing directive
# It must be in the format described in stdlib/sys.mli
  ^
In file included from src/owl/fftpack/owl_fftpack_float64.cc:7:
In file included from src/owl/core/owl_core.h:9:
In file included from src/owl/core/owl_macros.h:9:
In file included from /Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/math.h:315:
In file included from /Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/limits:827:
In file included from /Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:425:
In file included from /Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/add_pointer.h:17:
In file included from /Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/remove_reference.h:13:
In file included from /Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:41:
/Users/runner/work/owl/owl/_opam/lib/ocaml/version:1:1: error: expected unqualified-id
4.10.2
^
/Users/runner/work/owl/owl/_opam/lib/ocaml/version:3:3: error: invalid preprocessing directive
# The version string is the first line of this file.
  ^
/Users/runner/work/owl/owl/_opam/lib/ocaml/version:4:3: error: invalid preprocessing directive
# It must be in the format described in stdlib/sys.mli
  ^

The failure in https://github.com/owlbarn/owl/actions/runs/11894830732/workflow is on homebrew side: macos workers come with an old version of base packages preinstalled and now conflict with the new pkgconfig package (which changed name to pkgconf). It has nothing to do with this PR, I'll send a fix attempt separately. The failure of https://github.com/owlbarn/owl/actions/runs/11894830682?pr=680 is due to some issue with github pages actions, independent of this PR

Thanks a lot for looking after this issue, I was tearing my hair out over this problem, not understanding what did I do wrong ! Glad to see it's not on my side !

@mseri Thanks a lot for looking into this issue. Yes I think the error on 4.10 is more likely an Action problem with the OCaml version numbers now that the installation works on other platforms. I will first update the github action setup with your new PR.
@gabyfle Thanks for the quick fixes and very solid PR!

No problem, thanks to you to keep updated Owl and maintening the project so far !

Hi @jzstark,
I put my PR in a draft because I detected an issue when computing FFTs, DCTs and DSTs on large arrays, causing the overall results to diverge from what's expected (for 100k length arrays, diff is approximatively 20% from results gotten from scipy).
I'm unsure where could it comes from and I'm quite happy to have spotted this before this was considered for a merge, I'll let you know once I find the origin of the issue.
Have a good day

@gabyfle  Now the checks work fine (except for the 4.10 version we have already decide to dump). So everything looks fine other than the SciPy performance gap problem you mentioned. Please let me know if you think the current results are better and this PR is ready to go. (Perhaps also incorporate this performance gap check into the unit test?)

Perfect! Thanks for this great PR again!


added interview questions

issue #51
Interview questions added
@neerajrathore pls review and let me know
if u merge pls add hacktoberfest - accepted label
Thanks !!

@lord-cyclone100 take latest pull from main and add index.html like other folders.

Also look at this commit


Upgrade @es-joy/jsdoccomment to 0.37.1

I tried upgrading to the latest version of 0.37.1 but got failing tests.
I managed to fix the fixtures, but now I'm seeing errors that I can't immediately fix and probably need a bit of help resolving:
  `parseForESLint`
tracks {
  circularPath: '["body","0","parent"]',
  unmatchedPath: '["body","0","jsdoc","hasPreterminalDescription"]',
  unmatchedValue1: 0,
  unmatchedValue2: undefined
} {}
    1) parses for ESLint
tracks {
  unmatchedPath: '["jsdocBlocks","0","hasPreterminalDescription"]',
  unmatchedValue1: 0,
  unmatchedValue2: undefined
} {}
    2) parses for ESLint (unattached)
tracks {
  circularPath: '["body","0","parent"]',
  unmatchedPath: '["body","0","jsdoc","hasPreterminalDescription"]',
  unmatchedValue1: 0,
  unmatchedValue2: undefined
} {}
    3) parses for ESLint (ancestor having comment)
tracks {
  circularPath: '["body","0","declarations","0","init","parent"]',
  unmatchedPath: '["body","0","declarations","0","init","jsdoc","hasPreterminalDescription"]',
  unmatchedValue1: 0,
  unmatchedValue2: undefined
} {}
    4) parses for ESLint (close ancestor having comment)
tracks {
  circularPath: '["body","0","parent"]',
  unmatchedPath: '["body","0","jsdoc","hasPreterminalDescription"]',
  unmatchedValue1: 0,
  unmatchedValue2: undefined
} {}
    5) parses for ESLint (close ancestor having comment and no space)
    - parses for ESLint (unattached inline tag)
    ✔ Avoids line comments
    ✔ Avoids non-JSDoc multiline comments

  TypeScript `parseForESLint`
tracks {
  circularPath: '["body","0","parent"]',
  unmatchedPath: '["body","0","jsdoc","hasPreterminalDescription"]',
  unmatchedValue1: 0,
  unmatchedValue2: undefined
} {}
    6) parses for ESLint
tracks {
  circularPath: '["body","0","parent"]',
  unmatchedPath: '["body","0","jsdoc","hasPreterminalDescription"]',
  unmatchedValue1: 0,
  unmatchedValue2: undefined
} {}
    7) parses for ESLint (ancestor having comment)
tracks {
  circularPath: '["body","0","declarations","0","init","parent"]',
  unmatchedPath: '["body","0","declarations","0","init","jsdoc","hasPreterminalDescription"]',
  unmatchedValue1: 0,
  unmatchedValue2: undefined
} {}
    8) parses for ESLint (close ancestor having comment)
    ✔ Avoids line comments
    ✔ Avoids non-JSDoc multiline comments

Oh - I just realise now that eslint-plugin-jsdoc has a direct dependency on<EMAIL_ADDRESS>so I should probably not worry about this package directly 🙈

And v0.19.0 also has this update and your updates.


CSV and JSON reader

Support reading CSV files into a table. We currently only support IPC.

Does arrow rust have a CSV and/or JSON reader? I only see parquet

Yes, they do: https://docs.rs/arrow/3.0.0/arrow/csv/reader/struct.Reader.html and https://docs.rs/arrow/3.0.0/arrow/json/reader/struct.Reader.html.


Ignore example entities in custom_components

Hey, thanks for this great integration! I'm setting it up for the first time and narrowing down some missing entities. I've noticed that many false positives are being generated from files like service.yaml inside custom_components.
For example:
-== Missing 4 entity(ies) from 17 found in your config:
+--------------------------------+---------+--------------------------------------------------------------+
| Entity ID                      | State   | Location                                                     |
+--------------------------------+---------+--------------------------------------------------------------+
| sensor.station_name            | missing | custom_components/opensprinkler/services.yaml:6,18           |
| fan.office_purifier            | missing | custom_components/coway/services.yaml:7,19                   |
| sensor.general_waste           | missing | custom_components/garbage_collection/services.yaml:9,21,33,4 |
|                                |         | 8,60                                                         |

The garbage collection file is a good example: https://github.com/bruxy70/Garbage-Collection/blob/master/custom_components/garbage_collection/services.yaml. On closer investigation, the false positive appears to be an example like so:
  fields:
    entity_id:
      description: The garbage_collection sensor entity_id
      example: sensor.general_waste

It's easy enough to add each of these directories to the ignore_files config, and that's what I'm doing now. I tried excluding entities like example.* but of course that didn't work. Is there an easier to way to bulk ignore these examples? Thank you for your time!

Hey @emcniece, that's correct, "ignored files" configuration setting was designed for this purpose. You can use asterisk to bulk ignore all nested files within a directory. I'd suggest to completely exclude custom_components folder from watchman monitoring as you cannot control its content in most cases. For example my own configuration (as well as example config from readme) contains 3 folders I'd like watchman not to dig into: /config/esphome/, /config/appdaemon/, /config/custom_components/* and it works just fine.

Closing as the original question has been answered. Thanks for the help!


title remains the same if the split is changed

Hi There,
great repo!
problem : I make a new split, I go to the split page, I change the title, I go to the main thread but the title & url is not changed (although the redirect works fine) .
question : is this work by design? potential bug of flarum or flagrow/split ?
thanks

The title is not synced indeed. We could possibly update that dynamically.
Thanks for the feedback!


obsolete help and resource pages?

@alexwolfe @kwalrath @naomiblack are these pages still relevant?

https://angular.io/docs/ts/latest/help.html
https://angular.io/docs/ts/latest/resources.html

Each of these pages exists for TS, Dart and JS.
Note that we have a global

https://angular.io/resources/

cc @ericjim

I am closing this Patrice. Since we are migrating, we are cherry picking what we want to translate.


Spike: Pipeline building helper methods

Examine adding helper class(es) for building out an ETL processing pipeline as demonstrated in the README.

@goodmanmd Would you like me to create a branch with what we talked about?

@ChrisMissal absolutely, that would be great.  Thanks!


Release on PyPI

Problem description
As of v0.2.2, to install MoPyRegtest users have to clone the repository and install locally by checking out the required version and then run pip install --user .
Desired behavior

Users want to be able to install MoPyRegtest simply by running pip install mopyregtest and getting MoPyRegtest from the Python Package Index (PyPI).
In the future, users want to be able to switch between versions using pip like pip install mopyregtest==0.2.1

Created workflow to publish to Test PyPI and PyPI as of v0.3.1. Published v0.3.1-rc.2 and v0.3.1 on PyPI.


[Question] Create volume with mountpoint option

Hey,
I have noticed that it is not possible to create a volume (driver: local) with the mount point for this volume as an option. Shouldn't this be possible in Docker?
Best,
Christian

Anyway. I used https://github.com/CWSpear/local-persist as a volume plugin and it's working like a charm.


Update k8's Scheduler Code

The scheduler code is out of date and needs to be updated to use the InCluster API in the Java Kubernetes client.  By updating the code we can remove the proxy  container that is being used today in the Helm chart.
This following class should be deprecated and use the AppsV1 APIs going forward.
https://github.com/apache/incubator-heron/blob/master/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/AppsV1beta1Controller.java#L52
the context class will have to change we no longer need a scheduler URI when running inside the cluster
https://github.com/apache/incubator-heron/blob/master/heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/KubernetesContext.java#L28
An example of getting the cluster config is below:
https://github.com/apache/pulsar/blob/master/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/KubernetesRuntimeFactory.java#L254

I'm working on this. Have changes needed for the 6.0.1 version of the Java API. Have not yet made changes to use the in cluster config, but I'll make that change also.


Simple Question about Data Preprocessing

Hello,
I would like to train a model on ShapeNet with does not have neither foreground masks nor semantic annotations, what should I do and in which format I should save the data after annotation?

I haven't worked with Shapenets so others can add, but I'm sure in ShapeNet you can get foreground masks since the ground truth 3D is available (any renderer would give you a mask), not sure about the semantic annotations. The focus of this work is on datasets without any ground truth 3D models, so we didn't really look into this.
Best,
A


Update "selenium-webdriver" for Node 4 compatibility

Currently included<EMAIL_ADDRESS>depends on a ws version with some broken optional dependencies. Since they're optional this should work fine in theory but I found that's not always the case (see https://github.com/npm/npm/issues/9772), especially if one updates npm to the now stable version 3.
<EMAIL_ADDRESS>installs fine on Node 4.1.1.

+1 I have been having issues across testing environments also and found updating both selenium(to 2.47.1) and the chromedriver(to 2.19) have improved consistency.
there seem to be some inconsistencies in current master - what webdriver version to be installed, so I in package.json it has 2.45.1 not 2.47.1, but inside the config.json file it has 2.47.1. SO even if you update it might not go to the correct version.
Ill try to do  a pull request

We're working on it.  This is a duplicate of a few other issues.

Duplicate issue: https://github.com/angular/protractor/issues/2245


Roadmap

Todos/roadmap:

Parallels to

fs.rename
fs.unlink
fs.appendFile
fs.exists

Something like getFile to just pull out a file's info
Rethink options/parameter handling; maybe depart from gridfs-stream API a little bit if it makes sense
Perhaps make a 'File' object, might have some nice helper methods
Error handling

The getFile bit is satisfied by findOne in in gridfs-stream 1.x, and unlink/exists are covered too; scrapping rename, added notes on other additional methods to readme. The rest is either done or unneeded.


Fix Various PowerShell Class Issues

Meta-issue to track work on improving the experience of PowerShell class usage as much as possible.
Note on By-Design Behaviours
PowerShell classes currently are a bit finnicky. Some of this is a necessary pain because of the design constraints behind classes.
Classes are currently implemented as compiling to .NET IL so that we can take advantage of the .NET object model. Not doing this would mean us reinventing (and having to maintain) the wheel on essentially all object-oriented features available in .NET (or anywhere else) and paying a high runtime overhead on shimming compatibility with the .NET object model (e.g. faking inheritance from .NET classes).
Instead, we compile PowerShell classes to dynamic assemblies and bake in calls to PowerShell in the generated IL. To do this at runtime would mean either breaking dynamic- and module-scoped behaviours in classes, or emitting a new dynamic assembly every time we hit a class definition (and since PowerShell's highest compilation unit is the scriptblock, and scriptblocks are permitted in for-loops, the performance penalty here could be extreme). (I'm still a bit hazy on the details about the mechanisms here, especially in terms of why caching is made impossible by module scope or in comparison to Add-Type, but @daxian-dbw or @lzybkr will be able to add to/correct me).
The need to compile classes at parse-time means the types required to define a class (in IL) must also be known at parse-time. The module-scoping issue means that a using module statement is required to import classes from modules (@daxian-dbw might like to add information here about the specifics governing this need), or by exporting class usage in PowerShell functions (classes having a sort of module-private behaviour).
Issues to Improve
There are, however, a few improvements possible to PowerShell classes that might not run up against the design constraints given above. Below is a list of open issues for classes in PowerShell.
Classes in modules

[ ] #2449 Exporting classes in PS modules consistently.
[ ] #2505 Classes in nested modules are not updated by Import-Module -Force.
[ ] #2962 Using ScriptsToProcess with using module stops classes from being imported
[ ] #2964 using module imports nested module classes in a script but not interactively.
[ ] #4112 using module doesn't load classes when FunctionToExport or CmdletToExport are specified in the .psd1
[ ] #4114 using module does not find classes in nested modules.
[ ] #4713 PS classes cannot invoke non-exported functions from their module (possibly a New-Module problem).
[ ] #6293 Making PS classes exportable module members.

Type errors

[ ] #1762 Custom attributes can't be defined and used in the same PS module
[x] #2074 Types not available at parse-time used in PS class bodies cause parse errors. @daxian-dbw noted that we need some types at parse-time (such as method return type) to generate the IL, but type resolution inside method/constructor scriptblocks may not be needed and be more appropriate at runtime. Noted as by design.
[ ] #3641 Type availability at parse-time. Need to implement the metadata reader (#6653).
[ ] See also: PSScriptAnalyzer #850

Other bugs

[ ] #2224 Some class errors occur at runtime when they can be detected at parse-time. (We may want to loosen the error-checking behaviour here if it makes sense to do so).
[ ] #2963 New-Object does not work for PS classes as it does for .NET classes.
[ ] #5337 PS Classes in collectible assemblies cause XML serialisation problems.
[x] #7622 protected internal override doesn't work (program diverges on method call).
[ ] #8235 Properties and methods with the same name are permitted in a declaration, but attempting to call the method results in an error that no such method exists.

New feature requests

[ ] #2223 Interface declarations
[ ] #2485 Validation attributes for PS classes
[ ] #2876 static extern methods and struct definition in PowerShell
[ ] #5099 Static class member imports
[ ] #6418 Other proposed class extensions.
[x] #8028 Support enum types other than Int32

A couple of other resources on these issues:

@devblackops' talk on issues with PS classes: video, code.
The SAPIEN page on the using statement: here.

Have override methods been suggested?
For example I have had to implement GUIs while overriding the WndProc method before. So a way to override methods would be a great addition to Powershell classes.

Have override methods been suggested?
For example I have had to implement GUIs while overriding the WndProc method before. So a way to override methods would be a great addition to Powershell classes.

Is there any community projects that work around these issues for example? I cannot for the life of me get a decent project implemented in PS w/ classes broken out into a sensible manner without running into one of the above issues..

@christru You can take a look at my PoshBot module here: https://github.com/poshbotio/PoshBot
That module is almost entirely PowerShell class based.

@devblackops as I’m litterally watching your YouTube video talk on classes.  Thanks buddy!

@christru Cool. I did the same talk at the PowerShell Summit. It is a more polished version. https://www.youtube.com/watch?v=i1DpPU_xxBc&list=PLfeA8kIs7CocGXuezOoYtLRdnK9S_Mq3e

@rjmholt I believe https://github.com/PowerShell/PowerShell/issues/8302 (classes don't produce valid interface property methods) should be filed under "Other bugs"

@IISResetMe currently classes don't allow overrides. Wouldn't the virtual addition be part of the interface inheritance?

@rjmholt well, we already mark all generated methods virtual, allowing class definitions to inherit existing interfaces:
class PleaseDisposeOfMe : IDisposable
{
  [void]Dispose(){ <# free unmanaged resources #> }
}

but since we never mark the underlying get/set methods of properties virtual (looks like an oversight), you can't actually implement an interface with a property:
class MyPrincipal : System.Security.Principal.IPrincipal
{
  [System.Security.Principal.IPrincipal]$Identity
  [bool]IsInRole()
}

At line:2 char:1
+ class MyPrincipal : System.Security.Principal.IPrincipal
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error during creation of type "MyPrincipal". Error message:
Method 'get_Identity' in type '<404e3736>.MyPrincipal' from assembly '⧹powershell, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null' does not have an implementation.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : TypeCreationError

Forgive some ignorance on my part, but looking at the number of issues and the complications that exist in classes in PowerShell today, I can't help but feel this is a design problem rather than a collection of issues/bugs to be addressed.
Wouldn't it make more sense and be much easier if:

PowerShell had a new module type specifically for class definitions, called something like class module that could only include class definitions, with a psx1 file extension; nothing else would be allowed in these files (no functions, variables, command invocations, etc.)
Import-Module automatically recognized psx1 files defined in RootModule, NestedModules, or RequiredModules fields in a module manifest, as well as psx1 modules that don't have a manifest at all, and loaded the types defined in those psx1 files accordingly (RequiredModules first, then NestedModules, then RootModule, so that you can derive from other types in other modules)
PowerShell automatically identified classes derived from PSCmdlet and added them to the current session without the extra work that is being done here.
PowerShell automatically exported classes that are associated with cmdlets that are exported from a module.
PowerShell supported ClassesToExport in module manifests to identify types in modules so that implicit loading could still work, even with classes.
Export-ModuleMember had a -Class parameter to explicitly identify which classes you want to export

One of the drivers behind this approach is that it would do away with the need for using for modules containing classes, and supports #requires, NestedModules, RequiredModules, and everything else that people already do with Import-Module today. Having both using and Import-Module is confusing and already requires a lot of re-thinking when it comes to how you set up modules to properly load classes. It also facilitates defining an equivalent of binary modules from within PowerShell itself.
There are more thoughts behind this, but I've shared enough to see what others think for now.

On second thought, I'd prefer not having to deal with Export-ModuleMember or ClassesToExport at all, having psx1 files be a PowerShell-ish equivalent of a type library, with types automatically exported just as they are with dlls (ideally with something resembling public/private to control visibility).

My random thoughts:

Not adding ClassesToExport was intentional, and type are public to help make the interactive experience good.
I'm skeptical that auto-loading types is a good idea, at least as a default.
Defining cmdlets via classes is useful and doesn't require a new module type.
Not being able to define functions seems a bit harsh, but I like the intention. In a new module type we could have strict functions, and these functions could even be compiled like cmdlets, convert parameters to properties, etc. This isn't exactly easy, but I think it's fairly mechanical.

Yeah, clearly it would be a great thing if Importing a module automatically included Cmdlet-derived classes as commands.
But that circles around to Import-Module and also using module  -- needing to explicitly using a module, even though I've already explicitly imported (or Nested or Required) it is one of the biggest pain point with classes for users.
@lzybkr I don't quite understand why you think leaving off the ClassesToExport feature and requiring me to export them by outputting them (or the user to import them with a second line of code) is a good thing: binary modules do this as a matter of course,  I mean, I don't need that to result in auto-loading, but I want Import-Module to be enough so that every class I use as a parameter type (or a property of a parameter type) is available to the user.
Of course, I also think we should actually namespace the classes by module (i.e. [ModuleName.ClassName]) -- that would certainly become critical if you started thinking about auto-loading / implicit loading.

Uh, I wasn't suggesting "outputting them" either - you define a class in a psm1, it's exported. All classes are exported, simple as that.
I was never a fan of the *ToExport properties in the manifest, it feels like it violates the DRY principle. As an optimization, it seems fine, but I'd rather it be a build artifact.
And classes are modeled more like an assembly - public types don't require any entries in the module manifest.
The need for Import-Module and using module isn't really by design, it's more like we didn't have enough time to work out all the issues and people found workarounds that we live with because it seems to work. Obviously the intention was to have a more static world that you could reason about.

Any chances we could get constructor chaining on the radar at some point, too? 😄

@rjmholt rjmholt  One of my old issues about classes  (from MS Connect) was not on your,  so I search all issues open  (missed + new) and compare with your list :
#1760 Inheritance from class with abstract property is inconsistent
#1751 format-* cmdlets cannot display hidden class members
#2217 Allow (some) method names that happen to be keywords
#2219 Properties with accessor and mutator methods
#2225 Comment-based Help for classes
#2841 PowerShell class defined in 'New-Module -ScriptBlock' doesn't work as expected
#2876 Enable native interop with static extern class methods
#4113 Running using module f:\tmp\test in global scope doesn't load the powershell class defined in the module to the global scope, while using module f:\tmp\test\test.psm1 does
#4713 PowerShell class methods cannot invoke non-exported functions.
#5332 Inheritance from interface and class are inconsistent
#5392 Suggestion: Implement Yield Return for Class Methods
#5796 Method parameter attributes are ignored
#6722 Type checking in PowerShell class method bodies is not needed
#7287 Custom classes and enums are not recognized by tab completion
#7294 Classes: an uninitialized [string] property defaults to $null rather than the empty string #7294
#7506 Permit specifying parameter names for constructors / .NET methods
#7654"Using module" statement does not reload module after changes are made _(Note : We are forced to used the keyword using to import properly another module)
#7736 When powershell class method has same name as property, the property disapear and is not accessible from any instance
#8235 Class : Methods and properties can't have the same name
#8475using module fails to check already-loaded modules for available custom types #8475
#8767 [BUG] Custom classes can be redefined in the same scope, via dot-sourcing, take effect in delayed fashion
#8828 class based DscResource requires inherited class to be in same file
#9106keywords in class method names meaningless error message
#9174Custom class methods do not complain about an unassigned $args variable
#9313 PowerShell classes leak to other runspaces on macOS #9313
#9445PowerShell class syntax doesn't support multiple conversion operators with the same input type

I began to report classes issues with PS 5.0 Preview April and nothing has changed in 4 years. (no interface,  forbidden methods names not consistant, override isn't implemented , bugged using...)
From my point of view,  there is only one solution to solve this big issue :

Classes with function support with a limited scenario (Class parser to IL)
SuperClasses without function support but able to manage a runspace pool (Class parser to assembly)

This SuperClass  need a very big improvement in the parser because we don't want another limited classes. To be clear, I want a class parser like PSLambda for Roslyn.
I don't know if, writing a new extended parser and asking Roslyn to do the job, is more difficult than resolved all these issues. But we are all waiting for a real statement from PowerShell comitee around classes.
@SteveL-MSFT To be honested, the aim behind classes are not to write  2 or 3 + 10 methods ... functions already do that !  Can we take a full scenario to determine priority ? I've got one if you want : AspNet Core on PowerShell. (even IronPython had this scenario in net4)
I want to resolve this issue in priority because it's very very dangerous : [#2217]https://github.com/PowerShell/PowerShell/issues/2217)

For reference #9382. Maybe we could make friends with these areas.

@rjmholt, I think #8028 has been completed and closed now as of PS Core 6.2.

Hopefully this is a 7.1 target! :)

Hi. Can you please add Named and Optional Arguments (C# Programming Guide) to the list?
Optional: https://github.com/PowerShell/PowerShell/issues/9701 https://github.com/PowerShell/PowerShell/issues/7534
Named: https://github.com/PowerShell/PowerShell/issues/13520

Didn't see this in the issue list, I can create a separate issue:
The array representation of a class (e.g. Mything[]) can't be referenced if the class definition is in another file.
#Class.ps1
class Test {[String]$Name}

#Usage.ps1
$myTest = [Test]@{Name='Yay'}
[Test[]]$myTest

Will error with ArgumentException: Could not find type [].. Put them in the same file and it works fine however.

@JustinGrote Please open new issue to discuss your scenario. Then I could add the issue to the tracking list.

But this is a meta issue. What activity is expected?

To add to the list in the initial post:

#10669 and the closely related #20755

@StevenBucher98 A lot of the issues on this rollup are now marked as closed. Another casualty of this "close everything" policy. At the very least, could the close bot close them as "not planned" rather than "completed?"

Another one to add to the list (a using module problem with referencing custom class definitions in the the param(...) block, specifically).

https://github.com/PowerShell/PowerShell/issues/19676#issuecomment-1555095799

A note to this megathread that most of these issues are not actually fixed, they were just closed by the autobot.


DAPLink doesn't work with IAR EWARM 7.7?

Hi,
I flashed my FRDM-K64F board's K20 with '0242_k20dx_frdmk64f_0x5000.bin' image download from latest releasee. And installed mbedWinSerial_16466.exe driver. I can see 'mbed composite usb device' 'mbed Serial Port' and 'DAPLin' device in device manager. But when I select CMSIS-DAP as debugger in IAR, it shows error when launching debug session

Hi @xiongyu0523, what error is shown? Also, does this start working again if you revert to an older version?

Hi @xiongyu0523, any updates on this?

@xiongyu0523 I can't reproduce this problem. Please re-test and let me know if you are still experiencing this issue. If you are please re-open this issue. There have been many exporter fixes in mbed-os so this is likely fixed.


added bands option to stacLayer

This Pull Request adds the bands option to stacLayer.  You can use it to re-map the bands to [R, G, B] or [R,G,B,A] bands of the rendered image for assets that are passed to GeoRasterLayer.  As a part of this, it will automatically stretch the bands to fit in the image color space (0-255), so you don't have to worry about 16-bit images.  The stretching uses the statistics that are dynamically calculated by GeoRasterLayer based on rendered pixels.
Example:
// only visualize second band (index 1)
stacLayer(data, { bands: [1, 1, 1] })

// in image with [red, green, blue, nir] use [nir, green, blue]
stacLayer(data, { bands: [3, 1, 2] })

Open to thoughts and suggestions.
This PR is indeed hacky, requiring a few features of GeoRasterLayer that are not publicly documented.  This functionality might be added to GeoRasterLayer at some point, which would simplify the stac-layer code.

This looks pretty good to me. The only place where I'm not sure whether the statistics/stretching make sense is the alpha/transparency layer. It might make more sense that for alpha (if provided) the range for integers is fixed to the range of the data type and for floats it is fixed to 0-1 maybe?

@m-mohr , I'll try to find/create some examples, so we can test/try out the different options ... and I can provide a good answer to your very good question :-)

Any news? :-)

I did a little more thinking about this (and I'm not sure why I didn't think of this earlier), but I believe GeoTIFFs should have the alpha channel marked as such in the metadata via https://www.awaresystems.be/imaging/tiff/tifftags/extrasamples.html.  I still think incorporating some of the logic you mentioned above as a double safety check would be good too.

I think I found a file that I can write a test with: https://github.com/GeoTIFF/test-data/blob/main/files/gadas.tif.  It comes from a PNG export from an ArcGIS Server, converted to a GeoTIFF.
Here's the relevant metadata from geotiff.js:
BitsPerSample: Uint16Array(4) [ 8, 8, 8, 8 ],
ExtraSamples: Uint16Array(1) [ 2 ], // 2 means "Unassociated alpha channel"

Hey, @m-mohr .  I believe this is ready for your review again.   A few notes:

I added https://github.com/geotiff/geotiff-epsg-code to better support data produced by ESRI software (and work with a wider range of random test data, specifically the test tile with an alpha band)
Added a setup script that pulls in https://github.com/GeoTIFF/test-data/ (geotiff.js also uses some of this test-data)
Added in alpha band detection and rendering rules you expressed above (0-1) and (0-100).  I also added in an if/rule for a float that is 0-255 (indicating the dataset used to be uint8, but was converted to float for some reason), and no range detection where min == max.

I also added a test file that allows you to change the bands mapping via a url param.
Let me know if you have any questions or concerns :-)
It's always tough trying to decide how to automatically visualize random datasets, so definitely more help the better :-)


Fix a typo in Architecture BASE FOLDER Note

Fix typo from "If you only use a them sporadically" to "If you only use them sporadically"

Thank you. :)


Word by Word caption for reader mode

It would be nice if instead of a sentence caption in story mode, if you could add a word by word option. This would be really good to increase retention time

I don't quite understand what you mean.
Could you please describe it in more detail? Thank you very much.


Support qvtkopennativewidget

These changes are required to support building against the latest VTK and still allow building against older VTK version.

Success ... Slicer compiles, and access to VTKWidget from python works but the widget only list few methods and not the complete list there were associated QWidget. I am checking if can I had a hint to ctkVisualizationVTKWidgetsPythonQtDecorators.h

It turns out that this will allow to let the meta-object compiler (moc) know the actual name of the object and allow us to get methods from the python interactor:
#if CTK_USE_QVTKOPENGLWIDGET
# if CTK_HAS_QVTKOPENGLNATIVEWIDGET_H
#  define ctkVTKOpenGLNativeWidget QVTKOpenGLNativeWidget
# else
#  define ctkVTKOpenGLNativeWidget QVTKOpenGLWidget
# endif
#else
# define ctkVTKOpenGLNativeWidget QVTKWidget
#endif

I tried to use Q_DECLARE_METATYPE and qRegisterMetaType without success

From Qt doc:
Enums and Typedefs Must Be Fully Qualified for Signal and Slot Parameters
When checking the signatures of its arguments, QObject::connect() compares the data types literally. Thus, Alignment and Qt::Alignment are treated as two distinct types. To work around this limitation, make sure to fully qualify the data types when declaring signals and slots, and when establishing connections. For example:
class MyClass : public QObject
{
    Q_OBJECT

    enum Error {
        ConnectionRefused,
        RemoteHostClosed,
        UnknownError
    };

signals:
    void stateChanged(MyClass::Error error);
};

Source: https://doc.qt.io/qt-5/moc.html#enums-and-typedefs-must-be-fully-qualified-for-signal-and-slot-parameters

@lassoan  I also tried few things without success:

use Q_DECLARE_METATYPE and qRegisterMetaType without succes
ensure moc is called with option like -DctkVTKOpenGLNativeWidget=QVTKOpenGLNativeWidget without success

I will move forward with the original patch ...

I am merging https://github.com/commontk/CTK/pull/830, I will let you take it from here.

OK. Thanks for trying.

Do you think something like this would work?
#if CTK_USE_QVTKOPENGLWIDGET
if CTK_HAS_QVTKOPENGLNATIVEWIDGET_H
class ctkVTKOpenGLNativeWidget : public QVTKOpenGLNativeWidget
{
...
}
else
class ctkVTKOpenGLNativeWidget : public QVTKOpenGLWidget
{
...
}
endif
#else
class ctkVTKOpenGLNativeWidget : public QVTKWidget
{
...
}
#endif

Do you think something like this would work?

That should work .. I got time to get to this and it is compiling with the propose change :smile:

:tada:  works .. PR on the wayy

Closing. Superseded by https://github.com/commontk/CTK/pull/831


US phone numbers are generated with 1 as first digit which is illegal for US numbers

US phone number are generated with 1 as first digit which is illegal for US numbers,
Using 0 or 1 as the first digit of an area code or central office code is invalid, as is a 9 as the middle digit of an area code; these are trunk prefixes or reserved for North American Numbering Plan expansion.
Also
Pertaining to a fake telephone number. The local exchange and area code number 555 was reserved in North American dialing plan for fictional numbers, prior to the 21st century.
555-2368, that's a 555 number, it isn't real.

Sorry for the late response.
I will take a look at it soon

Can you share an exmaple?


feat: NanoDrop 8000 & NanoDrop Eight - support alternative reporting format for absorbance measurements

In the alternative format, instead of reporting absorbances in columns names for the wavelength (A260) they are recorded as abs <id>/nm <id> pairs.
Also updated comments around how we store mass concentration to clarify a bit.

For anyone watching - putting this back in draft while I work on one more fix for this adapter


DOC: add warning for datareader changes in 0.17.0 (GH10004)

closes #10004

Looks good to me!
@hayd @dstephens99


Update README.md

hello Kappa

A coding standard has the purpose to reduces the number of ways to write the code.
This pull request do exactly the opposite, it cannot be accepted.


The USING statements are missing

[Enter feedback here]
The reason for posting this, is as follows:

Depending on how you create your project, you can get AMBIGUOUS references.
This takes additional time to resolve when you just simply including the references could alleviate the problem.

Thanks for you continued good documentation!

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 62419bb8-985c-cb11-ac8d-2d018868c2a6
Version Independent ID: db669ed7-d87b-c359-f5fb-3f2f1052281d
Content: Use OAuth with Common Data Service (Common Data Service) - Power Apps
Content Source: powerapps-docs/developer/common-data-service/authenticate-oauth.md
Service: powerapps
GitHub Login: @paulliew
Microsoft Alias: jdaly

@dtate22  The topic has been updated and the complete VS solution made available.


Create official github.io docs

py-component-controller should be developed with a documentation-first workflow. The docs can be hosted on github for simplicity using github pages.

After careful review, I've decided to go with readthedocs. I've begun working on a branch with a basic documentation.

Documentation is complete, it can be viewed here http://py-component-controller.readthedocs.io/en/latest/.
I've added a link to the README.


Chinese is a default I18n ?

my history table is with Chinese by default and change to EN has no effect.

Interesting! I added I18n the other day as some of the copy was hard-coded... let me look into this for you. It's okay on my system. What's your default language?
 I'm using v0.0.4 on my local machine and it's okay...

I'm also using 0.0.4 and I'm in developement

Hmm, perhaps I've got the naming convention wrong on the locales files?

Yes you have two :en in locales files

Good spot! Schoolboy error, fixing it now.

thx :+1:

If you bundle update this gem, that should fix your problem! Sorry about that! Let me know if it helps.

good job, thx


Provide a empty object type for{}

Bug Report

🔎 Search Terms

Object type
🕗 Version & Regression Information
4.9.4
⏯ Playground Link

Playground link with relevant code
💻 Code

/**
 *
 * @param params only allow object with type and value field, empty object, and `false`
 */
declare function foo(params:
    | { type: 1; value: number }
    | { type: 2; value: string }
    | {}
    | false
): void;

/**
 * If we use `true`, it should be type error here.
 */
foo(true);

🙁 Actual behavior

true is subtype of {}, no error
🙂 Expected behavior

There should exist a type stand for empty object.

I guess a duplicate of #42426 and you likely want #12936.
TypeScript is structurally typed, true can be assigned to {} because it's a subtype of it. This is working as intended. You can't represent a type that says "has no properties" in TypeScript.


Tensorboard Embedding with t-SNE Crash

When I run t-SNE on my datasets (on smallest or bigger one) with tensorboard embedding , the app crash all the times (after thereabout 500 iterations). I can't re-run or stop the operation to change the parameters, the iteration number freeze and the other functionalities on embedding part crash also.
Anyone have the same problem ? Other curiosity is if I run on online tensorboard embedding I have the same problem.

Not sure you are the right person to ask, @dsmilkov, but could you  please take a look at this?
Thanks so much in advance!

Thanks @aselle !

Hi @smar10,
Thanks for reporting. We'll need some info to help us reproduce the problem.

What browser and OS are you using?
What is the size of your dataset (number of points and dimensionality)?
If (some of) your datasets are public, can you share it with us?

Thanks!

Hi @dsmilkov,
After reading your questions and get more problems on audio tab on tensorboard, I realized what the issue might be... I was using Safari instead of Chrome.
I make some tests with same dataset and it's all ok on Chrome.

Hi @smar10,
Can you share the size (number of points) of the dataset and the dimensionality of the embeddings, so that we have a sense of what the crash on Safari might be related to.
Thanks!

Automatically closing due to lack of recent activity. Since this issue is old at this point, please reopen the issue if it still occurs when tried with the latest version of Tensorflow. Thank you.


swarm: introduce utilities for managing in-memory sui networks

Introduce utilities for better managing in-memory sui networks. The new Swarm type has some distinct advantages over the existing SuiNetwork type. One such advantage is that each node is isolated by running on its own runtime. This enables us to do things like properly shutting down a single node and ensuring that 100% of all of its running tasks are also shut down (This is something that is extremely difficult or down right impossible if all nodes are run on the same runtime).
The intent with the introduction of this Swarm type is that it can eventually be used for all of our e2e integration testing as well as benchmarking although there are still a number of other features/functionality that would first need to be implemented.

I built a similar set of tools for diem that enabled us to write tests where the "backend" could be local or a cloud environment. So this is me beginning to introduce similar constructs to enable us to do that in the future.


Question about the order of LSP requests and notifications (didChange and semanticTokens)

I am a developer of the lsp language extension. I noticed that under normal circumstances, when a user enters code in vscode, lsp will:
1 Send a notification of file changes (Notification { method: "textDocument/didChange"})
2 Request new semantic highlighting (Request { method: "textDocument/semanticTokens})
But I found that when inputting continuously and quickly (such as typing two Enter or other keys), sometimes semantic highlighting will be requested first, and then file changes will be notified.
I'm not sure if this is a problem with my lsp client implementation, or a special design of vscode, or a configurable option of vscode
here is my language extension:
client: https://github.com/kcl-lang/vscode-kcl
server: https://github.com/kcl-lang/kcl/tree/main/kclvm/tools/src/LSP
also reported in https://github.com/microsoft/vscode-discussions/discussions/1219
Version: 1.89.1 (Universal)
Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685
Date: 2024-05-07T05:14:24.611Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Darwin arm64 21.5.0

This behavior is absolutely fine. The server should in this situation compute the semantic tokens on the state of files it knows. If then some additional typing happens on the client, the client should either

send a cancel event and re-issue a new semantic token request after the did change has been sent.
keep the request running and adjust the result on the client side if possible. Otherwise issue a new request.

Hope that explains it,

I don't fully understand. Let me describe the problem I encountered in more detail.
At first, my code was like this.
schema Data:
    name: str
    version?: str

I typed Enter twice at the beginning of the file,

schema Data:
    name: str
    version?: str

I got the log of lsp server
Notification(Notification { method: "textDocument/didChange", params: Object {"contentChanges": Array [Object {"text": String("\nschema Data:\n    name: str\n    version?: str\n")}], "textDocument": Object {"uri": String("file:///Users/zz/code/test/a.k"), "version": Number(35)}} })

Notification(Notification { method: "textDocument/didChange", params: Object {"contentChanges": Array [Object {"text": String("\n\nschema Data:\n    name: str\n    version?: str\n")}], "textDocument": Object {"uri": String("file:///Users/zz/code/test/a.k"), "version": Number(36)}} })

Request(Request { id: RequestId(I32(132)), method: "textDocument/semanticTokens/full", params: Object {"textDocument": Object {"uri": String("file:///Users/zz/code/test/a.k")}} })

For each didChanged notification, a \n is added to the text
But if I typed delete twice
schema Data:
    name: str
    version?: str

I got the log of lsp server
Request(Request { id: RequestId(I32(138)), method: "textDocument/semanticTokens/full", params: Object {"textDocument": Object {"uri": String("file:///Users/zz/code/test/a.k")}} })

Notification(Notification { method: "textDocument/didChange", params: Object {"contentChanges": Array [Object {"text": String("schema Data:\n    name: str\n    version?: str\n")}], "textDocument": Object {"uri": String("file:///Users/zz/code/test/a.k"), "version": Number(38)}} })

The semanticTokens request occurs before didChange, and the didChange notification is only the second time

Ah, now I understand. This got fix in the latest versions of the client (e.g. 9.x)

It seems fix by https://github.com/microsoft/vscode-languageserver-node/pull/1511.  But I have a small question, can I check the version of vscode-languageserver-node I am using in the VSCode?

It seems fixed by https://github.com/microsoft/vscode-languageserver-node/pull/1511.
From my observation, it seems that the two consecutive operations will be merged into the final state. And the order of requests is normal.
For the previous case:
Notification(Notification { method: "textDocument/didChange", params: Object {"contentChanges": Array [Object {"text": String("schema Data:\n    name: str\n    version?: str\n")}], "textDocument": Object {"uri": String("file:///Users/zz/code/test/a.k"), "version": Number(38)}} })
Request(Request { id: RequestId(I32(138)), method: "textDocument/semanticTokens/full", params: Object {"textDocument": Object {"uri": String("file:///Users/zz/code/test/a.k")}} })

But I still have a small question, can I check the version of vscode-languageserver-node I am using in the VSCode to ensure that?

You define the version you are using via the npm dependency (vscode-languageclient)

You define the version you are using via the npm dependency (vscode-languageclient)

thx


Make DType::Struct a struct

This allows us to store e.g. a DType::Struct instead of just a DType when we want to ensure we have a struct dtype.
There are lots of FLUPs here related to #174

I'm going to close this until we figure out what to do with Composite DTypes


Adds ExportedFunctions API on CompiledModule.

Closes #637
Signed-off-by: Takeshi Yoneda<EMAIL_ADDRESS>

Thanks for the look!


Update filters.json

Hoping to get my PD2 Lootfilter added!

Please add a comma after PiLLLa's line. Please also use https://jsonlint.com/ to validate the JSON before resubmitting your pull request.

Ok, the formatting should be correct now.


give more resources to backend-lint job

After https://github.com/kubernetes/test-infra/pull/30183, we observed many Killed and the time gets 2x longer than before.
https://prow.k8s.io/job-history/gs/kubernetes-jenkins/pr-logs/directory/pull-kube-scheduler-simulator-backend-lint

/assign @196


How to Create a Web Component with Vanilla JS

We ask that you please be patient as our team works through approving and publishing all articles/tutorials in a timely manner. Allow 1-3 days for a topic to be reviewed and/or approved - allow 3-7 days for an articles to be reviewed and/or published.
Be sure to visit our Resources Page for tools, resources, and example articles to go over.
NOTE: (Please ensure that you have only one open issue + linked pull request at a time. This will ensure that we complete the article in a timely manner from inception to publishing.)
NOTE: We tend to stray away or tend not to publish reviews/comparisons of commercial product offerings.
We're looking for the first 2-3 paragraphs of the article that appropriately summarize what your article will be about.
Proposed title of article
How to Create a Web Component with Vanilla JavaScript
Introduction paragraph (2-3 paragraphs):
Web components are reusable and encapsulated HTML elements created using JavaScript. They let us create functionality that can be reused on other applications that we built with different technologies.
Web Components work in any web standard environment that supports basic HTML, CSS, and JavaScript. This article is a step-by-step guide on how to create a Web Component using Vanilla JavaScript.
Key takeaways:

What is a web component?
How do web components work?
Building a web component

References:
Please list links to any published content/research that you intend to use to support/guide this article.
Templates to use as guides

How To Guide Template
Software Review Template
Tutorial Template

@LeahKui
Good afternoon and thank you for submitting your topic suggestion.
Your topic form has been entered into our queue and should be reviewed (for approval) as soon as a content moderator is finished reviewing the ones in the queue before it.

Hi @LeahKui
I believe this article will be very helpful. Just make sure you have original content that isn't available on other blog sites. Also check that your content does not conflict with other articles already on section.
topic approved :rocket:


EMHASS fails to start after 0.5.0 update

Hi, just updated to 0.5.0 and EMHASS is not starting correctly. Mine is a HAOS install which is all up-to-date (Core 2023.12.3).
Symptoms:
On starting add-on through the add-on menu of HAOS it shows started and consuming low CPU and memory. However if I switch to the EMHASS dashboard i get an error message "The add-on seems to not be ready, it might still be starting. Do you want to try again?" Clicking Yes does not work. Clicking No gives "502 Bad Gateway".
I have restarted HA and still getting the same. EMHASS logs
Traceback (most recent call last):   File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main     return _run_code(code, main_globals, None,   File "/usr/lib/python3.9/runpy.py", line 87, in _run_code     exec(code, run_globals)   File "/usr/local/lib/python3.9/dist-packages/emhass/web_server.py", line 15, in <module>     from emhass.command_line import set_input_data_dict   File "/usr/local/lib/python3.9/dist-packages/emhass/command_line.py", line 20, in <module>     from emhass.forecast import forecast   File "/usr/local/lib/python3.9/dist-packages/emhass/forecast.py", line 15, in <module>     import pvlib   File "/usr/local/lib/python3.9/dist-packages/pvlib/__init__.py", line 3, in <module>     from pvlib import (  # noqa: F401   File "/usr/local/lib/python3.9/dist-packages/pvlib/clearsky.py", line 14, in <module>     import h5py   File "/usr/lib/python3/dist-packages/h5py/__init__.py", line 21, in <module>     from . import _debian_h5py_serial as _h5py   File "/usr/lib/python3/dist-packages/h5py/_debian_h5py_serial/__init__.py", line 46, in <module>     from ._conv import register_converters as _register_converters   File "h5py/_debian_h5py_serial/_conv.pyx", line 1, in init h5py._debian_h5py_serial._conv   File "h5py/_debian_h5py_serial/h5t.pyx", line 293, in init h5py._debian_h5py_serial.h5t   File "/usr/local/lib/python3.9/dist-packages/numpy/__init__.py", line 333, in __getattr__     raise AttributeError("module {!r} has no attribute " AttributeError: module 'numpy' has no attribute 'typeDict' s6-supervise emhass: warning: unable to spawn ./finish: Permission denied

To add it was working fine on the previous release. The HA logs do not show any error.

it should be solved, upgrade to add-on v0.5.2 when it is available.
Please close the issue if everything goes back to normal

All good now, thanks for the fast fix. Closing issue.
Now I can get back to figuring the capability...


add file store for memory plugin

can we add fiel store for the memory plugin? so we can give  a permanent storage
i added a sample code below. let me know if  its a good plan to add it will submit a PR

using json to save data
load data from a file on initialization

``def save_to_file(self):
today_date = datetime.today().strftime('%Y-%m-%d')
filename = f"memory-{today_date}.json"
try:
if os.path.exists(filename):
with open(filename, 'r') as f:
existing_data = json.load(f)
else:
existing_data = []
    combined_data = existing_data + self.items

    with open(filename, 'w') as f:
        json.dump(combined_data, f)
except IOError as e:
    print(f"Error saving memory to file: {e}")

``
Load form file
def load_from_file(self):
today_date = datetime.today().strftime('%Y-%m-%d')
filename = f"memory-{today_date}.json"
try:
with open(filename, 'r') as f:
self.items = json.load(f)
self.vectors = self.vectorizer.fit_transform(self.items)
except (IOError, json.JSONDecodeError) as e:
print(f"Error loading memory from file or file does not exist: {e}")
self.items = []
self.vectors = None

yes, you can add a new plugin that supports this. Add it to the plugins directory and submit a PR.


Rearrange fields in tree for a more compact struct

This leads to a 23% reduction in memory footprint in the iprbench size test.

goos: linux
goarch: amd64
cpu: AMD EPYC 7R32
                         │ netipds/size.bm │       netipds/size_packtree.bm       │
                         │        bytes         │     bytes      vs base               │
Tier1PfxSize/100                  16.83Ki ± 10%   13.81Ki ± 12%  -17.92% (p=0.002 n=6)
Tier1PfxSize/1_000               128.26Ki ±  1%   97.04Ki ±  2%  -24.34% (p=0.002 n=6)
Tier1PfxSize/10_000              1249.9Ki ±  0%   938.3Ki ±  0%  -24.93% (p=0.002 n=6)
Tier1PfxSize/100_000             11.992Mi ±  0%   8.995Mi ±  0%  -24.99% (p=0.002 n=6)
Tier1PfxSize/1_000_000           112.77Mi ±  0%   84.58Mi ±  0%  -25.00% (p=0.002 n=6)
RandomPfx4Size/100                16.20Ki ± 10%   13.09Ki ± 13%  -19.19% (p=0.002 n=6)
RandomPfx4Size/1_000             127.76Ki ±  1%   96.52Ki ±  2%  -24.45% (p=0.002 n=6)
RandomPfx4Size/10_000            1223.9Ki ±  0%   918.9Ki ±  0%  -24.93% (p=0.002 n=6)
RandomPfx4Size/100_000           10.997Mi ±  0%   8.257Mi ±  0%  -24.91% (p=0.002 n=6)
RandomPfx4Size/1_000_000          92.42Mi ±  0%   69.31Mi ±  0%  -25.00% (p=0.002 n=6)
RandomPfx6Size/100                16.14Ki ± 10%   13.05Ki ± 13%  -19.17% (p=0.002 n=6)
RandomPfx6Size/1_000             127.88Ki ±  1%   96.80Ki ±  2%  -24.30% (p=0.002 n=6)
RandomPfx6Size/10_000            1237.7Ki ±  0%   929.5Ki ±  0%  -24.90% (p=0.002 n=6)
RandomPfx6Size/100_000           11.784Mi ±  0%   8.832Mi ±  0%  -25.05% (p=0.002 n=6)
RandomPfx6Size/1_000_000         114.47Mi ±  0%   85.85Mi ±  0%  -25.00% (p=0.002 n=6)
RandomPfxSize/100                 16.14Ki ± 10%   13.05Ki ± 13%  -19.17% (p=0.002 n=6)
RandomPfxSize/1_000              127.63Ki ±  1%   96.90Ki ±  2%  -24.08% (p=0.002 n=6)
RandomPfxSize/10_000             1228.3Ki ±  0%   920.2Ki ±  0%  -25.08% (p=0.002 n=6)
RandomPfxSize/100_000            11.165Mi ±  0%   8.376Mi ±  0%  -24.98% (p=0.002 n=6)
RandomPfxSize/1_000_000           97.18Mi ±  0%   72.88Mi ±  0%  -25.00% (p=0.002 n=6)
geomean                           1.234Mi         964.6Ki        -23.66%

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Files with missing lines
Coverage Δ

tree.go
94.03% <ø> (ø)


Restyle header

Why:

Header changes on the design;

These changes address the need by:

Updating Header and its styles;
Adding home-page and post images;
Adding MainHero;
Adding Layouts;
Updating Logo;
Updating NavLinks;

@mirhamasala @jreis13  I squashed my gp-show-categories into a single commit. Just merge this branch into that one and then we can merge everything together to master.

@jreis13


How to download all the images from a specific 8chan board?

I am bit confused how the images are accessed from a 8chan board through the API. Can you tell, how can I download all the images from a board? [for 8chan]

thank you for the help. Can you tell, how it can be possible to download all the threads and their data of a specific board? I tried a few methods but was unsuccessful @KebabLord

Can you tell, how it can be possible to download all the threads and their data of a specific board? I tried a few methods but was unsuccessful @KebabLord

what do you mean by "all data"? The two code pieces i provided above already downloads all the media such as images,videos from all threads in a board (it's set to /v/ in the examples i provided). You can use one of them.
do you also want to dump the texts along with those media? If so, you should either create your own archiver implementation or use another application. This repo is basically a python wrapper for the 8chan api. It's not a downloader nor archiver.
this repo is basically the python wrapper of 8chan's api, it doesn't directly allow you to download

I'm closing this issue since i think my last answers were enough and i already created a basic implementation for you that downloads all the media from a board. If you want to know further, just check the examples or read the codes.


Cross error when update Data

Cross error when update Data
when we want to update data in supabase then we facing cross error

Closing this for staleness.


FOI - Security Analysis

[ ] Remove the unused properties from local storage and also encrypt property "authToken".
[ ] Include security headers on server-side resource response.
[ ] SSL Setup
[ ]  Schemas to include type and length (server side)

tried out the following tools, so far no vulnerabilities found
https://github.com/mozilla/eslint-plugin-no-unsanitized
https://addons.mozilla.org/en-US/firefox/addon/csrf-spotter/
https://addons.mozilla.org/en-US/firefox/addon/check-xss/
https://addons.mozilla.org/en-CA/firefox/addon/easy-xss/


feat(temurin) introduces a new source of type "Temurin"

Fix #1733
This PR introduces a new resource of kind temurin. Only source is supported.
It allows retrieving Adoptium ("Temurin JDK") JDK version, Installer URL, Checksum URL or Signature URL based on different filtering criterias.
Implementation uses the Adoptium API under the hood.
Quick examples (Documentation on the website is needed):
sources:
  ## Returns last LTS version
  getLastDefaultVersion:
    kind: temurin

  ## Returns last feature release (explicit)
  getLastFeatureVersion:
    kind: temurin
    spec:
      releaseline: feature # Can be 'lts' (default), 'feature'

  ## Returns last LTS Nightly
  getLastLTSNightlyVersion:
    kind: temurin
    spec:
      releaseline: lts
      releasetype: ea # Can be 'ga' (default), 'ea'

  # Returns the installer URL for the latest x64 Linux JDK in the LTS version line
  getLatestLTSLinuxAMD64InstallerURL:
    kind: temurin
    spec:
      result: installer_url # Can be 'version' (default), 'installer_url', 'checksum_url', 'signature_url'

  ## Returns the installer checksum URL for the latest x64 Linux JDK in the LTS version line
  getLatestLTSLinuxAMD64ChecksumUrl:
    kind: temurin
    spec:
      result: checksum_url # Can be 'version' (default) 'installer_url', 'checksum_url', 'signature_url'

  ## Returns the installer download URL for the latest x64 Windows JDK in the LTS version line
  getInstallerUrlJDK17WindowsAMD64:
    kind: temurin
    spec:
      result: installer_url
      featureversion: 17 # Major Java release (integer) to filter on.
      operatingsystem: windows # Follows Temurin conventions: can be 'linux' (default), 'alpine-linux', 'windows', 'mac', 'solaris', 'aix"

  ## Returns Checksum URL for latest JRE on the s390x Linux 17 line
  getChecksumJRE17Linuxs390x:
    kind: temurin
    spec:
      featureversion: 17
      operatingsystem: linux
      architecture: s390x # Follows Temurin conventions: can be 'x64' (default), 'x86', 'x32', 'ppc64', 'ppc64le', 's390x', 'aarch64', 'arm', 'sparcv9', 'riscv64'
      imagetype: jre  # Follows Temurin conventions: can be 'jdk' (default), 'jre', 'testimage', 'debugimage', 'staticlibs', 'sources', 'sbom'
      result: checksum_url

  ## Returns Signature URL of the latest JRE for the Windows 17.0.9+9 release
  getSignatureUrlCustomVersionWindows:
    kind: temurin
    spec:
      featureversion: 17
      operatingsystem: windows
      result: signature_url

Test
To test this pull request:

Unit tests with a mocked HTTP client, covering ~85% lines. Of course it's not real life test but it helps covering a lot of code conditional branches and it won't break with Adoptium new releases:

cd ./pkg/plugins/resources/temurin
go test ./... -short

End to end test, serving as a "real life test". Note it has conditions to test that any kind of returned URL exists so it survives new releases while being a real life case:

go build -o ./dist/updatecli
./dist/updatecli diff --config ./e2e/updatecli.d/success.d/temurin/sources.yaml

Additional Information
Tradeoff

Potential improvement

Excellent news, thanks a bunch! 🥳

PR updates with:

Support for the "Project" attribute
Multi line comment for Spec attributes, following @olblak suggestion
Simplified the condition of the e2e test (not running faster, but easier to read and maintain)

Great pullrequest Feel free to close my last comment if that field is not mandatory

Thanks! I let you merge if you feel like we can trigger a release

PR doc: https://github.com/updatecli/website/pull/1545


Propagating executeCommand context

Adding a test which fails if the context is not propagated

This should be an easy merge, this is just a continuation for the pull request nro 97.

This commit is already redundant, as ti was covered by mrievt
https://github.com/droolsjbpm/drools/commit/ef4e7c9b5c84081bb803a53059b7bb40b9a4cfc5
However there is no unit test for this commit. If you could re-do your pull request, with just your tests, I'll merge the test to track regressions.


Update PlayerManager.js

Added term 'cache' to multiple pieces due to recent change in master branch of discord.js that involves adding cache to nearly everything.

While this PR is correct it also removes support for discord.js stable

I see. Will this mean that discord.js master will eventually be lost from support for this? Or will those who use master have to use a fork with the correction made?

@TacticalTechJay I think using this fork for master users would be a good idea, or if Jacz could create a new branch for master and use this fork, that would be even nicer. But yeah to keep support for stable i think using this fork for master and kepping the master branch working with d.js stable


Microsoft.DotNet.GenAPI

I  can't find this assemlly anywhere :Microsoft.DotNet.GenAPI

i found acade


Add super() to the equals/hashcode impl

This is to address this issue: https://github.com/joelittlejohn/jsonschema2pojo/issues/331

@joelittlejohn Do you see any issues with being able to merge in this PR?  I'd rather avoid having to maintain a fork for this.

Hi there. I haven't had much time to dedicate to the project recently. I have no objection to the changes in this PR, I just haven't had a chance to review.
I've held of merging this immediately because I want to check back through the assumptions made when #241 was implemented and understand exactly what the trade-off is between calling super or not here. I believe #241 was implemented with the recommendations of Effective Java in mind, and I want to be sure that we're not creating another trap here by calling super.
I think your reasoning is sound, I just wanted to verify this assumption before merging.

Awesome! Thanks!


Code between imports removed

Describe the bug
When code is placed between import statements. it's getting removed
Steps to reproduce
Eg I have this code
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
import { manager} from 'awesomeCmp';
Code between imports will be removed
Expected behavior
Non-comment code should not be removed too
Desktop (please complete the following information):

OS: [e.g. iOS] Win10
import conductor version: [e.g. v2] 2.0.3

Similar issue with this code:
/* some comment
*/

**/// <reference types='./types' />

declare var global: any**

import {
...
}

:tada: This issue has been resolved in version 2.2.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


use with iscroll has error  $state is not definded

it seems 'this.$refs.infiniteLoading.$emit('infinite')'  emit event  do not has  $state params

已解决


[Breaking change request] Disallow type promotion of this in extensions

Summary
Due to a bug in the common front end, any implicit or explicit reference to this in an extension method is treated as equivalent to a local variable; accordingly it can undergo type promotion.  The ability to type promote this is being removed for consistency with the specification and the behavior of the analyzer.
What is changing
Previously, any code inside an extension that did an is check on this would promote the type of this, so in the example below, lines (1) through (4) would be allowed (since class D defines property and method), but lines (5) through (8) would lead to compile-time errors (since class C does not):
class C {}

class D extends C {
  int property;
  void method() { ... }
}

extension on C {
  void example() {
    if (this is D) {
      print(this.property); // (1)
      print(property);      // (2)
      this.method();        // (3)
      method();             // (4)
    } else {
      print(this.property); // (5)
      print(property);      // (6)
      this.method();        // (7)
      method();             // (8)
    }
  }
}

However, the Dart analyzer (which also powers integration with editors such as IntelliJ and VSCode) did not allow this, so it considered lines (1) through (8) all to be compile-time errors.
We are changing the behavior of the front end to match the analyzer, so that lines (1) through (8) will all be compile-time errors.
Rationale
Making the analyzer and the common front end consistent should help reduce confusion, since code that is accepted by one tool won't be rejected by another.  There are three reasons for going with the analyzer's behavior:

The analyzer's behavior is more self-consistent (it disallows promotion of this both in extensions and in classes).
The analyzer's behavior is consistent with the language specification (which specifies that only local variables and function parameters can undergo type promotion).
Due to architectural constraints in the analyzer, changing its behavior to match that of the common front end would be a much larger undertaking, with greater risk of bugs.

Any code that would be affected by this change would most likely be rendered erroneous by it, and since most users of Dart use the analyzer in some way or another (e.g. through an editor, or using a code generator), they would have already run into this problem and most likely worked around it by not trying to promote this.
A trial run of the change through Google's internal source repository showed zero code broken by this change.

Mitigation
If you do have any code that is impacted by this change, you can always restore the old functionality by creating an explicit variable and initializing it to this, for example:
class C {}

class D extends C {
  int property;
  void method() { ... }
}

extension on C {
  void example() {
    var self = this;
    if (self is D) {        // Instead of `if (this is D)`
      print(self.property); // Instead of `property` or `this.property`
      self.method();        // Instead of `method()` or `this.method()`
    }
  }
}

Additional information

https://github.com/dart-lang/sdk/issues/44652: bug that will be fixed by this change
https://github.com/dart-lang/language/issues/1397: feature request to allow this to be promoted by all tools, both in classes and in extensions.

cc @Hixie @matanlurey @vsmenon for review and approval.
@johnniwinther @leafpetersen

cc @Hixie @matanlurey @vsmenon for review and approval.
@johnniwinther @leafpetersen

lgtm

lgtm

LGTM but we should totally fix the language to allow this to get promoted in general.

LGTM but we should totally fix the language to allow this to get promoted in general.

LGTM but +1 @Hixie's comment

LGTM but +1 @Hixie's comment

@vsmenon ping

@vsmenon ping

lgtm

lgtm

Approved

Approved

This change landed in c053638eb54eca8c01154ac46941394384c1b13c.

This change landed in c053638eb54eca8c01154ac46941394384c1b13c.


Flatpickr displaying wrong in bootstrap modal

flatpickr version used: latest. (v4)
Browser name and version: Chrome + Firefox (Works on Safari)
OS and version: macOs 10.13

I'm trying to set an inline flatpickr instance in a bootstrap modal with bad results.

it seems to be a css issue. i'm using airbnb theme, but also with the default one it breaks (see the fiddle)
Thanks.

please see this issue - it may be similar
https://github.com/flatpickr/flatpickr/issues/1502

I've been trying with { static : true } but it only centers the input, without showing the calendar.
https://jsfiddle.net/6cde3wjm/

SOLVED! It seems to be an issue with weekNumbers:true

@aliniacb thank you! i will check

The above is correct. You can also connect the code to boostrap's shown.bs.modal event.


unable to use anchor on arm

Description
When trying to use anchor on a m1 based mac I get the below error:
❯ anchor
[1]    97137 illegal hardware instruction  anchor

Not sure if this is because of  a dependency but its odd because rust is emulated to use x86 instructions.

The issue is suspected to be in the idl parsing at the moment, since cargo build-bpf succeeds but anchor idl parse fails.
anchor idl parse -f src/lib.rs
[1]    4298 illegal hardware instruction  anchor idl parse -f src/lib.rs

Related https://github.com/solana-labs/solana/issues/16072

Labeling as blocked. Solana toolchain binaries don't run on M1 according to the linked issue above.

Recently addressed on the solana end https://github.com/solana-labs/solana/pull/16346.

Most of the solana toolchain seems to be working now quite well on a m1. I managed to compile examples with anchor and deploy them to a local-test-validator using anchor launch. I couldn't get anchor test to run though.

Note that I don't own an M1 and so don't plan on directly addressing this myself--though I'm happy to closely work with and help anyone that decides to take on this issue.

@mschneider Solana v1.7 fixes most (if not all) of the M1 compatibility issues in my testing. If you want to get anchor to work on M1 you can manually update the cargo dependencies to 1.7 and build it from source. So far it's been working a treat for me the last few days. Happy to help if you have any issues.

How did you install 1.7? From source or via solana-install?
On Tue 8. Jun 2021 at 10:57, Tristan F @.***> wrote:

@mschneider https://github.com/mschneider Solana v1.7 fixes most (if
not all) of the M1 compatibility issues in my testing. If you want to get
anchor to work on M1 you can manually update the cargo dependencies to 1.7
and build it from source. So far it's been working a treat for me the last
few days. Happy to help if you have any issues.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/project-serum/anchor/issues/95#issuecomment-856841265,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABDF7HN4QG32ZCGJ2XEXUTTRYVTXANCNFSM4YJZRX3Q
.

@mschneider pretty much what @armaniferrante said, just update the package dependencies in the respective Cargo.toml files and you can install the latest solana-cli using sh -c "$(curl -sSfL https://release.solana.com/v1.7.1/install)"

A few caveats: 1.7.1's solana-test-validator crashes for me on launch
Ledger location: test-ledger
Log: test-ledger/validator.log
⠙ Initializing...
Illegal instruction: 4

Here is what I did instead to bring one up:

Open a Rosetta2 Terminal
git clone solana
git checkout v1.7
ran ./install/install-help.sh . but did not add to the PATH
launch ./bin/solana-test-validator

Next I installed the anchor-cli locally:
cargo install --git https://github.com/project-serum/anchor --branch armani/sol anchor-cli --locked

I also used yarn link to have my mac use the same branch to try the basic-0 example. anchor launch did deploy the contract on my test-validator. But I still can't run the tests:
basic-0 max$ anchor test
BPF SDK: /Users/max/.local/share/solana/install/releases/1.7.1/solana-release/bin/sdk/bpf
Running: rustup toolchain list -v
Running: cargo +bpf build --target bpfel-unknown-unknown --release
    Finished release [optimized] target(s) in 0.18s

To deploy this program:
  $ solana program deploy /Users/max/Code/anchor/examples/tutorial/basic-0/target/deploy/basic_0.so

  basic-0
Transaction simulation failed: Attempt to load a program that does not exist

Translating error Error: failed to send transaction: Transaction simulation failed: Attempt to load a program that does not exist
    at Connection.sendEncodedTransaction (/Users/max/Code/anchor/ts/node_modules/@solana/web3.js/lib/index.cjs.js:4520:13)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Connection.sendRawTransaction (/Users/max/Code/anchor/ts/node_modules/@solana/web3.js/lib/index.cjs.js:4481:20)
    at async Object.sendAndConfirmRawTransaction (/Users/max/Code/anchor/ts/node_modules/@solana/web3.js/lib/index.cjs.js:6263:21)
    at async Provider.send (/Users/max/Code/anchor/ts/dist/cjs/provider.js:81:22)
    at async Object.rpc [as initialize] (/Users/max/Code/anchor/ts/dist/cjs/program/namespace/rpc.js:11:31)
    at async Context.<anonymous> (/Users/max/Code/anchor/examples/tutorial/basic-0/tests/basic-0.js:13:5)
    1) Uses the workspace to invoke the initialize instruction

  0 passing (80ms)
  1 failing

  1) basic-0
       Uses the workspace to invoke the initialize instruction:
     Error: Promise rejected with no or falsy reason
      at processTicksAndRejections (internal/process/task_queues.js:95:5)

@NorbertBodziony I had that error too, running brew install openssl will fix it.

#368 has been working great for me on M1. Appreciate it!

Managed to make it work. #368 + custom solana-test-validator build from 1.7.1 solana branch

Addressed by #368. Please re-open if there are still problems.

Managed to make it work. #368 + custom solana-test-validator build from 1.7.1 solana branch

Running into this same issue.  What exactly is your custom solana-test-validator solution?

@NorbertBodziony I'm facing the same issue with Solana v1.7.9. Not sure how to use #368 for solving the issue. Can you please help?

@NorbertBodziony I'm facing the same issue with Solana v1.7.9. Not sure how to use #368 for solving the issue. Can you please help?

I would stick to 1.7.1 at least it works for me.

@NorbertBodziony I'm facing the same issue with Solana v1.7.9. Not sure how to use #368 for solving the issue. Can you please help?

I would stick to 1.7.1 at least it works for me.

I have switched to solana v1.7.1. The installation is valid as I can run basic commands like solana --version. The problem is that when I run: solana-test-validator, I get this error: ```
dyld: Library not loaded<EMAIL_ADDRESS>Referenced from: /Users/dhrumil/.local/share/solana/install/active_release/bin/solana-test-validator
Reason: image not found
zsh: abort      solana-test-validator

The problem is that when I run: solana-test-validator,

I get this error:
dyld: Library not loaded<EMAIL_ADDRESS>  Referenced from: /Users/dhrumil/.local/share/solana/install/active_release/bin/solana-test-validator
  Reason: image not found
zsh: abort      solana-test-validator

like you mentioned you had gotten.

Also getting this error, running M1 Mac in Rosetta terminal, Solana CLI version 1.7.11

@dabit3 Nice. I ended up switching to my Linux machine and found no issues there.

@dabit3 how did you build it from source on m1? I'm not having any luck here, on neither 1.7.1 nor 1.7.11

Figured it out, my issue was very dumb. It's depending on greadlink but didn't give me any error message that it's not installed. brew install coreutils to get the gnu versions
To fix the SSL error, symlink it manually:
ln -sfn<EMAIL_ADDRESS><EMAIL_ADDRESS>

Hi @dabit3 thank you for providing this solution. Can I ask if you can clarify this:

Then go to sdk/cargo-build-bpf from the project root.

When I download and extract solana-release-x86_64-apple-darwin.tar I get the following directory:

Can you clarify where cargo install --path . should be run?

Was beating my head against a wall, ended up running into the same problem as @dvcrn. This comment in the cargo-install-all.sh needs to be emphasised:
if [[ $OSTYPE == darwin* ]]; then
  # Mac OS X's version of `readlink` does not support the -f option,
  # But `greadlink` does, which you can get with `brew install coreutils`
  readlink_cmd="greadlink"
fi

I was able to build from source and start a local test validator, thanks to @dabit3, but I can't run the example hello world program ( https://github.com/solana-labs/example-helloworld/blob/master/README.md )
When I run:
npm install
I get this error:
npm ERR! enoent ENOENT: no such file or directory, open '/Users/alessandro/solana/solana-1.7.12/package.json'
Seems that I'm missing the package.json file. Anybody had any similiar issues?

@sandrocan which directory are you running npm install from?

@dabit3 '/Users/alessandro/solana/solana-1.7.12' which is where the whole project is located

You should be running npm install from the hello-world folder, which has a package.json, not the main Solana codebase.

That makes sense. Sorry I've been really confused after trying to get the validator to run. Will try that now. Thanks for your quick response and help! Much appreciated!

Slight elaboration and change on instructional provided by @dabit3 (which is how I figured this out, so thank you very much for posting this):
Build from source allows you functionality for both solana-test-validator and allows one to utilize the anchor environment to build and test. You can use cargo build and cargo test but that will not populate the target/idl with the proper artifacts needed.
In the below instructions, build-source refers to the Source code (tar.gz) file you download to follow the instructions to build from source in order to install the Solana CLI tools found here: https://docs.solana.com/cli/install-solana-cli-tools#build-from-source
Go to sdk/cargo-build-bpf from the build-source project root. From there, run the following:
$ cargo install --path .
Verify the path created by opening a separate terminal and navigating to ~/.cargo/bin. List the contents of bin with:
$ ln -l.
You will either see SDK or cargo-build-bpf. On my Mac M1 chip running Monterey, I found the path to end with the latter.
So, On an apple M1 chip the cargo-build-bpf program is installed to the path ~/.cargo/bin/cargo-build-bpf. This will allow you to run commands like $ anchor build successfully in your local project root once you create a symlink from it to the path in your Solana source code/bin/sdk folder.
In a separate terminal navigate to ~/.cargo/bin and create a symlink to the sdk folder in the build-source project’s bin folder, like this:
$ ln -s solana-1.9.2/bin/sdk ~/.cargo/bin/cargo-build-bpf
Replace solana-1.9.2 with the build-source code you downloaded earlier.

Hey @ScottLozano
Followed the same steps as you mentioned for installing it on my Macbook air m1 chip. Getting this error when I run anchor build
Can you please help? :)

@mdhrumil

Did you install this on Rosetta terminal or ARM? I installed on ARM. Will clarify in my solution above.
Did you install the symlink?
I installed a different version and also, I installed the anchor-cli 0.19.0 & cargo 1.57.0 (b2e52d7ca 2021-10-21)
Did you initialize Anchor in the project?

If you did the first two, possibly it's that you need to link a different path in the symlink? I see yours is through Documents. Mine is installed at root user, so: /Users/scott/.cargo/bin/
I can then see ($ls -l) this symlink which I created:
cargo-build-bpf -> solana-1.9.2/bin/sdk
and I have the solana-1.9.2 on my Desktop
Let me know if that helps.

That’s great!
Sent from ProtonMail for iOS
On Wed, May 4, 2022 at 3:18 PM, Dhrumil Mayur Mehta @.***> wrote:

Hey @.***(https://github.com/ScottLozano)
I tried this again and somehow it worked. Have tried it multiple times before but used to get stuck due to some or the other issues mentioned in this thread. Glad it worked this time.
Screen Shot 2022-05-04 at 7 46 39 PM
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>


shift to winui, layout adjustments, string tweak

Summary of the Pull Request
What is this about:
What is include in the PR:
How does someone test / validate:
Quality Checklist

[ ] Linked issue: #xxx
[ ] Communication: I've discussed this with core contributors in the issue.
[ ] Tests: Added/updated and all pass
[ ] Installer: Added/updated and all pass
[ ] Localization: All end user facing strings can be localized
[ ] Docs: Added/ updated
[ ] Binaries: Any new files are added to WXS / YML

[ ] No new binaries
[ ] YML for signing for new binaries
[ ] WXS for installer for new binaries

Contributor License Agreement (CLA)
A CLA must be signed. If not, go over here and sign the CLA.

Do we need the text description in the upper left corner if we have a Welcome to PowerToys section?

@niels9001

Do we need the text description in the upper left corner if we have a Welcome to PowerToys section?

I vote to remove it.

@niels9001

Do we need the text description in the upper left corner if we have a Welcome to PowerToys section?

I vote to remove it.

Agreed. I can take that a long in a separate PR when including new imagery as well.

@niels9001
OK

@niels9001
let's merge this so you can then work on the the updated feature/oobe code base.


Update instructions for Docker install of minecraft droidlet

Description
Running through the install instructions and discovered a few issues. Updating this makes the install go through except for the fact that spacy does not install. All other dependencies work fine.
Type of change
Please check the options that are relevant.

[x] Bug fix (non-breaking change that fixes an issue)
[ ] Proposes a change (non-breaking change that isn't necessarily a bug)
[ ] Refactor
[ ] New feature (non-breaking change that adds a new functionality)
[ ] Breaking change (fix or feature that would break some existing functionality downstream)
[ ] This is a unit test
[x] Documentation only change

Type of requested review

[ ] I want a thorough review of the implementation.
[x] I want a high level review.
[ ] I want a deep design review.

Before and After
Before update to the working directory Docker install fails with:

After fixing workdir the install fails when installing spacy package with the trace:
#21 43.72     Complete output from command python setup.py egg_info:
#21 43.72     Traceback (most recent call last):
#21 43.72       File "<string>", line 1, in <module>
#21 43.72       File "/tmp/pip-build-zxcr8gnq/spacy/setup.py", line 10, in <module>
#21 43.72         from Cython.Build import cythonize
#21 43.72     ModuleNotFoundError: No module named 'Cython'
#21 43.72
#21 43.72     ----------------------------------------
#21 44.06 Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-zxcr8gnq/spacy/

Manually skipping the pip install -r requirements.txt in the Dockerfile means we can successfully install the image.  Commenting out the following in requirements.txt:
# https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.0.0/en_core_web_sm-2.0.0.tar.gz
# spacy>=2.0.12

Leads to a successful install. Obviously this is not ideal but I'm still working on figuring out what needs to be done to address this.
Testing
Please describe the tests that you ran to verify your changes and how we can reproduce.
Checklist:

[x] I have performed manual end-to-end testing of the feature in my environment.
[x] I have added Docstrings and comments to the code.
[x] I have made changes to existing documentation where needed.
[ ] I have added tests that show that the PR is functional.
[x] New and existing unit tests pass locally with my changes.
[ ] I have added relevant collaborators to review the PR before merge.

Hey @kandluis, thanks for creating this PR!
In fact our local installation script has been outdated since our last major refactor and multiple places need to be fixed in order to make it work. I created a PR #289  which includes your changes and some extra modifications beyond your PR. Please see if that PR resolved your issue.


Change BlobFileId to uint64.

What problem does this PR solve?
Issue Number: ref #3594
Problem Summary:
What is changed and how it works?

Change BlobFileId to support more blob roll id (break backward compatibility for earlier master version)
Change DB::PS::V3::Format::LogNumberType to support more log file id
Checked the other type lengths in V3, no need to do the same change.

Check List
Tests

[ ] Unit test
[ ] Integration test
[ ] Manual test (add detailed scripts or steps below)
[ ] No code

Side effects

[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[x] Breaking backward compatibility

Documentation

[ ] Affects user behaviors
[ ] Contains syntax changes
[ ] Contains variable changes
[ ] Contains experimental features
[ ] Changes MySQL compatibility

Release note

None

/run-all-tests


The best scores modal doesn't include the Tactong game.

Currently, the best scores modal isn't keeping track of the newly added memory game Tactong. This is the only game whose best score isn't being kept track of, hence, is causing inconsistency in the web app.

Good catch, will fix this asap!

Approved!


tsserver protocol is missing notification message type. (maybe?)

While implementing a tsserver client, I found out not all request messages will reply with a response.
For example, the open request extends the Request interface. But it really notifies (as the documentation implies).
This was a bit confusing for me, because I understood that if I send an open request, I must wait for the response... but it never came.
https://github.com/microsoft/TypeScript/blob/a2609b1f1b58f9b6ef62cb3b6ff47efb35059eee/lib/protocol.d.ts#L1113-L1124
I understand that the interface documentation says the server will not send a response. I didn't read the full command documentation until now.
But maybe the documentation could be a bit more explicit about a kind of message where a response is not expected, for certain commands (maybe notify?).

I've run into this too, so has @uniqueiniquity. It's very confusing to me that in our API that there's no acknowledgement that an open request succeeds just for the sake of consistency, so I ended up with a bunch of bugs where
await tsserverClient.open(...)

would just hang the process because the client was implemented naively.
That said, I don't know how to fix it at this point...

Something very similar happened to me.
I think modifying the protocol to call it a notification instead of a request will make things more clear.

@sheetalkamat thoughts?

We could make this kind of change:
export interface Request<_Response extends Response | void> extends Message {
        type: "request";

        /**
         * The command to execute
         */
        command: string;

        /**
         * Object containing arguments for the command
         */
        arguments?: any;
    }
    export type NoResponseRequest = Request<void>;
    export interface ReloadProjectsRequest extends NoResponseRequest {
        command: CommandTypes.ReloadProjects;
    }
    export interface OrganizeImportsRequest extends Request<OrganizeImportsResponse> {
        command: CommandTypes.OrganizeImports;
        arguments: OrganizeImportsRequestArgs;
    }