Error 'Function cannot be called on any member of intersection type' when using R.pipe

I'm trying to implement flow in a project using ramda and I'm having difficulty to understand the errors I'm getting.
Here is my code for example :
// @flow
import R from 'ramda';

const atob = (b64Encoded:string):string => Buffer.from(b64Encoded, 'base64').toString();

const myFunction:(TypeA => TypeB) = R.pipe(
    R.prop('url'),
    R.match(/aRegex/),
    R.nth(1),
    decodeURIComponent,
    atob,
    JSON.parse,
);

export default myFunction;

And the errors I'm getting :
 ./node_modules/.bin/flow
Error: src/domain/extractTracked.js:7
                                         v------
  7: const myFunction:(TypeA => TypeB) = R.pipe(
  8:     R.prop('url'),
  9:     R.match(/aRegex/),
...:
 14: );
     ^ call of method `pipe`. Function cannot be called on any member of intersection type
  7: const myFunction:(TypeA => TypeB) = R.pipe(
                                         ^^^^^^ intersection
  Member 1:
                              v---------------------
  232:   declare type Pipe = (<A, B, C, D, E, F, G>(
  233:     ab: UnaryFn<A, B>,
  234:     bc: UnaryFn<B, C>,
  ...:
  240:   ) => UnaryFn<A, G>) &
         -----------------^ polymorphic type: function type. See lib: flow-typed/npm/ramda_v0.x.x.js:232
  Error:
  inconsistent use of library definitions
  1454:   ): (o: O) => ?T;
                       ^^ null. This type is incompatible with. See lib: flow-typed/npm/ramda_v0.x.x.js:1454
  373:   declare var match: CurriedFunction2<RegExp, string, Array<string | void>>;
                                                     ^^^^^^ string. See lib: flow-typed/npm/ramda_v0.x.x.js:373
  Member 2:
            v------------------
  241:     (<A, B, C, D, E, F>(
  242:       ab: UnaryFn<A, B>,
  243:       bc: UnaryFn<B, C>,
  ...:
  248:     ) => UnaryFn<A, F>) &
           -----------------^ polymorphic type: function type. See lib: flow-typed/npm/ramda_v0.x.x.js:241
  Error:
  inconsistent use of library definitions
  1454:   ): (o: O) => ?T;
                       ^^ null. This type is incompatible with. See lib: flow-typed/npm/ramda_v0.x.x.js:1454
  373:   declare var match: CurriedFunction2<RegExp, string, Array<string | void>>;
                                                     ^^^^^^ string. See lib: flow-typed/npm/ramda_v0.x.x.js:373
  Member 3:
            v---------------
  249:     (<A, B, C, D, E>(
  250:       ab: UnaryFn<A, B>,
  251:       bc: UnaryFn<B, C>,
  ...:
  255:     ) => UnaryFn<A, E>) &
           -----------------^ polymorphic type: function type. See lib: flow-typed/npm/ramda_v0.x.x.js:249
  Error:
  inconsistent use of library definitions
  1454:   ): (o: O) => ?T;
                       ^^ null. This type is incompatible with. See lib: flow-typed/npm/ramda_v0.x.x.js:1454
  373:   declare var match: CurriedFunction2<RegExp, string, Array<string | void>>;
                                                     ^^^^^^ string. See lib: flow-typed/npm/ramda_v0.x.x.js:373
  Member 4:
            v------------
  256:     (<A, B, C, D>(
  257:       ab: UnaryFn<A, B>,
  258:       bc: UnaryFn<B, C>,
  ...:
  261:     ) => UnaryFn<A, D>) &
           -----------------^ polymorphic type: function type. See lib: flow-typed/npm/ramda_v0.x.x.js:256
  Error:
  inconsistent use of library definitions
  1454:   ): (o: O) => ?T;
                       ^^ null. This type is incompatible with. See lib: flow-typed/npm/ramda_v0.x.x.js:1454
  373:   declare var match: CurriedFunction2<RegExp, string, Array<string | void>>;
                                                     ^^^^^^ string. See lib: flow-typed/npm/ramda_v0.x.x.js:373
  Member 5:
            v---------
  262:     (<A, B, C>(
  263:       ab: UnaryFn<A, B>,
  264:       bc: UnaryFn<B, C>,
  265:       ...rest: Array<void>
  266:     ) => UnaryFn<A, C>) &
           -----------------^ polymorphic type: function type. See lib: flow-typed/npm/ramda_v0.x.x.js:262
  Error:
  inconsistent use of library definitions
  1454:   ): (o: O) => ?T;
                       ^^ null. This type is incompatible with. See lib: flow-typed/npm/ramda_v0.x.x.js:1454
  373:   declare var match: CurriedFunction2<RegExp, string, Array<string | void>>;
                                                     ^^^^^^ string. See lib: flow-typed/npm/ramda_v0.x.x.js:373
  Member 6:
  267:     (<A, B>(ab: UnaryFn<A, B>, ...rest: Array<void>) => UnaryFn<A, B>);
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ polymorphic type: function type. See lib: flow-typed/npm/ramda_v0.x.x.js:267
  Error:
                                           v------
    7: const myFunction:(TypeA => TypeB) = R.pipe(
    8:     R.prop('url'),
    9:     R.match(/http:\/\/api.mixpanel.com\/track\/\?data=([^&]+).*/),
  ...:
   14: );
       ^ rest parameter array of call of method `pipe`. Has some incompatible type argument with
  267:     (<A, B>(ab: UnaryFn<A, B>, ...rest: Array<void>) => UnaryFn<A, B>);
                                               ^^^^^^^^^^^ array type. See lib: flow-typed/npm/ramda_v0.x.x.js:267
    Type argument `T` is incompatible:
       11:     decodeURIComponent,
               ^^^^^^^^^^^^^^^^^^ function type. This type is incompatible with
      267:     (<A, B>(ab: UnaryFn<A, B>, ...rest: Array<void>) => UnaryFn<A, B>);
                                                         ^^^^ undefined. See lib: flow-typed/npm/ramda_v0.x.x.js:267

Found 1 error

Am I missing something or is it Flow who has limited Ramda currying support ?

I came across a similar issue today with different code. I am not certain if the cause is the same for you but in my code it was a problem with nullable values not being handled that caused flow to hiccough. In your example R.nth, can return null values and this isn't being handled in the pipe line - R.prop could too depending on your model TypeA.
I think there may still be an issue with the definitions but I might be misunderstanding them (or over-expecting things from them) as I tested the following and got an incompatible type error
import { prop } from 'ramda';

type Client = {
  id: string,
};

var client: Client = {
  id: 'foo'
};
var y: string = prop('id', client);

Error: reducers/clients.js:64
 64: var y: string = prop('id', client);
                     ^^^^^^^^^^^^^^^^^^ null. This type is incompatible with
 64: var y: string = prop('id', client);
            ^^^^^^ string

Error: reducers/clients.js:64
 64: var y: string = prop('id', client);
                     ^^^^^^^^^^^^^^^^^^ undefined. This type is incompatible with
 64: var y: string = prop('id', client);

Even though I was using prop to fetch a non-nullable property on the model it still returns a nullable type that must be handled before passing to the next function in the pipe (if that function cannot accept a null value)

I've just reopened the same project today, and the error is gone ... Maybe after some lib update (I'm sorry I forgot to specify which version of Flow and Ramda I was using ....)
Should I close ?


System exception: cannot signal semaphore: count would exceed maximum

Describe the bug
Our customer reported that our application hangs sometimes when he uses the freedrive function. After logs inspection we've found System exception: cannot signal semaphore: count would exceed maximum error to be the reason.
To Reproduce
We were able to reproduce it using the following snippet:
#include <chrono>
#include <iostream>
#include <string>
#include <thread>

#include "DRFLEx.h"

void freedrive_semaphore() {
  DRAFramework::CDRFLEx robot;
  bool success = init_control(robot);
  // robot initialisation omitted
  if (!robot.set_tool(tool_name)){
    std::cout << "Cannot set tool" << std::endl;
    robot.close_connection();
    return;
  }
  while (true) {
    std::this_thread::sleep_for(std::chrono::milliseconds(1000));
  }
}

int main() {
  freedrive_semaphore();
  return 0;
}

Compile and run this snippet, press your finger against the robot's flange to cause SYSWARN: 2.3506 - Joint external torque exceeds reference value when entering direct teaching ctrl and spam(press and depress quickly) freedrive button.
I'm not sure that these are optimal steps to reproduce this problem, but it follows closely the behaviour of our customer. He got a robot that was pressing against the box and was trying to retract it using the freedrive function.
Expected behavior
DRFL API does not hang.
Versions

DRFL: GL010118
OS: Ubuntu 20.04

Additional context
May be related to #16.

@kirillmorozov
I think it is caused by too many log alarms being uploaded at the moment. I will test this issue internally and comment on it.

I've encountered a similar issue before. The possible reason could be that the previous program process was not terminated before running the current program.


How to install system libraries on windows?

I  think it's common to have to install system libraries. I don't see any description on how to do that with this action (for both stack and cabal).

For cabal, I tried
    - name: Install system dependencies (windows)
      if: matrix.os == 'windows-latest'
      run: mingw64-pkg install zlib

It failed with

Run mingw64-pkg install zlib
Bash environment variable found, are you sure you installed cabal and msys2 via chocolatey?
At C:\ProgramData\chocolatey\lib\cabal.<IP_ADDRESS>\tools\mingw64-pkg.ps1:39 char:3
+   throw ("Bash environment variable found, are you sure you installed ...
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Bash environmen...via chocolatey?:String) [], RuntimeException
    + FullyQualifiedErrorId : Bash environment variable found, are you sure you installed cabal and msys2 via chocolat
   ey?

Error: Process completed with exit code 1.

https://github.com/hasufell/stack2cabal/runs/1172870260?check_suite_focus=true#step:7:1

This took way too long to figure out, but I think I have a minimal example here:
jobs:
  zlib:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v2
      - uses: msys2/setup-msys2@v2
        with:
          update: true
          install: zlib
      - uses: haskell-CI/setup@main
        with:
          ghc-version: 8.8.4
          cabal-version: <IP_ADDRESS>
      - run: cabal update
      - run: cabal run

(with a minimal hello-world of importing the zlib library to make sure I'm using something that needs zlib)
I couldn't get mingw64-pkg working regardless of whether or not I installed msys2 via chocolatey or the action. This is the codepath that is causing it to fail. I'm not quite sure why it's there; although it seems to just be a wrapper around pacman -S $package_name, which would make its functionality equivalent to the setup-msys2 snippet above.

There's nothing Haskell specific about installing system packages.
Cabal or stack just has to be informed about their include/lib locations, and DLL locations added to PATH.
I've been using pkgconfiglite installed by chocolatey for some packages: https://github.com/expipiplus1/vulkan/blob/master/.github/workflows/ci.yml#L63 (in this action I install some dependencies for Cabal and Stack (near the end))


Debug android device web view using remote debugging

Hi,
Is there a way we can launch the devtools session programmatically for an android device connected?
I am trying to automate performance capture for a webview in my android application

Is there a way we can launch the devtools session programmatically for an android device connected?

What do you mean exactly?
You need to eventually obtain a port to connect chrome-remote-interface to, and I think you can use adb to forward that port. Also the WebView must have setWebContentsDebuggingEnabled set to true. I can't recall exactly, I'm not even sure I ever did that, but it should be possible.

Thanks a lot for the input, I assumed port forwarding in this case works only from dev machine to android device and not the other way around, I was able to connect to my device webview successfully, however came across another small issue,
chrome-remote-interface list gives me a list of all targets(webviews in my case) that are available, how do i evaluate an expression say for a particular webview and not just the first one which gets picked by default.
I tried chrome-remote-interface -p 9222 activate  , it doesn't seem to be doing anything, maybe i am using it wrong, any suggestions please?

As you normally would when using regular tabs, for the protocol it really makes no difference if you're interacting with a tab, a WebView, or a Node.js instance.
You can specify the target in CDP(), or interactively using chrome-remote-interface inspect <target>.
As for evaluating an expression you can use Runtime.evaluate(), for example:
const {result} = Runtime.evaluate({
    expression: '1 + 1'
});
console.log(result.value);

Tried the following and received TypeError: Cannot read properties of undefined (reading 'webSocketDebuggerUrl')

chrome-remote-interface -p 9222 inspect -l BB5AA48C4415FECDC2D1CA6B9C1CB056
chrome-remote-interface -p 9222 inspect -l ws://<IP_ADDRESS>:9222/devtools/page/BB5AA48C4415FECDC2D1CA6B9C1CB034

also tried without the -l parameter and passed target id directly as follows:
chrome-remote-interface inspect 4EE499CC38C0DB8988F72DD96CD7B6D6 received a socket hang up error.

1 should work, 2 instead should be like this:
chrome-remote-interface -p 9222 inspect -l -w ws://<IP_ADDRESS>:9222/devtools/page/BB5AA48C4415FECDC2D1CA6B9C1CB034

And yes, -l should be there.

It Worked! Thanks a lot for your active support in this! :)

Glad to help, good luck!


Add new chat type (bubble)

Linked with #3
It's better to have another chat style (bubble)
And we need to make a switch somewhere (config/setting page) to allow user switch between chat type.

should have a date/time to show when the message was sent

:+1: ok

The chat style could be added as a chat setting. (See https://github.com/huytd/agar.io-clone/commit/80ee01df9507e7ba221ada5050ff395dbb5d50c6)

If you want a demo with these changes, I have one running at http://agar.sarencurrie.com:3000/
Try typing -dark and -help into chat.

@SarenCurrie nice feature. I added the help wanted tag to see if someone can help with the bubble chat, I don't have the time right now.

I've thought of a better way to implement the chat commands, so I'll make a pr for that, I could take a look at chat styles as well at some point.

@SarenCurrie awesome feature. Could you make a pull request for the colorful foods and new chat command (dark mode, help) please?

Chat commands is in #40

:+1:


Compound reference fails for Job

These work as expected
bible.get_references('Ezra 1:1-Ezra 1:3')
bible.get_references('Job 1:1-3')
This doesn't
bible.get_references('Job 1:1-Job 1:3')

Looks like it is failing after it matches Job and the regex gets to John. John's regex is
JOHN_REGULAR_EXPRESSION = "(John" r"|Joh\.*" r"|Jhn\.*" r"|Jo\.*" r"|Jn\.*)"
is matching on Jo\.*

Thanks for catching that. I'll work on getting that fixed ASAP.

This should be fixed in pythonbible version 0.8


No doorbell notification in HomeKit for Opener

IsDoorbellEnabled is set to true. I see the opener under doors & locks and notifications are set to any time. The opener sends notifications from the nuki app on my iPhone but no notifications are shown in HK. Open/close notifications are shown every time I use the Opener.
Plug-in got updated to the latest version today but still no notifications. My setup is very new, the notifications never worked.
is it a bug or did I do something wrong configure the plug-in ?

I have the same problem, but currently no idea why.


jenkins integration for PRs/branches (on-commit)

this will be implemented using the jenkins webhook format,
git/notifyCommit?...

near done: we cannot use http request params to map target/port. This is because the webhook plugin in bitbucket appends both a path and some params to the existing url.


Installation option doc cleanup

@frankbu: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

gencheck_operator
ae4964388b4f05bf2b9d9bdd32030120a2f198b6
link
/test gencheck_operator

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

In response to a cherrypick label: new pull request created: #587


[Carbon X] Component token colors are hardcoded

Detailed description
Component token / variable values in in src/globals/scss/_theme-tokens.scss use some hardcoded values for colors, and do not make use of the values in theme-white, theme-g100 etc.
Example:
  // Link
  $link-visited: $ibm-colors__purple-60 !default !global;
  $link-inverse-color: #6ea6ff !default !global;

  // Tooltip
  $tooltip-background-color: #3d3d3d !default !global;

@IBM/carbon-designers:

Is there a global theme token for $link-inverse-color?
Can $inverse-02 be used for $tooltip-background-color?

Thanks!

These should be calling ibm color palette tokens, like what the $link-visited is doing.

This should be resolved! Going to close this, feel free to comment and we can re-open if I missed something :eyes:


Console spam on routine hostile check

Hey, I updated to the latest version and am getting console spam ever since.
Running on version 0.8.1
Sponge version:
[29-07-2019 23:17:57] SpongeForge
[29-07-2019 23:17:57]     Minecraft: 1.12.2
[29-07-2019 23:17:57]     SpongeAPI: 7.1.0-fb496dbf0
[29-07-2019 23:17:57]     Sponge: 1.12.2-7.1.7-SNAPSHOT
[29-07-2019 23:17:57]     SpongeForge: 1.12.2-2825-7.1.7-RC3770
[29-07-2019 23:17:57]     Minecraft Forge: <IP_ADDRESS>21
[29-07-2019 23:17:57]     JVM: 1.8.0_212/64-bit (Oracle Corporation)
[29-07-2019 23:17:57]     OS: Linux (3.10.0-862.3.2.el7.x86_64/amd64)

Error:
[29-07-2019 23:13:41] The Scheduler tried to run the task CatClearLag hostile checker owned by Plugin{id=catclearlag, name=CatClearLag, version=0.8.1, description=A plugin to assist in removing lag from your server., source=/home/smpicnic/server/data/./mods/plugins/CatClearLag-0.8.1.jar}, but an error occured.
[29-07-2019 23:13:41] java.lang.NullPointerException: null
[29-07-2019 23:13:41] at java.util.Objects.requireNonNull(Objects.java:203) ~[?:1.8.0_212]
[29-07-2019 23:13:41] at java.util.function.Predicate.and(Predicate.java:68) ~[?:1.8.0_212]
[29-07-2019 23:13:41] at me.time6628.clag.sponge.EntityRemover.<init>(EntityRemover.java:40) ~[EntityRemover.class:?]
[29-07-2019 23:13:41] at me.time6628.clag.sponge.CatClearLag.getXPOrbs(CatClearLag.java:180) ~[CatClearLag.class:?]
[29-07-2019 23:13:41] at me.time6628.clag.sponge.runnables.EntityChecker.run(EntityChecker.java:20) ~[EntityChecker.class:?]
[29-07-2019 23:13:41] at org.spongepowered.api.scheduler.Task$Builder.lambda$execute$0(Task.java:139) ~[Task$Builder.class:1.12.2-2825-7.1.7-RC3770]
[29-07-2019 23:13:41] at org.spongepowered.common.scheduler.SchedulerBase.lambda$startTask$0(SchedulerBase.java:192) ~[SchedulerBase.class:1.12.2-2825-7.1.7-RC3770]
[29-07-2019 23:13:41] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_212]
[29-07-2019 23:13:41] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_212]
[29-07-2019 23:13:41] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212]
[29-07-2019 23:13:41] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212]
[29-07-2019 23:13:41] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]

Seems to be the same issue as mentioned here:
https://github.com/Time6628/CatClearLag/issues/19

Why was this closed, neither this nor the original report got any support. Is there a fix I've seemed to have missed?


Alex Casas reports that pip install paml won't work

PyPi already has a different library named paml: https://pypi.org/project/paml/

Is there some way we can grab up a different name that is in the same family? We have SBOL, PAML, OPIL, and POML, and there’s SBML, etc.  Suddenly switching to a real word might be confusing.
If you are ok with limiting to BIO protocols, what about just changing to “BPAML” or “BPML”?  “BPAML” is free on PyPi. I’m not as sure about BPML.  I get search hits for that, but not an actual library named “BPML”.
I’m ok with whatever people like, just wanted to offer another option.

Sorry BAM is taken. BAML is open on pypi.
Dan

On Oct 16, 2021, at 10:46 AM, Daniel Bryce @.***> wrote:
BAM looks like it’s open.
Dan

On Oct 16, 2021, at 10:07 AM, rpgoldman @.***> wrote:

Is there some way we can grab up a different name that is in the same family? We have SBOL, PAML, OPIL, and POML, and there’s SBML, etc. Suddenly switching to a real word might be confusing.
If you are ok with limiting to BIO protocols, what about just changing to “BPAML” or “BPML”? “BPAML” is free on PyPi. I’m not as sure about BPML. I get search hits for that, but not an actual library named “BPML”.
I’m ok with whatever people like, just wanted to offer another option.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

We need to actually make a decision and push this out.
Suggestion: libpaml ?

I'm a little worried that that sounds like some kind of Linux binary library, rather than being Python-ish.
pyPAML ?

I like pyPAML.

I like pyPAML also!

That's curious... on my machine it runs through just fine... clearly a tarball on github isn't a good way to do that distribution, though. @rpgoldman : can you publish a version of the container ontology to pypi?

@rpgoldman : can you publish a version of the container ontology to pypi?

To be honest, I don't know -- I have never tried.  Could someone point me at a tutorial?
Also, we should probably be more careful in general about distinguishing test dependencies from library dependencies.

https://pythonpackaging.info/07-Package-Release.html

Seems to be working for me now
Both pip install paml and pip3 install git+https://github.com/Bioprotocols/paml.git --no-cache-dir

I like pyPAML.

I like pyPAML as well, on pypi, and PAML for the general language.

pyPAML looks perfectly acceptable.


Return the NSOperation when fetch with video id

I think it's better and we can cancel any fetch operation
like
-(Cancellable)fetchVideoWithIdentifier:(NSString *)videoIdentifier
in
YTVimeoExtractor

@lovesunstar will add this in a future update.


shutdown quickly and gracefully when inside fork()

Fixes #468

@e2 your branch/fork doesn't seem to show up -- where is this for me to merge it into stable? If it doesn't matter though, it could just go into 0.16.5 later.


Defining a Class#new singelton method causes issues with inheritance

Some y-rb object constructors are defined by the Class#new method. This causes some troubles when using common inheritance patterns:
class MyAwareness < Y::Awareness
  # need to explicitly define new as the defined singelton method does not expect any arguments
  self.new(argument)
    …
  end
end

Instead of declaring #new, we want o just create a regular #initializer method. But, if the new constructor takes an argument and the parent class constructor does not, we end up with an error.

I revisited the project where I wanted to do that, and I decided that we don't need it at all.


Add method chimera::library::container::AtomicMap::contains.

Codecov Report
Base: 15.10% // Head: 10.81% // Decreases project coverage by -4.29% :warning:

Coverage data is based on head (50790b1) compared to base (b07374c).
Patch coverage: 85.71% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           stable     #613      +/-   ##
==========================================
- Coverage   15.10%   10.81%   -4.30%
==========================================
  Files          70       70
  Lines        5394     5390       -4
  Branches      313      314       +1
==========================================
- Hits          815      583     -232
- Misses       4521     4766     +245
+ Partials       58       41      -17

Impacted Files
Coverage Δ

library/object/object.hpp
0.00% <ø> (-75.00%)
:arrow_down:

library/object/object.cpp
21.05% <75.00%> (-11.76%)
:arrow_down:

library/container/atomic_map.hpp
33.33% <100.00%> (-46.67%)
:arrow_down:

library/container/reverse.hpp
0.00% <0.00%> (-100.00%)
:arrow_down:

library/virtual_machine/push_stack.cpp
0.00% <0.00%> (-100.00%)
:arrow_down:

library/virtual_machine/set_evaluator.hpp
0.00% <0.00%> (-100.00%)
:arrow_down:

library/virtual_machine/tuple_evaluator.cpp
0.00% <0.00%> (-100.00%)
:arrow_down:

library/virtual_machine/evaluator.hpp
0.00% <0.00%> (-86.96%)
:arrow_down:

... and 9 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Feat: Backend for Questionnaires

Hello, this PR covers the requirements for questionnaires in backend side XD
Notes: I have changed the old module question (I created before that intended to use for handling the questions in affective annotation project but then unused) to questionnaires
What's new:

backend/config/settings/base.py: added new application in config questionnaires
backend/config/urls.py: added new app's urls to config
backend/questionnaires/apps.py: added new questionnaires app
backend/questionnaires/models.py: added new models for questionnaires, including questionnaire_type, questionnaires, questions, answers
backend/questionnaires/migrations/0002_initial.py, backend/questionnaires/migrations/0003_initial.py: added migration due to changes in models, populate data for 3 tables questionnaire_type, questionnaires, questions
backend/questionnaires/serializers.py: added serializers for these new models
backend/questionnaires/views.py: added views for these new models
backend/questionnaires/urls.py: added endpoints for these new models
backend/questionnaires/test/test_views.py: added test cases for these new views

What's changed:

backend/labels/migrations/0015_textlabel_question.py - backend/labels/migrations/0022_remove_scale_question.py: adjusted the migration files due to the changes when I removed the unused module questions (since some of them have dependencies, for example when I added or removed the question references before)
backend/questions/_: removed unused module questions
backend/pyproject.toml: added new app

The endpoints and format of responses are as below:

List all types of questionnaires: /v1/questionnaire_types

{
    "count": 6,
    "next": "http://localhost:8000/v1/questionnaire_types?limit=5&offset=5",
    "previous": null,
    "results": [
        {
            "id": 1,
            "name": "Przed badaniem",
            "description": ""
        },
        {
            "id": 2,
            "name": "Przed i po badaniu",
            "description": ""
        },
        {
            "id": 3,
            "name": "Po pierwszym tygodniu i na końcu badań",
            "description": ""
        },
        {
            "id": 4,
            "name": "Codziennie w trakcie badania",
            "description": ""
        },
        {
            "id": 5,
            "name": "Ankieta na koniec badania",
            "description": ""
        }
    ]
}

List all questionnaires of given type: /v1/questionnaires/<int> questionnaire_tye_id (for eg type 1)

{
    "count": 3,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 1,
            "name": "IPIP-BFM-20 (Osobowość)",
            "description": "",
            "questionnaire_type": 1,
            "language": "pl",
            "time_of_day": ""
        },
        {
            "id": 2,
            "name": "Demografia",
            "description": "",
            "questionnaire_type": 1,
            "language": "pl",
            "time_of_day": ""
        },
        {
            "id": 3,
            "name": "Humor Styles Questionnaire",
            "description": "",
            "questionnaire_type": 1,
            "language": "pl",
            "time_of_day": ""
        }
    ]
}

List all questions of given questionnaire: v1/questionnaires/<int>questionnaire_id (for eg 1)/questions

{
    "count": 20,
    "next": "http://localhost:8000/v1/questionnaires/1/questions?limit=5&offset=5",
    "previous": null,
    "results": [
        {
            "id": 1,
            "question_text": "Jestem duszą towarzystwa.",
            "questionnaire": 1
        },
        {
            "id": 2,
            "question_text": "Niezbyt obchodzą mnie inni ludzie.",
            "questionnaire": 1
        },
        {
            "id": 3,
            "question_text": "Zostawiam moje rzeczy gdzie popadnie.",
            "questionnaire": 1
        },
        {
            "id": 4,
            "question_text": "Zwykle jestem zrelaksowany/a.",
            "questionnaire": 1
        }
.....
}

Create answer: answers/<int:question_id>, format to send request for eg:

{
    "answer_text": "finally it's friday!!!!",
    "question": 15
}

Edit: I have changed the endpoint for create answer. The user flow to answer/change their answer is as below:

Query the user's answer by question_id and created_date (check if that answer is created today).
If for a question, a user have answer it today (there's existed answer in dtb), then he/she can update the answer, otherwise a new answer will be added.

I think I have found the solution: (1) we need to add an empty __init__.py file in questionnaires/test/ folder, and (2) we need to import from api.tests.utils import CRUDMixin inside questionnaires\test\test_views.py and make the class inherit from CRUDMixin (e.g. class TestQuestionnaireTypeList(CRUDMixin)) 😅 Now poetry can find the new test file, but the test somehow fails 😓

Hello, thank you for the nice work! Overall I think the code looks fine. I just have a few questions:

With the AnswerListAPI, each answer to a question must be submitted individually (one POST for each answer in the questionnaire), right? I think this is the expected behavior, just asking to make sure XD
With the AnswerListAPI, is it possible for a user to submit an answer, delete it, and submit a new one? If not, how does a user edit an existing answer?
When I try to run the tests with poetry run task test, poetry seems to be unable to find the new test files from questionnaires module. In the original affective annotation branch it found 483 tests, and in this branch it also found 483 tests. I also tried print() stuff in the new test file, but the prints are not displayed in the cmd. Would you please check it? XD

Yes, it is submitted individually XD
Yeah, I forgot that maybe users will need to change their answer. I will update it XD
Okie I will check it also, probably I forgot to run the test to check it again XD

2. estions only, but unless I mapped it wrong, I got 3  :"   T

Hello, thank you for your note. I assume that for (1) it's just for noting the way of mapping between questions in BE - questions in FE, right XD And for (2), because when I implemented it, I didn't know how FE will handle and send the data to BE, then I assumed that it's 1 question and the data send to BE will be some thing like [10 (neg-pos), 40 (ospały-bardzo pobudzony)]. But if FE want to split it, I can change it to 3 questions (?) Wdyt XD

Hello, thank you for your points and notes @teddy-f-47 @artikandri XD I have adjusted the code as below:

Adjust the constraints in Answer model. Previously, I thought that (question - answer) per user should be unique, which mean for each question user should have 1 answer only. But then I've changed my mind, because in some case, for example with the Codziennie questionnaire, it's possible for a user to answer the same for the same question everyday. Then I removed the constraint.

The user flow to answer/change their answer: so it will query the user's answer by question id and created_date (check if that answer is created today). If for a question, that user have answer it today (there's existed answer in dtb), then he/she can update the answer, a new answer will be added.

I have fixed some issues in the test cases. Now it's oke XD
Please check it again XD

estions only, but unless I mapped it wrong, I got 3  :"   T

Hello, thank you for your note. I assume that for (1) it's just for noting the way of mapping between questions in BE - questions in FE, right XD And for (2), because when I implemented it, I didn't know how FE will handle and send the data to BE, then I assumed that it's 1 question and the data send to BE will be some thing like [10 (neg-pos), 40 (ospały-bardzo pobudzony)]. But if FE want to split it, I can change it to 3 questions (?) Wdyt XD

I can try doing the combination, but it will be easier if it's just splitted i think XD   But since the questions are the same, how will BE identify which question is which?

estions only, but unless I mapped it wrong, I got 3  :"   T

Hello, thank you for your note. I assume that for (1) it's just for noting the way of mapping between questions in BE - questions in FE, right XD And for (2), because when I implemented it, I didn't know how FE will handle and send the data to BE, then I assumed that it's 1 question and the data send to BE will be some thing like [10 (neg-pos), 40 (ospały-bardzo pobudzony)]. But if FE want to split it, I can change it to 3 questions (?) Wdyt XD

I can try doing the combination, but it will be easier if it's just splitted i think XD But since the questions are the same, how will BE identify which question is which?

I can split it to 2 separated questions - 2 different IDs but in that case I think FE have to make it to be 2 questions somehow different also (I mean 2 headers not 1) :sweat_smile:

Hello, I have tried implementing the update api and it returns error like this :")  Did I do something wrong

Hello, I have tried implementing the update api and it returns error like this :") Did I do something wrong

hello, I think you have typo in the endpoint url, it is answers/<int:question_id>, you missed the s :sweat_smile:

Hello, I have fixed the typos and now it works well,  thank you for the good work and sorry for the trouble  XD   Approved


I cannot yet see line by line coverage in firefox here:

https://app.codecov.io/gh/zingolabs/zecwallet-light-cli/blob/90b4c42b57476f7f32572e08dd9a33c8ce7cafac/lib/src/lightclient.rs

I just refreshed the page...   and it appears to work...  so there's some issue with the server.

Odd. At some point it started working on our firefoxes. Don't know why it was failing. Will leave this open for a while, as this was some spooky action at a distance going on.

Over a month since last post, haven't heard of this particular issue though codecov is still causing us some troubles IIUC.
Closing for the moment to tidy up.


Check if certificateTable overlaps a section and export the information

Aims to fix #972
Checks if any real part of section overlaps with certificate table, if it does, then export that the signatures are not outside of the image and thus ignored by Windows (From experimenting with Windows and PE Bear I think that any physical [real] overlap of section and certificate table results in ignore by Windows).
If this solution is fine, I'll create tests for this.

I think this may deserve an entry in the detected anomalies as well - I'm right @ladislav-zezula?
Could be. The question is also how many of such samples do we see - if not many, then it's perhaps abundant to define an anomaly.

It kinda reminds me the case we dealt with not that long ago with @ladislav-zezula. There were valid .NET structures in resources of PE file and we parsed them and shown them in fileinfo output. But the decision was to not parse these information. I kinda see some resemblance here. Someone put valid structure of a signature into last section but that is completely unacceptable to expect the signature there.
@ladislav-zezula let us know if you find out how common is this. But if we were to put it somewhere in fileinfo output, I would completely separate it from valid sigantures. I wouldn't rely on the fact that someone inspects some specific isValid attribute but I'd rather put it somewhere separately into some outOfImageSignatures array if really necessary.

 And keep the outOfImage signatures, because they are valid, like classic "digitalSignatures"? But I am not sure if the out/in ImageSignatures description is descriptive enough for most people that might not know the difference between those two.

From the analysis @ladislav-zezula did I got the feeling that it's not very common thing so I personally think that having these inside image or invalid signatures might be a bit pointless. Let's just list what is really a signature. What do y'all think?

Is it just me, or is tools.fileinfo.bugs.certificate-invalid-dates.Test failing? TC is down, so I cannot verify it there now. But based on the discussion in this thread, it looks like invalid signatures are no longer collected - the test in question had "Signature isn't valid" warning and I think its signatures are correctly missing.
Therefore, @HoundThe verify it, and if so remove/modify the test in https://github.com/avast/retdec-regression-tests/pull/100 and maybe even purge those warnings (and others like it) if they no longer make sense - i.e. such signatures are not to be taken into account.

Weird, the test is okay for me and I don't see anything about "Signature isn't valid" in the test.
But I see I wrongly named the branches, maybe the problem is that RetDec PR is named pe_signature_inside_image and Tests PR is inside_image_signature?

But I see I wrongly named the branches, maybe the problem is that RetDec PR is named pe_signature_inside_image and Tests PR is inside_image_signature

That would be a problem for TeamCity - it only associates branches with the same names. But I did this manually on my machine, so this was not an issue. Also, I reported this before and you said you could not reproduce it, so I'm wondering what is happening.

lets run TC tests

@HoundThe At the moment, there are merge conflicts.


Add query parameter languageCode to movie details endpoint

I am not sure if I have done everything correct.
The details endpoint for movies is missing the language endpoint
I have added it.

@armintelker Thanks for the PR.
This issue seems odd. The language code is added to ALL requests in the APIClient
https://github.com/adamayoung/TMDb/blob/17d8acefb41cd33b423357a831d4126aea6f4fa2/Sources/TMDb/Networking/TMDbAPIClient.swift#L123C32-L123C59
And the language code comes from here
https://github.com/adamayoung/TMDb/blob/17d8acefb41cd33b423357a831d4126aea6f4fa2/Sources/TMDb/Adapters/LocaleProvider.swift#L24
Can you double check this is behaving correctly, and it's not just an issue on fetching movie details?

@adamayoung
Hey maybe I am understanding it wrong but how can I set the language code without changing the OS language? I am from Germany and I want to fetch the movie details in English and German. I have searched in the documentation and the code but everything that would help me to change the language code is not public and only accessible inside the library.


ParseException: Extends on compressed stream not supported yet

While parsing a PDF, I get the above exception in line 60 of indirect_object_parser.dart.
My PDF contains an object 3376 0 obj starting with <</Extends 3375 0 R/Filter/FlateDecode/First 696/Length 741/N 72/Type/ObjStm>>stream which seems to be the continuation of said object that looks like this <</Filter/FlateDecode/First 979/Length 948/N 100/Type/ObjStm>>stream.  Both objects are rather small and not references anywhere else in the PDF (so probably either only the in xref or in some compressed data stream). Glancing at the PDF standard I don't really know why this feature exists, but it seems to be an optimisation to keep the number of indirect objects inside the stream data small.
I don't know whether I need these objects at all so an Exception is a rather harsh way to mark a limitation of the parser.
If I remove that exception, my code seems to work just fine, but because my PDF has 600+ pages, I'm not sure whether something is missing now ;-) Still, I'd prefer to get just a warning and have still a working parser.

They denote compressed objects which are referenced somewhere when reading whatever you need, in which case they cannot be skipped as they form part of the xref table. I have never seen a PDF with extended compressed object tables so support for this was not built.
If you have an example PDF where this happens that you can share, I can build support for this

If you have an example PDF where this happens that you can share, I can build support for this
Right now, I only noticed it in files I cannot share but I'll keep looking.

This free but rather large PDF contains object streams with /Extends declaration.

Thanks, I will take a look and see if we can start supporting extends somehow

Experimental support for this is in 0.4.0

Thanks, seems to work – at least, no exception ;-)


Feature : PlatformIO compatability

hey there!
This is more of an issue rather than a feature request.
Would be great to prep this addon for use with PlatformIO
I've sketched it out a bit for my own use.
You probably want to make quite a few changes if you want to pull this in (i.e. set it to be your git addresses for a start)
also you'd need to register the library on the platformio register
anyway, hope this hint helps

Thanks for all the work on this!

@elliotwoods My apologies for being missed for years... thanks for your work!

Seems the test broken because of another reason; threat as another issue.


Set version v1.2.0

Update libraries to use python 3.7
Share one push_token with multiple owners

Pull Request Test Coverage Report for Build 344

16 of 17 (94.12%)  changed or added relevant lines in 3 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.03%) to 89.6%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

safe_notification_service/safe/serializers.py
2
3
66.67%

Totals

Change from base Build 338:
-0.03%

Covered Lines:
896

Relevant Lines:
1000

💛  - Coveralls


[New term] Firewall for En

Please describe why this term needs to be added
What this term is about? (briefly)
A firewall is a system present in Network Layer which protects a secure network from an unsecure network. It keeps out all unauthorized traffic.
Why this term needs to be added? (briefly)
Firewall is one of the most common terms which people come across while working with a browser even when their connection fails. But at the same time, most do not know about it.

@seokho-son , is this assigned to me?
I am ready to contribute

Hi @akshatcoder-hash This issue is in triage/awaiting
Maintainers are assessing the term if the term needs to be included in the CNCF Glossary. If the term is accepted, we will give the triage/accepted label to the issue and assign the task to you.

@akshatcoder-hash, here you go @akshatcoder-hash. Please make sure to read the style guide before getting started.

@CathPag , please assign this issue to me so that I can contribute to this.

Oops, sorry, forgot to do that. It's assigned now :)


How To Code: Simple Data thoughts and observations

I'll start with the pros, because there are some!  It's clear the tutors worked very hard on the course and making it accessible.
Pros

Ability to use images directly in code, and in general untyped data
Focus on visual programs that show students what their code is producing and how it is doing it.
TDD (ish).  The introduction of writing tests before coding, even though the implementation is very different to TDD, is a good introduction to how vital tests are and is an important lesson for students to always write thorough tests before delivering a feature
Every concept is clearly explained as it is introduced, and the teacher then reinforces past knowledge in a similar manner.
check-random.  Although this hasn't yet been introduced to the user.

Cons
[NB some of this is very subjective, and I haven't yet finished the course.  I had intended to so before I wrote this ticket, but after discussion with @hanjiexi I figured I may as well share now]

The code is ugly and hard to read.  There are parentheses everywhere, both ) and ] but, surprisingly, no }  (yet)
The instructors insist on using naming conventions that, should they pass through my pull requests, I would reject outright.  In few worlds outside of embedded are variables in functions now just one letter, so why can't we have (define (name-cat name) ...) instead of (define (name-cat n) ...)?  Why name a constant (define P1 0) when you could name it (define START 0).
There is an overreliance on course design schemas that can only be found in the course, that are overly complicated, and that would be difficult for a beginner to learn.  I shouldn't have to return to a design pattern five times when designing a "world" - once for the world, three more times for templates... it's just repetitive and lacks value
Over-reliance on copy-pasting.  In an almost flagrant disregard of DRY (do not repeat yourself) principles, the instructors have us copy-pasting templates all over the place, even when they add little to no value and make the solution more complex.
No variables, only constants.  This makes programs far more bracket-heavy than they need to be, and mean that simple tests and function definitions are dragged out over multiple lines
No objects.  You define structs, but these are essentially read-only collections of data.  They are completely immutable.  A function that needs to take a Cat and return a Cat must make an entirely new Cat.  In object-orientated languages, however, the student would be able to simply call cat.setXPosition(cat.x + SPEED) and have done, compare with (make-cat (+ (cat-x cat) speed) (cat-y cat) (cat-age cat))
Over-reliance on function calls.  Why, to make a list, must I call (cons 1 (cons 2 (cons 3 (cons 4 empty)))) instead of just (make-list 1 2 3 4) or similar?
Boundaries on student-defined data structures.  We are essentially writing in a contract and then assuming that whoever calls it will obey this contract, but there is no code enforcing this behaviour.  There is therefore nothing to stop the student from missing a case where they accidentally provide or return the wrong data type.  (NB this is a problem with teaching untyped languages to beginners in general, and is not unique to student language))
If there is a way to make a zero-argument function I couldn't find it by trial and error (now that I've written this, someone is going to point out it's super easy), and the case isn't covered by the instructors.
BSL - the language, despite being ugly and full of parentheses) is definitely not equipping the student to find gainful employment, nor the tools to move to e.g. javascript, java, python.

[Disclaimers: I am but one person, and the views expressed here are personal to me.  I have not yet completed the course.  I am not a beginner, although I am a beginner to computer science.  I also sometimes exaggerate.  I would not be exaggerating, however, in saying that I find the course incredibly frustrating]
@gjergjk71 -  anything to add?

Thanks for posting all your thoughts! You were thorough, so I will be thorough too.

The code is ugly and hard to read. There are parentheses everywhere, both ) and ] but, surprisingly, no } (yet)

Yeah, S-expressions are a low-level syntax. You see them in the intermediate languages of many compilers, in WebAssembly, and commonly as a data serialization format. If we could have the exact same course that used a higher level syntax I would pick it in a heartbeat. I know one of the HtDP authors is working on one such language and that's likely where we're headed whenever there's more material available for us to use.
One advantage, however, of this lower-level syntax is how close it is to lambda calculus syntax, which (in my planned changes) students would be learning about soon after the course finishes. I think the advantages outweigh the disadvantages.
All of that said, I adopted a style for S-exp based languages (involving lots of newlines with vertically aligned columns) that I ended up preferring over everything else — even other languages.

The instructors insist on using naming conventions that, should they pass through my pull requests, I would reject outright. In few worlds outside of embedded are variables in functions now just one letter, so why can't we have (define (name-cat name) ...) instead of (define (name-cat n) ...)? Why name a constant (define P1 0) when you could name it (define START 0).

I agree with this; I ended up renaming some of the provided variables to make them easier to remember.

There is an overreliance on course design schemas that can only be found in the course, that are overly complicated, and that would be difficult for a beginner to learn. I shouldn't have to return to a design pattern five times when designing a "world" - once for the world, three more times for templates... it's just repetitive and lacks value
Over-reliance on copy-pasting. In an almost flagrant disregard of DRY (do not repeat yourself) principles, the instructors have us copy-pasting templates all over the place, even when they add little to no value and make the solution more complex.
Over-reliance on function calls. Why, to make a list, must I call (cons 1 (cons 2 (cons 3 (cons 4 empty)))) instead of just (make-list 1 2 3 4) or similar?

I grouped these together because these are all really just the beginner-oriented pedagogical approach at work.
Beginners need to see the same patterns over and over again to ingrain them into their minds, so copy-pasting templates is directly beneficial. It's no different from a math teacher recommending that students copy down the formula for each new problem that they will use it to solve.
DRY (i.e. abstraction) comes later, when you know the patterns by heart, at which point you can use functions that abstract over those patterns. BSL deliberately doesn't include these, but ISL and ASL (used later in the course) provide many such abstractions, such as list-literal syntax (list 1 2 3 4). See the language progression here: https://docs.racket-lang.org/htdp-langs/beginner.html

No variables, only constants. This makes programs far more bracket-heavy than they need to be, and mean that simple tests and function definitions are dragged out over multiple lines

Not quite sure what you mean, are you talking about mutable data? If so see my next section.

No objects. You define structs, but these are essentially read-only collections of data. They are completely immutable. A function that needs to take a Cat and return a Cat must make an entirely new Cat. In object-orientated languages, however, the student would be able to simply call cat.setXPosition(cat.x + SPEED) and have done, compare with (make-cat (+ (cat-x cat) speed) (cat-y cat) (cat-age cat))

What you're describing isn't a difference between records/structs and objects, but a difference between records with and without mutable fields.
You mention "simply call cat.setX...`" but this is far from simple. Introducing mutation means completely re-designing the teaching material around a different and more complex model of computation. The substitution model is used here because it is the simplest starting point (they also use it in the beginning of SICP). It's the same model students would have been accustomed to in high school math. However, this model breaks in the presence of mutable data.
Plus, immutability is actually quite normal nowadays due to how mutation doesn't scale easily to large or complex systems. In React(+Redux) for instance, you are treating data as mostly immutable, with functional reducers for handling state and components as pure functions of the state. The React(+Redux) engine then handles the mutation by diffing the new structures against the old.
As an aside, objects occupy a layer of complexity above records/structs. Records are just regular product types. But an object is a kind of extensible record that somehow has access to self/this. How do you extend a record? You generally you need either subtyping or row polymorphism. While you could introduce objects in a beginner class I think it creates too much confusion and cognitive overload. Plus, almost every language tightly couples its object system with its class system, which is even more complexity.

Boundaries on student-defined data structures. We are essentially writing in a contract and then assuming that whoever calls it will obey this contract, but there is no code enforcing this behaviour. There is therefore nothing to stop the student from missing a case where they accidentally provide or return the wrong data type. (NB this is a problem with teaching untyped languages to beginners in general, and is not unique to student language))

All true. I wrote about the trade-offs of static vs. dynamic typing in a beginner course in #540. I find language-level dynamic typing to be silly in general — it is subsumed by static typing — but I ultimately felt that dynamic typing (or even no typing at all) is better suited for beginners.
But this is probably the only course where I feel comfortable with this, because if you pay careful attention, they are actually teaching type-driven programming with a simple algebraic type system. It's just that, for the sake of simplicity, nothing is verifying those types; they're going in the comments above each function. This provides the foundation for moving to static typing later.

If there is a way to make a zero-argument function I couldn't find it by trial and error (now that I've written this, someone is going to point out it's super easy), and the case isn't covered by the instructors.

I've never heard of a zero-argument function; if it has no arguments it would just immediately evaluate the right hand side to a value. To delay evaluation of the right hand side (i.e. to turn a value into something that can be called) you need an argument. An argument with no data is called the unit value and is written ().
Just as calling a function that takes unit is written some-fun () in most languages, in Lisp/Racket/BSL you just move the left parenthesis to the left of the function name, yielding (some-fun). You can make multiple calls to the same function this way, e.g. two calls would look like this: ((some-fun)).
But anyway, BSL is a deliberately limited language and perhaps doesn't support whatever you're doing. (Lambdas don't come until ISL.) I don't think any of this should be necessary in the course. I don't recall ever defining functions that took unit, and they would have taught the student everything needed to solve a certain problem. I do recall being challenged around generating something, but I eventually found a solution without doing anything fancy. I think I often experienced what you are: trying to solve something in the way I'm used to and struggling, because the problems are designed for people with a much more limited set of options and experience.

BSL - the language, despite being ugly and full of parentheses) is definitely not equipping the student to find gainful employment, nor the tools to move to e.g. javascript, java, python.

This is where OSSU differs significantly from coding bootcamps and other similar short-term programs. OSSU is meant for long-term study of several years, similar to an undergraduate degree. The goal is to provide the right level of difficulty at the right level of abstraction for students in a multi-year journey from novice to master. You don't have time for proper scaffolding and robust conceptual understanding in a short-term program.
Students will end up learning those messy industrial tools later in our curriculum, but learning simple and elegant models of computation first will give them a significant competitive advantage compared to their peers in the bootcamps. We can't compete with bootcamps on quantity, so we compete on quality.

Started OSSU December 2017 with MIT Intro course, then CS50, then How To Code. Currently knee-deep in maths and in the middle of the Haskell from First Principles book. Do about 10-12 hours a week normally.

That is awesome @xxylem. Keep going!! Thank you for coming here to share your thoughts.
There is nothing quite like How to Code / How to Design Programs in terms of its highly structured approach, and that's why I can't in good conscience replace it with something similar but more challenging. Plus, we'll find that more challenging material often has many of the same perceived deficiencies (Lisp syntax, cons, etc.), or if it uses something else it will have a different set of deficiencies (e.g. weird Pythonisms).
Your story led to me think about how different the experience of OSSU is for everyone, and how there is nothing I can really do to stop it. There is another criterion for evaluating a course that I have a tendency to neglect, which is emotional impact. No matter how theoretically excellent a course's content is, it would be very sad if the emotional impact of taking it as a first course was so bad that the student ends up quitting. So I'm going to re-think my approach in #540.
@KathrynN, I'll leave the issue open for a short while in case you have more thoughts to add about later parts of How to Code. I do hope you continue with it and start to see the benefits, but feel free to share either way. I prefer negative feedback over no feedback!

I took this course 2 or so years ago? Before then I had some experience making prototype games in javascript. Very good points! I dropped it half way through our so(at abstraction) because I felt like I got the general gist of its all about. For people who have had some programming experience, it does get dredging.
Anyways, some objections!
I personally think the syntax is very intuitive and the language is great for beginners. I took Java with friends who had zero programming experience and helped a little with C++ and I've found they're just blindly bashing their way through programming problems making really long functions that are hard to debug and not really understanding what they're doing(not trying to diss them, they're very proficient in Mathematics, which I suck at). The boilerplate of class bodies, types, matching closing brackets, etc, make syntactic errors more prevalent as its easy to misspell keywords and close statements. Arguably even though error messages and modern IDEs give good hints, and that you gradually get used to knowing whats wrong, I notice that early on, crashes are taxing with frustration and disrupt "flow".
Overtly I think this is the best course for introduction to programming because it is more oriented towards teaching reasoning and intuition, stripping and reducing everything down to the minimum foundations of transforming data with just functions with good practices like reducing mutations and functional programming. Having to painstakingly type comments out on data definitions and write tests made me appreciate and understand static typing and features that I take for granted in other languages.
Not an endorsement but:
https://youtu.be/1PhArSujR_A
https://youtu.be/ydyztGZnbNs
John Carmack has a few good points on racket and functional programming.
Overtly I agree that some things are stupidly redundant but I think beginners appreciate the verbosity early on.

Personally I have found How To Code: Simple Data extremely dull and tedious which lead me to drop it and OSSU altogether since it's not possible to finish OSSU without completing the course.
I think given the amount of complaints it's very important the course gets an alternative or even gets replaced.

@anon88391
Firstly, the beauty of self-learning is that you have a great deal more freedom to decide your path. In this case, there are other courses you could work on first before coming back to this course:
Learning how to learn:
It seems to be no longer listed on the curriculum but this is a very useful short course about learning in general and how to self-motivate/effective study methods.
In Systems:
Introduction to Computer Science - CS50:
An intro CS course from Harvard, but it doesn't go nearly as deep as How to Code. More lively though.
Build a Modern Computer from First Principles: From Nand to Tetris:
For part 1, you don't need any programming knowledge and it certainly was a very interesting insight into the low-level world of computer hardware.
In Maths;
You could start on either linear algebra or calculus if you do not have these already.
When deciding on the next course, I open up a course, have a look and decide if it's the right one to do next. At times, I did two or three courses simultaneously, depending on the depth and complexity of the course. I would think about: is it too difficult or easy? is it the right next step: do I need this knowledge before anything else? Is there something else I need first? Am I interested in this?
Also, while video courses are more capitvating, I have found following textbooks to be easier sometimes. You can read much faster than people speak and obviously there can be much more and much more detailed written content than someone can record on video.
Regarding this specific course, I think long-term it was probably one of the most useful. In fact, the absence of bells and whistles means that it's all content. You learn systematic habits for building up data structures and performing operations on that data. Perhaps, after doing some of the other courses above and coming back to it, you will be properly motivated to go forth with it. If not, there is also the book that is was based on.
Anyway, if you have more questions, feel free to ask. Hope you manage to find a way through this blockage!
Josh

Personally I have found How To Code: Simple Data extremely dull and tedious which lead me to drop it and OSSU altogether since it's not possible to finish OSSU without completing the course.
I think given the amount of complaints it's very important the course gets an alternative or even gets replaced.

I'm pretty much just started in OSSU and have recently gone through the How To Code (or as much of them as I could whilst auditing and in a full time job before the time limit was up).
I appreciate that it can be dull. It can be frustrating if you've done a bit of other languages before.  It sounds like this is the emotional impact hanjiexi talked about.
However, even though I found these modules dull or repetitive, or even a bit simple at times after other more involved Python/Java classes, I still think that it's important for building a foundation and that can't be ignored. For those that don't know the concepts it teaches them. For those who have encountered them before it reinforces them. This is important for overall course structure.
At university I studied languages, and the first year was comprised of making sure all students understood the core concepts of the language that the rest of the degree was built on, regardless of who'd studied further at school or who was fluent in the language, or had it as their mother tongue. I don't see much difference here.
Because of that, I wouldn't consider dropping them from the course at all.

I'd like to point a different thing, which is more general, about design patterns.  I'm pretty much frustrated about it right now. As (probably) you guys have seen, htdf(how to design function) and htdd(how to design data), are design patterns proposed for a good software engineering. As far as I've seen, there are even more of them outside the mooc. My question is, why is it considered to be right to apply a specific design pattern to individual problems. Yes, there are similarities between those problems but what about the parts that are problem-specific ?

@log101 HTDF and HTDD is not really a design pattern, rather what I'd like to say, is the implicit cognitive thought process that everyone does in their heads when translating ideas to code, whether they are aware of it or not. If you write in a statically typed language, for the most part, you pretty much do everything in htdf and htdd except writing tests and explicitly writing comments about what variables and functions mean, relying on the names and intuition. I'm going against mindlessly and strictly following all steps of HTDF because as you program more and more, just like how you do math more and more, you will not need the extra verbosity, similar to how you used to write 9+9+9+9+9+9 to remember what the concept of 9 * 6 is. When you are off though, it is a good debugging technique because verbosity helps(https://en.wikipedia.org/wiki/Rubber_duck_debugging).
A design pattern is a set of code that solves specific problems (https://en.wikipedia.org/wiki/Software_design_pattern , strict description of when to use it) that keep reoccurring in programs, and people researched it and claim they have found that (x) set of code organized in (x) way is the best way to address the problem in a clean way.
https://youtu.be/JjDsP5n2kSM?t=755 A talk by Jonathan Blow sums this up pretty well. Data structures, design patterns, we all prematurely want to perfect and protect against problems that don't really exist yet. So when should you apply a design pattern? When problems actually start arising. Is your code being poorly understood? Is it becoming a pain to maintain? A lot of repetition and similarities everywhere? Then look into patterns and see if they apply to your specific problems.
https://youtu.be/jlcmxvQfzKQ another relevant video. In short, forget trying to apply too much of "the best structure" to something you have not even built yet. Make It Work, Make It Right, Make It Fast

@jestarray I think I get it... But I didn't get that part: "So when should you apply a design pattern? When problems actually start arising." But for example, how I am going to change the code I have been writing for a year so that it is OK according to a design pattern ? It wouldn't be hard ? Shouldn't we start with a design pattern from the beginning ?

@log101 You will always be rewriting, scrapping and cleaning things up, and it shouldn't be too hard because it's just translating what you already have, to a more cleaner style.
Yes there will be some cases where you should read up on design patterns, like in game development, the design pattern of the game loop is a MUST that you really should start with from the beginning, but not all design patterns hit that critical mark.
I was in your position before, looking everywhere for the best way to do things before starting, reading a crap ton of books but it takes away from the joy of programming, and you will not remember all of them because that's not how your brain works. Imagine if someone said you have to read a 300 page strategy manual on the best way to play a game, before playing the game, because once you read it, you might do everything perfectly. I'm not saying you shouldn't look before you leap, but you shouldn't be too afraid of leaping. Besides, starting off with a sloppy implementation builds the meaning of why the design pattern is useful and will allow you to recognize when in other peoples code.

@jestarray Now I see, thanks for clearing thing up ! I should get to work then, until I feel a need for a pattern :d

There is a current RFC open on replacing How to Code. Comments welcome! https://github.com/ossu/computer-science/issues/588


Stop the travis build when test or build fails & added stage to only build and test on pull request

closes #61 , #62

This hasn't been validated. It can be validated when we do a pull request


Some MagicHDR.fx Issues

Failed to Create Texture
It was mentioned years ago by #3 , and now I have probably found the buggy part ( line 406-409 )

DEF_DOWNSAMPLED_TEX(
	Bloom6,
	64,
	FXSHADERS_GET_MAX_MIP(BUFFER_WIDTH / 64, BUFFER_HEIGHT / 64));

In the last line, the macro forget to divide the size by DownsampleAmount.xy, then it probably fails because of trying to create mipmaps.
However fixing with FXSHADERS_GET_MAX_MIP(BUFFER_WIDTH / DownsampleAmount.x / 64, BUFFER_HEIGHT / DownsampleAmount.y / 64) doesn't work either. During my test it needs an extra decreasing by 1, then it works fine.
DEF_DOWNSAMPLED_TEX(
	Bloom6,
	64,
	FXSHADERS_GET_MAX_MIP(BUFFER_WIDTH / DownsampleAmount.x / 64, BUFFER_HEIGHT / DownsampleAmount.y / 64) - 1);

I'm not sure if I should remove the "plus 1" operation in the definition of FXSHADERS_GET_MAX_MIP or just fix it here, since I cannot test the OpenGL part of the code.

Conflict with MagicBloom.fx
ReShade provides MagicBloom.fx in it's reshade-legacy series shader. When loading both MagicBloom.fx and MagicHDR.fx, the bloom part in MagicHDR.fx breaks due to some bloom texture conflicts, even MagicBloom.fx is not enabled.
I have tried turning off the pooled = true notation in MagicHDR.fx. It works fine and seems to be a fix.

Thanks for investigating the issue!
It's been a while since I've last touched that part of the code, but it boils down to miplevel detection being very flaky.
Most of the time it works flawlessly, then it breaks out of nowhere because of a weird display configuration.

In the last line, the macro forget to divide the size by DownsampleAmount.xy, then it probably fails because of trying to create mipmaps.

I think that might have been a quick hack to fix issues I had with it.
The shader could probably get away with getting a miplevel that's just "low enough", but then it wouldn't be able to take advantage of the fact that the lowest mip level is always a full screen color average, which is essential for adaptation.
I don't know exactly why pooled = true breaks, there may be an oversight in the names I've used for textures and they end up with identical names, or there could even be a bug (or hard behavior) related to the special properties of the texture in ReShade, but pooled is generally used to let ReShade know it can share textures that flag it in order to recycle vram.
I can't promise to fix this any time soon since I've stopped using Windows entirely and rarely use ReShade, but if you can come up with a solution that works with most cases (OpenGL included, like Minecraft) I'd be welcome to accept it.


Widths of elements in Grid changes when more elements added

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Steps to reproduce 🕹
Link to live example: https://codesandbox.io/s/serene-lichterman-j9yemg?file=/demo.tsx
Current behavior 😯

Widths of cards are different for Grid and Grid2 depeneding on 1 or 2 row of elements.
Expected behavior 🤔
All cards have same width
Context 🔦
I would expect that per default items are aligned correctly. I hope that Grid2 is good opportunity to fix this :)
Your environment 🌎

Dependancies
Add Dependency

[@emotion/react](https://codesandbox.io/examples/package/@emotion/react)
latest (11.10.6)
[@emotion/styled](https://codesandbox.io/examples/package/@emotion/styled)
latest (11.10.6)
[@mui/material](https://codesandbox.io/examples/package/@mui/material)
latest (5.11.15)
[@types/react](https://codesandbox.io/examples/package/@types/react)
latest (18.0.31)
[@types/react-dom](https://codesandbox.io/examples/package/@types/react-dom)
latest (18.0.11)
[react](https://codesandbox.io/examples/package/react)
latest (18.2.0)
[react-dom](https://codesandbox.io/examples/package/react-dom)
latest (18.2.0)
[typescript](https://codesandbox.io/examples/package/typescript)
latest (5.0.2)

Using: Google Chrome Version 111.0.5563.110 (Official Build) (64-bit)

Sorry, I don't understand the point of the issue. Can you be more specific and provide a real world example?


Cleanup

Seems like a good point to do some tidying.
This PR sorts and removes unused using statements, reformats code files, and removes some prebuild/gorgon/arcanist files that we no longer use.

:+1:

Actually, ima hold off on this for a later date.


Implemented model cursor for visual feedback #760

Implemented model cursor for visual feedback
/claim #760

What kind of change does this PR introduce?

Summary

Checklist

[x] My code follows the style guidelines of OpenAdapt
[x] I have performed a self-review of my code
[x] If applicable, I have added tests to prove my fix is functional/effective
[x] I have linted my code locally prior to submission
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation (e.g. README.md, requirements.txt)
[x] New and existing unit tests pass locally with my changes

How can your code be run and tested?

Other information

Good start! It might be easier to copy and paste the contents of vanilla.py and start from there. It's not clear to me what is the right abstraction for strategies that build on it.

I think probably we want to use a methodology similar to VisualReplayStrategy (i.e. segmentation + description) to generate initial cursor target candidates, then use the model cursor feedback to let it self-correct.

@abrichr I've made some changes in the files please review them and let me know if something more needs to be done

@Subh231004 your code is unfortunately quite disorganized and difficult to read. I have enabled a build so that you can see the errors that will be reported by our style checkers. Please address those and I will be happy to take a closer look.

@abrichr can u please review the code I've tried to make it readable

@abrichr
Just a quick FYI that similar low-effort PRs have been opened in other projects^1 that end up getting closed.
I only noticed because I got quite a few nonsensical GitHub notifications from Subh231004 here^3  that have since been deleted by the maintainers.

I'm a beginner to the open source world and I'm trying hard to get to the
problem statements
I've had a short conversation with the maintainer of OpenAdapt and I have
his permission to work on it
I am just following whatever he is suggesting me
On Sat, 22 Jun 2024, 3:07 pm Saïd, @.***> wrote:

@abrichr https://github.com/abrichr
Just a quick FYI that similar low-effort PRs have been opened in other
projects1
<#m_5310800255775685780_user-content-fn-1-d3fabde2417a5c3626868e381f6a1cdb>
2
<#m_5310800255775685780_user-content-fn-2-d3fabde2417a5c3626868e381f6a1cdb>
that end up getting closed.
I only noticed because I got quite a few nonsensical GitHub notifications
from Subh231004 here3
<#m_5310800255775685780_user-content-fn-3-d3fabde2417a5c3626868e381f6a1cdb>
that have since been deleted by the maintainers.
Footnotes

https://github.com/langchain4j/langchain4j/pull/1316 ↩
<#m_5310800255775685780_user-content-fnref-1-d3fabde2417a5c3626868e381f6a1cdb>
2.
https://github.com/gyroflow/gyroflow/pull/847 ↩
<#m_5310800255775685780_user-content-fnref-2-d3fabde2417a5c3626868e381f6a1cdb>
3.
https://github.com/langchain4j/langchain4j/issues/1132 ↩
<#m_5310800255775685780_user-content-fnref-3-d3fabde2417a5c3626868e381f6a1cdb>
—
Reply to this email directly, view it on GitHub
https://github.com/OpenAdaptAI/OpenAdapt/pull/781#issuecomment-2183961028,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BESS73R4UGI6JPAFPOYJ5L3ZIVAXLAVCNFSM6AAAAABJR2DPHWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBTHE3DCMBSHA
.
You are receiving this because you modified the open/close state.Message
ID: @.***>

I'm a beginner to the open source world and I'm trying hard to get to the problem statements I've had a short conversation with the maintainer of OpenAdapt and I have his permission to work on it I am just following whatever he is suggesting me

@Subh231004 I totally get that. I was merely commenting so Richard could calibrate his expectations accordingly.

Thank you @ayewo .
@Subh231004 thank you for your efforts. I appreciate your desire to contribute and I encourage you to continue. However this code is unfortunately not reviewable in its current state.
I suggest you try a simpler problem before attempting this one.


Add eslintConfig to new projects automatically

I added the eslintConfig to automatically be injected into the package.json rather than having to go the extra step and copy/paste it manually.

We actually used to do this in the past, but there were issues with editors not finding the config since it was a deeper dependency. We now switched away from bundledDependencies so dependencies should be flat again, but this will still bite npm 2 users.
I would hold off until we officially stop supporting npm 2.

Is this worth doing if we detect the Node version to be >= 6? Or would we be concerned about project portability between team members then?

@gaearon so what would you suggest for the resolve? Should I add the flow-types back?

@gaearon what would you suggest for the resolve of this PR? Should I close it or should I push further in a direction?

I think we can do it—let's revisit this next time we look at cutting a minor release.

We were worried about npm 2 in 2017? Gee, how time flies...


Update links to docs

The website is now the best place to browse the docs.

Not necessary for this PR, but a good opportunity for plugin => app :)

Yeah, that's actually coming in a subsequent PR. I could have just done them all in one to save time, but oh well.


Update

Hi, will the webpanel get any updates anymore?

Yes, I've made quite a huge amount of performance upgrades and more, I'm adding the "Hide offline miners" switch right now.

Oh insane I'm hyped

Any atm then it get released?

Yes, I've made quite a huge amount of performance upgrades and more, I'm adding the "Hide offline miners" switch right now.

Then is release date?

Not sure, I'm trying to implement some other ideas people have had though I've also scrapped some. Right now I'm trying to effectively implement geo flags for the IPs.

Sound great


No need to rely on fixed container names

Fixes #32

Find containers by com.docker.compose.service label in Travis
Find the "mgmt" container by an ad-hoc label for "make exec"
Inter-Docker references by host name (e.g. "db") keep working,
thanks to Docker's magic

Thanks for the inline doc @domq : that's perfect !


Await turbo stream insertion in DOM

Turbo Streams are inserted into the DOM async currently. Being able to wait until these elements are inserted allows for the user to apply animations and take other actions after the insert is complete.
The wait won't break any existing usage, it would only introduce a small wait while the elements are inserted.
This should fix #35

Fantastic. I think this is good to go @marcelolx 👍


Added New Programs

Also pardon the “renaming" , I placed all the files into the Extras instead of seperate folders


Style vBind not working in Production Mode

Version
3.1.2
Reproduction link
https://github.com/vuejs/rfcs/pull/231#issuecomment-872314916
Steps to reproduce
I used the Js variable in the style tag. This feature is working in development mode but not in production mode. The reason is, the variable names created are different.
<template>

        Select Color
        <input type="color" v-model="customTheme" />

        {{ customTheme }}

</template>

For example,
--7ba5bd90-customTheme => The name of the variable that is bind to this element.
var(--e8f15df8) => This is the name of the variable generated in the style.

What is expected?
I expected this feature run in production mode too.
What is actually happening?
This feature is working in development mode but not in production mode.

duplicate of https://github.com/vuejs/vue-next/issues/3921

Duplicate of #3921


iojs build for 1.x devline branch

Wow! Someone's been busy! :) thanks!

Only slightly. It was mostly scripted :-)
On Mar 25, 2015 4:57 AM, "Will McKenzie"<EMAIL_ADDRESS>wrote:

Wow! Someone's been busy! :) thanks!
—
Reply to this email directly or view it on GitHub
https://github.com/OiNutter/node-build/pull/40#issuecomment-85936369.


add disable-prop

Attempt to implement #86

Obviated by #79, where you can replace the handle with something non-functional.


subset arg of H5PYDataset overrides which_sets

The documentation clearly states that the subset is interpreted "within the context of the split", but:
>>> from fuel.datasets import MNIST
>>> train = MNIST(which_sets=['train'], sources=['targets'])
>>> test = MNIST(which_sets=['test'], sources=['targets'])
>>> subtest = MNIST(which_sets=['test'], sources=['targets'], subset=slice(0, 10000))
>>> train.get_data(request=slice(0, 10))
(array([[5],
        [0],
        [4],
        [1],
        [9],
        [2],
        [1],
        [3],
        [1],
        [4]], dtype=uint8),)
>>> test.get_data(request=slice(0, 10))
(array([[7],
        [2],
        [1],
        [0],
        [4],
        [1],
        [4],
        [9],
        [5],
        [9]], dtype=uint8),)
>>> subtest.get_data(request=slice(0, 10))
(array([[5],
        [0],
        [4],
        [1],
        [9],
        [2],
        [1],
        [3],
        [1],
        [4]], dtype=uint8),)

Confirmed. Ergh.

The following is working correctly, though:
>>> subtest = MNIST(which_sets=['test'], sources=['targets'], subset=list(xrange(10000)))

@vdumoulin is having a look right now.

The offending block of code is the following. The logic is plain wrong.
Thinking of it, I'm wondering if we should simply not care about maintaining slices if the split is defined by a slice and the subset is also a slice. Always converting the split into a list of indices and using subset to slice/index through that would make the logic much simpler, both for load and _out_of_memory_get_data.

Also absurdly inefficient for large numbers of examples...
On Mon, Aug 3, 2015 at 4:35 PM, vdumoulin<EMAIL_ADDRESS>wrote:

The offending block of code is the following
https://github.com/mila-udem/fuel/blob/master/fuel/datasets/hdf5.py#L528-L536.
The logic is plain wrong.
Thinking of it, I'm wondering if we should simply not care about
maintaining slices if the split is defined by a slice and the subset is
also a slice. Always converting the split into a list of indices and using
subset to slice/index through that would make the logic much simpler,
both for load and _out_of_memory_get_data.
—
Reply to this email directly or view it on GitHub
https://github.com/mila-udem/fuel/issues/208#issuecomment-127399904.

Fixing the slice/slice logic would not be hard, as long as we are not planning support for negative steps. Is it OK to put that limitation?

Will this be fixed by #223 ? Seems like yes.

I confirm that it's fixed by #223. Closing.


Add cpp-linter download stats badge

Just want to know how many times cpp-linter has been downloaded every week.

We could track the number of downloads per version using https://pepy.tech/project/cpp-linter which also gives a monthly and all-time totals.

OK, let's me change the link to https://img.shields.io/pypi/dm/cpp-linter, I like this one.

what about , So it is clear that these are downloads from PyPI (not from Github)

Nice!

Updated

we could even add a logo...

On second thought, I think green color makes the text hard to read

dark green is easier to read:

Done :)

I remembered why I did not use https://pepy.tech/project/cpp-linter instead of https://pypistats.org/packages/cpp-linter
Because date in badge  is different with the data on https://pepy.tech/project/cpp-linter which is 416
If we used the badge  from pepy.tech, it seems does not support logo, logoColor, etc.

I can create a similar badge from pepy.tech, but it does not support to add a logo.

Maybe we have to use https://img.shields.io/badge/dynamic/json to create a custom badge if needed.

I noticed you didn't use the customized badge from pepy tech... I'm ok with how it is now.
I think there's a way to embed a custom logo using a base64 string in img.io badges, but it seems a fragile.

Got it to work finally!

FYI, I had to resize the logo to 14 px  and encode it using this site.


Deprecated use of Voxel in Gestalt filter

As the use of voxel should be deprecated, this filter should use an Octree (for 3D points) or a Quadtree (for 2D points) instead of voxels.
Plus by construction of the octree, the algorithm could be simplified since we have the information of the k-NN in the node. For instance, if we want k points to compute covariance, we just need to build the octree/quadtree with this number of point as criterion (plus, the cells containing less than k points could be ignored, acting like a filter for very sparse space partition).

@MathLabu in the second paragraph of your comment above, were you actually suggesting to use the octree for finding neighbors, instead of running K-NN?
For that sake, would you build the octree, and then to query the neighbors of a point, just navigate the octree nodes recursively until reaching the area around that point?

I don't exactly remember what I meant at this time :sweat_smile:
But I think my comment only applies to the Gestalt filter, so not really suggesting to use the octree instead of a knn for finding neighbors in general.
In this filter, around here, a search for nearest-neighbors is done.
I guess what I meant was to use the octree as spatial representation instead of the voxel (because of memory issue), and try to adapt the algorithm to leverage the octree for the computation, by applying the a visitor that would perform the actual computation at each leaf (for instance, computing covariance for leaf having at least k points)!

@MathLabu I think your idea is quite solid, and applicable to other filters that depend on the neighborhood of points, such as the surface normal (for computing normals based on local neighbors), feature computation, statistical outlier rejection, region growing, etc.
I hope in the future we have the chance to test this.


Update docs around setup to not confuse spec repo usage

fix #672

No changes needing a change description found.

You can try these changes at https://cadlplayground.z22.web.core.windows.net/typespec-azure/prs/779/
Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/typespec-azure/prs/779/


$begins Mango Operator

Summary
It would be cool to have a sugar-operator called $begins that is internally implemented as an AND of $gte a $lt to find any value starting with a desired pattern.
Desired Behaviour
The usage il something like this: let's suppose we want to find all people with surname starting with "Branca" either for autocompletition purpose or just because the user may have a second surname. Actually one could only do:
"Surname": {
 $eq: "Branca"
}

That wouldn't find either "Brancatelli" nor "Branca SecondSurname"
The only solution would be to:
"Surname": {
  $regex: "Branca"
}

That is unindexed.
Possible Solution
As in summary a solution could be to implement a sugar-operator called $begins that internally gets mapped to an AND-combination of $gte and $lt with an upper character as an upper bound. So, calling:
"Surname": {
 $begins: "Branca"
}

would be translated in
$and: [
 { "Surname": { $gte: "Branca" } },
 { "Surname": { $lt: "Branca\ufff0" } }
]

That would use the index as expected.

This was implemented by @willholley in https://github.com/apache/couchdb/pull/4810!
Closing as completed.


SIN Validator not handling 000 000 000

A value of 000 000 000 will currently pass validation as it is a valid Luhn number but not a valid SIN.

Hey @DanGodfrey, would you like to take a stab at it or should I go ahead and do it?
Thanks for reporting this!

Fixed by https://github.com/franckverrot/activevalidators/commit/61ab1e63714df083564ae6d7219151d7707f7e39


Fix stack trace for errors thrown by snapshot serializers

Summary
In this commit, we are creating a new custom error called PrettyFormatPluginError, this error is thrown by prettyFormat function when a serializer throws an error.
In the expect module, we skip Error.captureStackTrace if the error name is PrettyFormatPluginError, this way the stack trace stays intact.
Fixes #3302
Test plan
Given a test file foo.test.js:
test("should match the snapshot", () => {
  const bar = {
    foo: {
      x: 1,
      y: 2
    }
  };

  expect(bar).toMatchSnapshot();
});

And a custom snapshot serializer my-serializer-module.js
module.exports = {
  test: val => {
    throw new Error("Where is this error?");
  },
  print: val => ""
};

And a package.json:
{
  "jest": {
    "snapshotSerializers": ["./my-serializer-module"]
  }
}

When jest is run, with the current implementation, the failure message has no trace of the error thrown by the custom serializer:

With the new implementation we have a failure message that includes a trace from the error thrown by the custom serializer:

I like this. Mind adding a note in the changelog?

Yeah this looks nice. Good job @nicolasiensen

Thank you everyone for working on this PR :)


Travel types intention clarification

Debbie adding information to clarify the intention behind different types of travel and how to think about them, as well as reference to thinking about the right time for travel and the disruption impact.

I've added @kmorris50 + @desenesterling  for review for visibility into the guidelines that their team oversees


Pass the containerd address into shim

This updates Rust-extensions dep to include https://github.com/containerd/rust-extensions/pull/150 which enables using containerd from within the shim.  This is in perp for handling oci artifacts that will be stored in the containerd content store in which we need the containerd address.

seems like CI might be broken after #187
   Dirty wasmedge-sys v0.15.0: the file `/usr/lib/llvm-14/lib/clang/14.0.0/include/stdbool.h` is missing
   Compiling wasmedge-sys v0.15.0
     Running `/home/runner/work/runwasi/runwasi/target/debug/build/wasmedge-sys-24c4a5d29523e79f/build-script-build`
error: failed to run custom build command for `wasmedge-sys v0.15.0`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
  process didn't exit successfully: `/home/runner/work/runwasi/runwasi/target/debug/build/wasmedge-sys-24c4a5d29523e79f/build-script-build` (exit status: 1)
  --- stderr
  /home/runner/work/runwasi/runwasi/target/debug/build/wasmedge-sys-24c4a5d29523e79f/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/runner/work/runwasi/runwasi/target/debug/build/wasmedge-sys-24c4a5d29523e79f/build-script-build)
  /home/runner/work/runwasi/runwasi/target/debug/build/wasmedge-sys-24c4a5d29523e79f/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/runner/work/runwasi/runwasi/target/debug/build/wasmedge-sys-24c4a5d29523e79f/build-script-build)
  /home/runner/work/runwasi/runwasi/target/debug/build/wasmedge-sys-24c4a5d29523e79f/build-script-build: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /home/runner/work/runwasi/runwasi/target/debug/build/wasmedge-sys-24c4a5d29523e79f/build-script-build)
warning: build failed, waiting for other jobs to finish...

@jsturtevant #193 has been fixed. It should work now after rebasing your changes.


status field in services messages is ignored if pid field is not an integer

Describe the bug

In https://github.com/thin-edge/thin-edge.io/pull/2919, the parsing of the service status messages added the pid field (as a Option<u32>), however adding this field made the parsing of the message had the side effect from rejecting the whole message if the pid field was not in the expected format. In previous thin-edge.io versions, the pid field could of been any data type, where as thin-edge.io 1.3.0 it MUST be left out or an uint.
This chang causes a breaking change for service status payloads that, which results in the status property being ignored and defaulting to unknown (due to the parsing error on the pid field). From a logic point of view, the mapper should not care about the pid field as it is not using the the information in the mapping, so it should not affect the parsing of the service status field.
For example, the publishing the following message with the pid set as a string, will result in the outgoing message to Cumulocity IoT, will use the status=unknown on the outgoing message.
tedge mqtt pub te/device/main/service/my-service/status/health '{"status": "up", "pid": "21037"}'

Message published to Cumulocity IoT
[c8y/s/us] 102,rmi-macos:device:main:service:my-service,service,my-service,unknown

To Reproduce

On the device, open a new console and subscribe to the outgoing c8y cloud messages
tedge mqtt sub 'c8y/s/us'

Open a new console, publish the following message
tedge mqtt pub te/device/main/service/my-service/status/health '{"status": "up", "pid": "21037"}'

Observe the outgoing cloud message in the first console, it will show the unknown value (below is an example of the message)
[c8y/s/us] 102,rmi-macos:device:main:service:my-service,service,my-service,unknown

Expected behavior

The tedge-mapper should only try to parse the information that is required for the mapping of the service message. At this point in time the pid field is not used by the mapper, so the value of it should not affect the parsing of the status field.
Screenshots

Environment (please complete the following information):

OS [incl. version]: any
Hardware [incl. revision]: any
System-Architecture [e.g. result of "uname -a"]: any
thin-edge.io version [e.g. 0.1.0]: 1.3.0

Additional context

Update The initial conclusion I posted in the ticket was incorrect and I've updated the ticket title and description accordingly

Bug not reproducable anymore
pi@raspberrypi:~ $ tedge mqtt sub 'c8y/s/us' INFO: Connected [c8y/s/us] 102,QATest:device:main:service:my-service,service,my-service,up


Use json sanitizer to prevent json injection

Signed-off-by: ruxandraRosu<EMAIL_ADDRESS>

I've added json sanitizer dependency as fortify scan reported JSONinjection vulnerability.
https://github.com/OWASP/json-sanitizer
If you agree with this, I can add the sanitize step on the other  classes reported for this issue.

I'm not sure this resolves the potential security problem, if it's only ensuring that JSON is well-formed?
I believe JSON injection is the risk that you still receive what appears to be perfectly well-formed JSON (because you're just receiving a String that you deserialize into a JSON object), but actually it has JSON data within it that you do not actually want to consider valid for your particular use.  See: https://vulncat.fortify.com/en/detail?id=desc.dataflow.java.json_injection
I think the only way to confirm that such injection cannot occur is either to validate the specific JSON data in the object you receive (after deserialization, but before using any of it), or make use of strict Jackson types for deserialization (such that any unexpected or undefined JSON data is discarded rather than kept during the deserialization process) (?)

Hi @danielaotelea @davidradl
I've added the json-sanitizer to subject area and security officer as well, would you please have a look?
As stated above, this is about formatting the json, additional verification maybe are required.

Hi Mandy,
I've added the sanitize step in 3 components - where method mapper.readValue(resultString, className) was used. Should it be added in some other places as well? This library only sanitizes the string before creating the object using jackson mapper, it cannot replace jackson dependency. Please let me know if I need to do some other changes

@ruxandraRosu I was wondering if we had non well formed json coming in, it would be good to log it - or even reject it - so the caller could be corrected ?

I'm in two minds about this -- I somewhat agree that the input should be correct, and we should be precise in how we treat it, yet at the same time I defer to those with more experience in projects such as OWASP who deal with security/injection issues regularly, and the extra checks such libraries offer I feel gives a better level of protection against such injection attacks.
https://www.owasp.org/index.php/Deserialization_of_untrusted_data
https://www.nccgroup.trust/globalassets/our-research/us/whitepapers/2018/jackson_deserialization.pdf

Hi,
Do you want to discuss this in next functionality call?


EOF breaks the highlighting

Multiline strings are breaking the further highlighting.

This breaks for me when the EOF block is indented. Removing the indentations resolved the issue.

in the example the heredoc ends with ]EOF (indented by 4) I think the EOF should be on its own line (indented to index 0)?


Fix descriptor.Table buffer growth calc

Fixes InsertAt size calculation to avoid growing slices more than needed. On insert the mask should calculate the index in the slice not the number of elements in the table. Avoids a factor of 8 increase in table size. Small optimisation to use the capcity of the slice to reduce the average length whilst keeping allocations down. Clarified the grow method grows the table by n * 64 items.

@mathetake added a testcase which shows the error and panic on main on edgecases. Renamed the file but its causing a large diff then intended, let me know if you;d like a diff format,

sorry what was the intent for renaming the file and adding another test? I would prefer make it in the existing _test.go

Its a package descriptor_test as it imports sys to avoid a cycle. Moved it to _sys_test.go to make it more clear not sure if theres a pattern I can follow?

hah i see

ok i will defer to @achille-roussel for the rest. Thanks for the work here!

pushed two commits to minimize the change - used the export_test pattern


Not updating model when changing only the country of existing data

I have the input binded to a model data like this :
<input class="line" name="phone" ng-model="form_data.phone" type="text" required ng-intl-tel-input />
When the data is set from the model (e.g. +32 474 74 74 74 - Belgian number). If I just change the country (e.g. France) and then I log the object form_data (without doing anything else), the phone value is not updated. (still + 32)
If I now just remove a 4 and rewrite it then log the object form_data, then it displays the +33 of France in the example.

Basically, the handleCountryChange method needs to trigger a change event in order to notify angular's model controller about the value change.

+1