architecture comment

Thought you might want to consider this:
The solution I've settled on for this kind of thing in my own projects is to use the same reducer and action creator code, but with action types prefixed differently for each reducer mount point, as depicted in the code below.  I would love if redux-form worked this way.
It took a long long time before I had the idea to do things this way but once I did I wish I had thought of it at the very beginning.
Advantages:

it's easier to read the action log since actions for different mount points have different types
more flexible with mounting reducers in arbitrary, deeper-nested areas of the state
you can move around where reducers are mounted without having to change state paths used to modify reducers or action creators

Disadvantages:

it may not be obvious from the action type what part of the state it affects, depending on what action type prefixes you use

I even created prefixReducer and prefixActionCreator functions in my mindfront-redux-utils package to decorate existing reducers and action creators that weren't designed to be created with an action type prefix option.
import {createReducer, combineReducers} from 'mindfront-redux-utils' // or redux-actions etc
import {List} from 'immutable'

const PUSH = 'PUSH'
const POP = 'POP'

function listActions(actionTypePrefix) {
  const pushType = actionTypePrefix + PUSH
  const popType = actionTypePrefix + POP
  return {
    push: (item) => ({type: pushType, payload: item}),
    pop: () => ({type: popType}),
  }
})

function listReducer(actionTypePrefix) {
  return createReducer(List(), {
    [actionTypePrefix + PUSH]: (state, action) => state.push(action.payload),
    [actionTypePrefix + POP]: (state) => state.pop(),
  })
}

const reducer = combineReducers({
  a: listReducer('a.'),
  b: listReducer('b.'),
  c: listReducer('c.'),
  d: combineReducers({
    e: listReducer('d.e.'),
  })
});

const aListActions = listActions('a.')
const bListActions = listActions('b.')
const deListActions = listActions('d.e.')

dispatch(aListActions.push(...))
dispatch(bListActions.pop())
dispatch(deListActions.push(...))
// etc

Example with prefixReducer and prefixActionCreator (which I only really like to do if I'm using 3rd-party reducers/action creators):
import {
  createReducer, combineReducers, prefixReducer, prefixActionCreator
} from 'mindfront-redux-utils'
import {mapValues} from 'lodash'
import {List} from 'immutable'

const PUSH = 'PUSH'
const POP = 'POP'

const push = (item) => ({type: pushType, payload: item})
const pop = () => ({type: popType})
const listActions = {push, pop}

const listReducer = createReducer(List(),
  [PUSH]: (state, action) => state.push(action.payload),
  [POP]: (state) => state.pop(),
})

const reducer = combineReducers({
  a: prefixReducer('a.')(listReducer),
  b: prefixReducer('b.')(listReducer),
  c: prefixReducer('c.')(listReducer),
  d: combineReducers({
    e: prefixReducer('d.e.')(listReducer),
  })
});

const aListActions = mapValues(listActions, prefixActionCreator('a.'))
const bListActions = mapValues(listActions, prefixActionCreator('b.'))
const deListActions = mapValues(listActions, prefixActionCreator('d.e.'))

dispatch(aListActions.push(...))
dispatch(bListActions.pop())
dispatch(deListActions.push(...))
// etc

In fact, the Redux docs now have an excellent guide on doing this here: https://github.com/reactjs/redux/blob/master/docs/recipes/reducers/ReusingReducerLogic.md

I'm using the Redux guide for creating split reducers, but I'm not sure how to map these as props for a component. The guide above doesn't follow up on this. What's the next step?

@georgeawwad are you looking for react-redux?

Right. I was only asking my question here because your docs link led me to a potential solution with my project. It's not specifically related to this repo.


Evaluate official maven plugin for swagger-codegen

In best case this project can be reduced to publishing our own code templates, and letting swagger's own maven plugin do the code generation.
Questions to answer
❓ what features does our maven integration offer that the official plugin does not?
❓ is the official plugin capable of using our templates or do we need to adapt something?
❓ do we need to offer some migration guide how to switch to the official plugin?
❓ how do our templates perform in comparison with the current official (e.g. spring) code templates?
See

https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen-maven-plugin
https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen/src/main/resources/JavaSpring

The main reason for using this plugin were the templates you provide:
The project I'm developing is using a contract first approach. From my tests the code templates provided by this project are far better suited to this - I do not have any need to generate any springfox (or even swagger) annotated code (I do serve the swagger spec I'm developing against).
I also like that the templates do not generate poms or other (for me) unimportant files as this allows me to generate the interfaces on each build from the spec.
I've tried to run your templates with the official codegen but this was not that simple - I encountered  dependencies on swagger-codegen-common and other problems while trying that (can't remember the details, it's been a while)
From what I've seen the official templates are adding bean validation support. Comprehensive bean validation support is a feature that would be great in your templates too ( I know there is some support already)

Thanks for your feedback. We will take it into consideration when deciding how to proceed next.

Just verified our current 0.5.0-SNAPSHOT against the 2.2.1 swagger-codegen-cli.jar:
java -cp ~/.m2/repository/org/zalando/stups/swagger-codegen-common/0.5.0-SNAPSHOT/swagger-codegen-common-0.5.0-SNAPSHOT.jar:/Users/otrosien/.m2/repository/org/zalando/stups/swagger-codegen-template-spring-interfaces/0.5.0-SNAPSHOT/swagger-codegen-template-spring-interfaces-0.5.0-SNAPSHOT.jar:swagger-codegen-cli.jar io.swagger.codegen.SwaggerCodegen generate  -l springinterfaces -i http://petstore.swagger.io/v2/swagger.json -o zalando

... works.


question:How could I solve this problem?

➜  SCL git:(master) ✗ jac-run main.py -d ~/data/RAVEN-10000 -t center_single --use-gpu -v
-lr 0.005 -vlr 0.005 -wd 0.01 -tsd 80 -fg 10 -nf 80
-chd 16 16 32 32 -rb -erb -vhd 128 -hd 64 32 -lhd 128
10 14:02:35 Loading jacinle config: /home/featurize/Jacinle/jacinle.yml.
10 14:02:35 Loading vendor: ReservoirSample-PyTorch.
10 14:02:35 Loading vendor: AdvancedIndexing-PyTorch.
10 14:02:35 Loading vendor: SynchronizedBatchNorm-PyTorch.
10 14:02:35 Loading vendor: PreciseRoIPooling-PyTorch.
10 14:02:35 Loading vendor: SceneGraphParser.
10 14:02:35 Loading vendor: JacMLDash.
10 14:02:35 Loading vendor: PyGCO.
10 14:02:35 Loading vendor: PyPatchMatch.
dumps/ce_lr0005_nf80_bs128_edNone_ne5_vlr0.005_hd64_32_is160_160_fg10_tsd80_chd16_16_32_32_vhd128_lhd128_rg2_res_wd001
10 14:02:38 Writing metainfo to file: "dumps/ce_lr0005_nf80_bs128_edNone_ne5_vlr0.005_hd64_32_is160_160_fg10_tsd80_chd16_16_32_32_vhd128_lhd128_rg2_res_wd001/meta.json".
0%|                                                                                | 0/47 [00:00<?, ?it/s]
Traceback (most recent call last):
File "main.py", line 587, in
main()
File "main.py", line 579, in main
trainer.train_eval(train_data, val_data)
File "/home/featurize/SCL/analogy/train/trainer.py", line 327, in train_eval
train_meters = self.train_epoch(train_loader)
File "/home/featurize/SCL/analogy/train/trainer.py", line 230, in train_epoch
loss, monitors, output_dict, extras = self.step(data)
File "/home/featurize/Jacinle/jactorch/train/env.py", line 135, in step
loss, monitors, output_dict = self._model(feed_dict)
File "/environment/python/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/featurize/Jacinle/jactorch/parallel/data_parallel.py", line 66, in forward
return self.module(*inputs[0], **kwargs[0])
File "/environment/python/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/featurize/SCL/analogy/nn/model.py", line 220, in forward
pred_symbol = self.v2s(visual)
File "/environment/python/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/featurize/SCL/analogy/nn/visual_model.py", line 102, in forward
x = self.cnn(x)
File "/environment/python/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/featurize/SCL/analogy/nn/modules/modules.py", line 205, in forward
x = conv_block(x)
File "/environment/python/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in call_impl
result = self.forward(*input, **kwargs)
File "/home/featurize/SCL/analogy/nn/modules/modules.py", line 146, in forward
_ = conv()
File "/environment/python/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/featurize/Jacinle/jactorch/nn/cnn/conv.py", line 79, in forward
return self._forward_conv(*self._forward_padding(input))
File "/home/featurize/Jacinle/jactorch/nn/cnn/conv.py", line 85, in _forward_conv
return self.conv(padded, **kwargs)
File "/environment/python/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/environment/python/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 423, in forward
return self._conv_forward(input, self.weight)
File "/environment/python/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 416, in _conv_forward
return F.conv2d(F.pad(input, self._reversed_padding_repeated_twice, mode=self.padding_mode),
File "/environment/python/versions/3.7.4/lib/python3.7/site-packages/torch/nn/functional.py", line 3576, in _pad
raise NotImplementedError
NotImplementedError
➜  SCL git:(master) ✗ jac-run main.py -d ~/data/RAVEN-10000 -t center_single --use-gpu -v
10 14:04:51 Loading jacinle config: /home/featurize/Jacinle/jacinle.yml.
10 14:04:51 Loading vendor: ReservoirSample-PyTorch.
10 14:04:51 Loading vendor: AdvancedIndexing-PyTorch.
10 14:04:51 Loading vendor: SynchronizedBatchNorm-PyTorch.
10 14:04:51 Loading vendor: PreciseRoIPooling-PyTorch.
10 14:04:51 Loading vendor: SceneGraphParser.
10 14:04:51 Loading vendor: JacMLDash.
10 14:04:51 Loading vendor: PyGCO.
10 14:04:51 Loading vendor: PyPatchMatch.
dumps/ce_lr0005_nf4_bs128_edNone_ne5_hd32_16_is160_160_chd8_16_32_32_rg2
10 14:04:54 Writing metainfo to file: "dumps/ce_lr0005_nf4_bs128_edNone_ne5_hd32_16_is160_160_chd8_16_32_32_rg2/meta.json".
0%|                                                                                | 0/47 [00:00<?, ?it/s]
Traceback (most recent call last):
File "main.py", line 587, in
main()
File "main.py", line 579, in main
trainer.train_eval(train_data, val_data)
File "/home/featurize/SCL/analogy/train/trainer.py", line 327, in train_eval
train_meters = self.train_epoch(train_loader)
File "/home/featurize/SCL/analogy/train/trainer.py", line 230, in train_epoch
loss, monitors, output_dict, extras = self.step(data)
File "/home/featurize/Jacinle/jactorch/train/env.py", line 135, in step
loss, monitors, output_dict = self._model(feed_dict)
File "/environment/python/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/featurize/Jacinle/jactorch/parallel/data_parallel.py", line 66, in forward
return self.module(*inputs[0], **kwargs[0])
File "/environment/python/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/featurize/SCL/analogy/nn/model.py", line 220, in forward
pred_symbol = self.v2s(visual)
File "/environment/python/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/featurize/SCL/analogy/nn/visual_model.py", line 102, in forward
x = self.cnn(x)
File "/environment/python/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/featurize/SCL/analogy/nn/modules/modules.py", line 205, in forward
x = conv_block(x)
File "/environment/python/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in call_impl
result = self.forward(*input, **kwargs)
File "/home/featurize/SCL/analogy/nn/modules/modules.py", line 146, in forward
_ = conv()
File "/environment/python/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/featurize/Jacinle/jactorch/nn/cnn/conv.py", line 79, in forward
return self._forward_conv(*self._forward_padding(input))
File "/home/featurize/Jacinle/jactorch/nn/cnn/conv.py", line 85, in _forward_conv
return self.conv(padded, **kwargs)
File "/environment/python/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/environment/python/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 423, in forward
return self._conv_forward(input, self.weight)
File "/environment/python/versions/3.7.4/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 416, in _conv_forward
return F.conv2d(F.pad(input, self._reversed_padding_repeated_twice, mode=self.padding_mode),
File "/environment/python/versions/3.7.4/lib/python3.7/site-packages/torch/nn/functional.py", line 3576, in _pad
raise NotImplementedError
NotImplementedError

Please check the Jacinle version you used. We use the version c9fcbb5.

Please check the Jacinle version you used. We use the version c9fcbb5.

I do use the version c9fcbb5

I do use the version c9fcbb5

oh,I see!!!

oh,I see!!!


flushInputs discussion

@plugz while reviewing some MasterTimer code, I noticed the flushInput mechanism.
It starts here
https://github.com/mcallegari/qlcplus/blob/master/engine/src/mastertimer.cpp#L107
and after going through 4 classes and 2 MutexLockers, it ends here:
https://github.com/mcallegari/qlcplus/blob/master/engine/src/inputpatch.cpp#L270
Right now it is synchronous and it is done on every MasterTimer tick.
I believe it is a quite dangerous mechanism, that can potentially block the MasterTimer for some time and prevent to guarantee a precise tick.
Moreover, with that mechanism, MasterTimer depends on InputPatches, which is not good.
Questions;

does this really have to be done on every tick ?
does it need to be synchronous ? Can't we just hook InputOutputMap to a MasterTimer signal ? Or even better, MasterTimer -> Universe or InputPatch.
For example MasterTimer can emit a flushInput signal, and then the receiver processes it according to the Qt events queue

MasterTimer should be as lighter as possible, so everything we can strip from it means more time to process Functions and a more precise clock.

One tiny optimization can be done by removing
doc->inputOutputMap()->flushInputs();
and adding
universes[i]->flushInput();
inside the for cycle right below.
I tested it and it seems not to cause issues or deadlocks.
What do you think ?

Actually not a discussion if I'm talking to myself. Closing.


Ensure tasks are neither trivially easy nor impossible

When writing #247, the dataset contained two possible "label" columns:

Rating: A rating of the cohesiveness of the comment
Domain: Whether the text is from Wikipedia or Reddit

I did not make a task with the domain column as label, because I imagined it would be trivially easy. Perhaps ideally, the PR submission process should test this? E.g. also submit the run-information as .json, to see that the task is non-trivial?
On the other end of the spectrum, it's probabyl also important to ensure that the task is doable. We could do this by running the task with e.g. both

intfloat/multilingual-e5-small and
sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2,

and ensuring there is a differential between them.
To facilitate making this easy to do, I suggest:

Writing a wrapper function that users can call, which runs a task with the two models
Modifying the evaluation script to:

Suffix the task result name with the model,  e.g. amazon_counterfactual_classification_e5_small.json
Log the location of the result.json to terminal after running evaluation, to make it apparent for the user where they are located

Been a pleasure so far! What do you guys think? 😊

@imenelydiaker would like your thoughts on this. I generally agree with @MartinBernstorff of at least providing the results, though I would probably just use the CLI for it.

I answered this here: https://github.com/embeddings-benchmark/mteb/pull/254. It's a really great idea! 🤩

This has been added in #275


music: add option to mute pet sounds

It is currently only possible to mute pet sounds (e.g., Pet general graardor stomp, electric hydra idle sound, etc.) via Mute NPCs' area sounds. However, that option turns off all NPC sounds, which can be disadvantageous in places like ToB, CoX, or any other activities where game mechanics are closely tied to area sounds.
This commit introduces the option to disable pet sounds, so you never have to hear the  thump thump thump of an undeserved Bandos pet again, while still retaining the advantages of enabled area sounds.
Pet sound behavior for some is slightly different when a pet is placed in a PoH menagerie compared to having it as a follower. For example, Jagex removed the sounds from the pet Kree'arra wing flap and the Electric Hydra idle animation—but only while they are following you or another player. The sounds still play when they are free-roaming in a PoH. Other pets, like Pet general graardor and Skotos, still have sounds when they walk regardless of whether they are a follower or free roaming. This commit does not take into account the fact that many pets can make noise when interacting with a scratching post, as I deemed this willing behavior (get rid of the scratching post if you don't want pets interacting with it).

Annoyance Mute on the plugin hub accomplishes this now


Add test for opening BDVN5S3

@KateMoreva the current main branch contains this code:
public class OpenBDVN5S3XML {
    public static void main(String[] args) throws SpimDataException {
        SpimData spimData = new XmlIoSpimData().load("src/test/resources/prospr-myosin-n5.xml");
        BdvFunctions.show(spimData);
    }
}

What about adding a @Test annotation to this to thereby also cover the bdv.n5.s3 code?

To make a proper test adding an annotation is not enough. I will take a look and make a proper test here as well.

Closed in favor of #87


Feature: createModel()

This PR adds support for an opt-in helper function called createModel(), which is meant to assist in creating the datamodel (SCXML) for the machine:
import { createMachine } from 'xstate';
import { createModel } from 'xstate/lib/model'; // opt-in, not part of main build

const userModel = createModel({
  name: 'David',
  age: 30
}).withUpdaters({
  updateName: {
    name: (_, e) => e.value // assignments for assign()
  }
});

const machine = createMachine({
  context: userModel.context,
  initial: 'active',
  states: {
    active: {
      on: {
        updateName: {
          actions: userModel.actions.updateName
        }
      }
    }
  }
});

I was just thinking about how the current uncertainty around #989 and #1367 confounds this effort. The API surface area gets less elegant when once you have to require the developer to differentiate between assign and reset.
But that begs the question... does it even make sense for the entire model shape to change? Isn't that an entirely different animal--a union type where each variant might expose different available updaters...

But that begs the question... does it even make sense for the entire model shape to change (as in the reset option)? Isn't that an entirely different animal--a union type where each variant might expose different available updaters...

Most of the time it doesn't, but there are usecases highlighted in those issues that demonstrate the need.

Oh, for sure - definitely didn't mean to come across as dismissive of those needs at all.
Just thinking aloud today as the 💡 slowly flickered on in my head, realizing that those concerns were really about the friction of representing a union type using a key/value store. (And the SCXML spec has essentially mandated a key/value store as the root data model type.) The imperfect emulation of that, and all the effort to emulate it, falls away when storing that union type as keyed value instead. Bonus: language support starts to come into play (both in TypeScript and Swift--which has enums with associated values). Obvious in retrospect, but I was just not seeing it clearly before.
I think that means this cool new createModel() effort gets to similarly side-step those worries, too? i.e. you could have a property of the model that is a union type property, and any related constraints become internal updater details rather than the responsibility of this new feature.


vite build doesn't appear to add routes to final bundle

Using the x-basic template and running npm run build followed by npm run preview result in an error. Inspection of the dist/_worker.js file shows that none of the JSX is present within it (search for div, etc).

upgrading hono and the cloudflare-page-plugin fixed this issue


#include "Morphology.hpp" is missing from Wan.hpp

Hello,
The Wan algorithm won't compile, because it makes uses of a morphology function:
Morphology::Dilate(maxImage, Algorithm::grayScaleImageIn, windowSize);
and yet, #include "Morphology.hpp" is missing from Wan.hpp.
Luckily, the fix is easy. The relevant include simply has to be added.
Hope this helps!

Thank you.  This has been resolved.


[DPE-2691] Switch to self-signed-certificates operator

Thank god it's that easy!
Are there any documentation places we should update for this?

Noting here, can we replicate these PRs to the ZooKeeper charms?
Can we also bump the tls lib version there also? Avoids the No Certificates relation found debug messages


Create Azure DevOps YAML build definitions

Create Azure DevOps YAML build definitions for each of the services.

Fixed by #26


Problem with day time images

Hi Thomas,
sometime, during day time, the image seems to be scrambled (i.e.: https://www.dropbox.com/s/r5mzjbjqhigx09h/allsky_error.jpg?dl=0). I've enabled auto exposure and the auto gain is disabled. I got an ASI120MC (USB2) and the last git version of the software.
After a few frames the return correct.
Thanks in advance for you attention,
Simone

Hi Simone,
It sometimes happens to me as well during day or night time.
I believe the reason is that the image displayed in your browser doesn't have enough time to load before its source is overwritten by saveImageDay.sh.
I think a slow internet connection + short daytimedelay is the issue here. This could be verified by increasing the delay between images (10 000ms for example).
If you come across a broken image, try refreshing the browser to see if you get the full image.
A potential fix would be to use rotating temporary images but I haven't given too much tought into the implementation yet.
Thomas

Hey Thomas. I see you've added the ability to capture day time images, but they aren't saved. I've not touched my camera since April, and can't remember half of what I did, but was wondering if you have thought about saving them to generate a 24 hr time-lapse?

I added the save code to the day time .sh. I have it saving day images now. My new question is if auto exposure can be used in the day, but a defined exposure for night. I have not tired, but wondering if auto exposure will be long enough for the sky. I have some trees with light pollution and worried it will adjust to them.
My replay for night is based on the longer exposure value. Having images more often cause more images of course.

The way it works now is:

Day:

auto-exposure: always on
gain: 1

Night:

exposure value OR auto-exposure with max exposure
gain value OR auto-gain with max gain

To keep a regular frame rate for the timelapse, when using auto-exposure, the delay between frames is equal to max-exposure value.
ex 1: No auto-exposure, 20sec exposure
A new image is taken every 20sec (+ delay)
ex 2: auto-exposure, max-exposure 30sec
A new image is taken (5sec), wait 25sec (+ delay)
A new image is taken (7sec), wait 23 sec (+ delay)
A new image is taken (9 sec), wait 21 sec (+ delay)
...
A new image is taken (30sec), wait 0 sec (+delay)
That way, we keep a constant frame rate and all the images are properly exposed. The drawback is that when you wait, you're not capturing the sky.
To answer your question, yes, it is possible to do 24hr timelapse. you just need to save the images in saveImageDay.sh. However, there is a bit of code I need to add to capture.cpp to start the night non-over-exposed.
Also, a new day starts at noon and ends at noon so, depending on which kind of "24hrs" you want, you may need to stitch 2 consecutive videos together.

Attached is what I added to saveImageDay.sh to get it to save the images.
Here are my current settings.
Auto-Exposure No, Exposure 8000, Max Exposure 10000, Delay 2000, Daytime Delay 30000
I'm getting images every 8-10 seconds
Then I tried Auto-Exposure Yes, Exposure 8000, Max Exposure 10000, Delay 2000, Daytime Delay 30000
I'm getting images every ~17 seconds
I have not had the chance to do daytime. If I need to open another issue to discuss let me know. With there was a discussion option and not have to open an issue.
log.txt
saveImageNight.txt
saveImageDay.txt

i'm using zwo 290mm , nightime is running flawlessly. but not daytime.
after "service allsky restart", the software save some image, like 5-8 image. than freeze.
no more image saved. i feel it worst when the sun shine brighter.
has any one experience this ???
what log / SS I can sent here to debug / find the problem ?
Thanks.

This issue is from a much older release of the AllSky software.  If you think it might still be relevant, please test it with the newest version and submit a new issue if needed.  Thanks.
Version 0.8 of AllSky decreases the chance this will happen by performing many of the conversion tasks on a copy of the image so it's less likely a web page will access an image as it's being updated.


Sass change does not call browserSync but browserify change does

Not sure why but for me, saving the global.sass does not cause browserSync to reload/inject styles. Although gulp does detect the change in the file and recompiles the css it does not reload the tab. Changes to global.coffee however, do both compile the js and reload the tab ....

Made a PR to fix this #28

downgrading sprockets solved the issue for me as well

I have same issue, but can't downgrade sprockets (i'm using rails 5 which lowest sprockets expectation is 3.0). Any ideas how to solve this?

@Nekromancer Check my comment https://github.com/vigetlabs/gulp-rails-pipeline/issues/19#issuecomment-191990302


hi RaiMan，i just use sikulix4python on my linux systerm,and i find a question

i use pycharm in my linux systerm for AutoTest, now i find a question
click(img), can't find the img  . the screenshot below:

the same code  works very well on MacOS and Win autoText ~
so  thx u help
~ tips:poor english don't mind~ 😄

i confirm the Img is ok ~  because i use the sikulix-ide can find the image ~

I guess the problem are the non-ASCII characters in the image name:

sad, i just change the image name to english or number  but  as  the same.
but i find use Region ,sikulix works very well. the image below:

ok, then try with an absolute path.
Or resolve the working directory at the Python level to a string and create an absolute filename programmatically.
Another option is to use ImagePath.setBundlePath().

Thank you so much ~   i fix it ~


Optimized code

What changes were proposed in this pull request?

[ ] Finshed changes describe

How was this patch tested?

[ ] Testing done

Are there and DOC need to update?

[ ] Doc is finished

Spark Core Compatibility

Great Job


cosign verify-attestation - Issue with rego policy verification

Description
We are trying to print error messages when cosign verify-attestation  failed as per the rego policy rules.
I have a policy to satisfy my requirement, it’s working from the rego playground as you see below.
SUCCESS CASE:
INPUT:
{     "environment": "snapshot",     "type": "twistlockquality",     "stage_properties":     {         "enabled": true,         "scan_status": "PASSED",         "type": "TWISTLOCK_SCAN",         "running_on": "02",         "scan_results":         {             "ImageName": "docker_build1",             "vulnerabilitiesCount": "94",             "complianceIssuesCount": "1",             "vulnerabilityDistribution":             {                 "critical": "4",                 "high": "6",                 "medium": "2",                 "low": "82",                 "total": "94"             }         }     } }
Policy:
`package signature
allow[msg]{
input.type == "twistlockquality"
result := less_than(input.stage_properties.scan_results.vulnerabilityDistribution.critical)
msg := sprintf("FAILED - twistlockquality, REASON: Found %v criticals", [input.stage_properties.scan_results.vulnerabilityDistribution.critical])
result != true
}
less_than(x) := to_number(x) < 5
larger_than(x) := to_number(x) > 1`
OUTPUT:
{     "allow": [ ] }
FAIL CASE:
INPUT:
{     "environment": "snapshot",     "type": "twistlockquality",     "stage_properties":     {         "enabled": true,         "scan_status": "PASSED",         "type": "TWISTLOCK_SCAN",         "running_on": "02",         "scan_results":         {             "ImageName": "docker_build1",             "vulnerabilitiesCount": "94",             "complianceIssuesCount": "1",             "vulnerabilityDistribution":             {                 "critical": "4",                 "high": "6",                 "medium": "2",                 "low": "82",                 "total": "94"             }         }     } }
Policy:
`package signature
allow[msg]{
input.type == "twistlockquality"
result := less_than(input.stage_properties.scan_results.vulnerabilityDistribution.critical)
msg := sprintf("FAILED - twistlockquality, REASON: Found %v criticals", [input.stage_properties.scan_results.vulnerabilityDistribution.critical])
result != true
}
less_than(x) := to_number(x) < 2
larger_than(x) := to_number(x) > 1`
OUTPUT:
{     "allow": [         "FAILED - twistlockquality, REASON: Found 4 criticals"     ] }
But when I integrate and use the same policy at cosign verify-attestation, even in the policy success case, cosign verification is failing with expression value, [], is not true and main.go:74: error during command execution: 7 validation errors occurred.
Policy success case:

COSIGN_EXPERIMENTAL=1
cosign verify-attestation --key cosign.pub --type spdxjson hello-python/snapshot/docker_build1:1.0.0 --policy policy.rego
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
There are 7 number of errors occurred during the validation:
expression value, [], is not true
expression value, [], is not true
expression value, [], is not true
expression value, [], is not true
expression value, [], is not true
expression value, [], is not true
expression value, [], is not true
Error: 7 validation errors occurred
main.go:74: error during command execution: 7 validation errors occurred

Policy fail case:

COSIGN_EXPERIMENTAL=1
cosign verify-attestation --key cosign.pub --type spdxjson hello-python/snapshot/docker_build1:1.0.0 --policy policy.rego
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
There are 7 number of errors occurred during the validation:
expression value, [], is not true
expression value, [], is not true
expression value, [], is not true
expression value, [], is not true
expression value, [], is not true
expression value, [], is not true
expression value, [FAILED - twistlockquality, REASON: Found 4 criticals], is not true
Error: 7 validation errors occurred
main.go:74: error during command execution: 7 validation errors occurred

@hectorj2f @developer-guy @wlynch

@SaiJyothiGudibandi Please, try following this format for your policy:
package sigstore
default isCompliant = false
isCompliant {
...
}

or a format like:
package sigstore
isCompliant[response] {
   ...

  response :={
   "result" : result,
    "error" : errorMsg,
  }
}

@hectorj2f
I have tried the below, but no luck.
Rego Playground:
Input:
{
"environment": "snapshot",
"type": "twistlockquality",
"stage_properties":    {
"enabled": true,
"scan_status": "PASSED",
"type": "TWISTLOCK_SCAN",
"running_on": "02",
"scan_results":      {
"ImageName": "docker_build1",
"vulnerabilitiesCount": "94",
"complianceIssuesCount": "1",
"vulnerabilityDistribution":        {
"critical": "4",
"high": "6",
"medium": "2",
"low": "82",
"total": "94"
}
}
}
}
Policy:
package sigstore
isCompliant[response] {
input.type == "twistlockquality"
result := less_than(input.stage_properties.scan_results.vulnerabilityDistribution.critical)
msg := sprintf("FAILED - twistlockquality, REASON: Found %v criticals", [input.predicate.stage_properties.scan_results.vulnerabilityDistribution.critical])
result != true
response :={
"criticals" : result,
"error" : "FAILED - twistlockquality, REASON: Found more criticals than expected",
}
}
less_than(x) := to_number(x) < 5
larger_than(x) := to_number(x) > 1
Output:
[
{
"isCompliant": []
}
]
———————
POLICY:
package sigstore
isCompliant[response] {
input.type == "twistlockquality"
result := less_than(input.stage_properties.scan_results.vulnerabilityDistribution.critical)
msg := sprintf("FAILED - twistlockquality, REASON: Found %v criticals", [input.predicate.stage_properties.scan_results.vulnerabilityDistribution.critical])
result != true
response :={
"criticals" : result,
"error" : "FAILED - twistlockquality, REASON: Found more criticals than expected",
}
}
less_than(x) := to_number(x) < 2
larger_than(x) := to_number(x) > 1
OUTPUT:
{
"isCompliant": [
{
"criticals": false,
"error": "FAILED - twistlockquality, REASON: Found more criticals than expected"
}
]
}
———————

COSIGN_EXPERIMENTAL=1
cosign verify-attestation --key cosign.pub --type spdxjson snapshot/docker_build1:1.1.11 --policy policy.rego
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
will be validating against Rego policies: [rekor-policy/gto-policy.rego]
There are 8 number of errors occurred during the validation:

result is undefined for query 'data.signature.allow'
result is undefined for query 'data.signature.allow'
result is undefined for query 'data.signature.allow'
result is undefined for query 'data.signature.allow'
result is undefined for query 'data.signature.allow'
result is undefined for query 'data.signature.allow'
result is undefined for query 'data.signature.allow'
result is undefined for query 'data.signature.allow'
Error: 8 validation errors occurred
main.go:74: error during command execution: 8 validation errors occurred

Your response format doesn't follow the same format I shared above. That is why you are getting a result is undefined for query ... Please, wrap the result of your policy as part of the result field in the response object.

@hectorj2f,
Can you please point whats wrong in the below policy. I wasnt able to figure out whats going wrong.
package signature
isCompliant[response] {
input.predicate.type == "twistlockquality"
result := less_than(input.predicate.stage_properties.scan_results.vulnerabilityDistribution.critical)
result != true
response :={
"result" : result,
"error" : "FAILED - twistlockquality, REASON: Found more criticals than expected",
}
}
less_than(x) := to_number(x) < 1
larger_than(x) := to_number(x) > 1

Testing:
DEV : http://jenkins-gto-01.lvn.broadcom.net:8080/job/IAT-hellopython-OP/job/dev-twistlock-1/11/consoleFull
VERIFY: http://jenkins-gto-01.lvn.broadcom.net:8080/job/IAT-hellopython-OP/job/verify-twistlock-1/35/console

@lcarva Thanks for the details.
I am trying to pint an error message, if my repo policy rule doesnt satisfy.
Any suggestions here?

@SaiJyothiGudibandi, how are you trying to do that?

@SaiJyothiGudibandi Why don't you try to follow the suggested format ?
package sigstore
isCompliant[response] {
   ...

  response :={
   "result" : result,
    "error" : errorMsg,
  }
}

I can see how the package name isn't correct signature. We expect a package name sigstore.

Thanks for the quick response.
Understand the above code, using that how can I print error message if allow set to false?
I am looking to print the error message if allow set to false (as per your above code)
Please suggest.

Thanks for the quick response.
Understand the above code, using that how can I print error message if allow set to false? I am looking to print the error message if allow set to false (as per your above code) Please suggest.

That is not possible with cosign today.

Can you guys support this?
It makesense to print the message if some rule doesnt satisfy. Users will get to know more details on the failure.

Offhand, seems reasonable. And leads to better consistency between cosign/policy-controller.
I'll rename the issue.

Great.
Could you please provide an ETA for the support of this feature?

No ETA as of yet. But we would take a PR to thread these errors through and print them, provided it was done in a backwards compatible way.

I came across this will getting errors using the example here so based on these comments , it seems like this documentation is wrong?


[Feature Request] Add healthcheck to dockerfile

Describe the solution you'd like
A healthcheck being integrated into the dockerfile
Describe alternatives you've considered
Doing it myself, if possible that still would need to be documented which means we could just as well implement it the right way first time.
Additional context
It's a health check, not rocket science.

Why would this be useful? How would we implement this?
There is no web interface. It’s either running or not. If the container is not running then there was a fatal error.

Why would this be useful

To detect any stalls besides exit 1

How would we implement this

If I would've had a ready to rock solution it would've been a PR, not a feature request.

There is no web interface

Healthchecks don't require one either

It’s either running or not

Because program freezes/stalls don't ever happen or something?

If the container is not running then there was a fatal error

A healthcheck is not for detecting container failure, thats what "restart: on-failure" is for.

To detect any stalls besides exit 1

How would we detect them?

I am not asking for one. You asked for the feature so some idea on what and how to implement would be beneficial in getting the feature request approved.

Because program freezes/stalls don't ever happen or something?

To our knowledge this has never happened. Not saying it is not possible but we have not seen this issue in the past. It is hard to code for something generic/nonspecific. If we are not trying to solve a specific problem then it is hard to implement.

A healthcheck is not for detecting container failure, thats what "restart: on-failure" is for.

I understand this. This is why I am asking these questions. I am not seeing the benefit of a health check for this very reason. The software is coded to exit if there is a fatal error. Beyond that it will continue to run. If there is an error with a certain module it would be represented in the logs and the data would be missing in the dashboard. I believe this is sufficient in providing user feedback of any issues that may arise.
I have thought about this in the past but I have not seen the benefits of adding it since typically there is no other states than running, stopped, or failed to start. The only marginal benefit I see is doing a health check for every module individually to see if there are any errors. This seems to be overkill for a simple health check in my opinion. This would also require some large changes in the code just for a simple health check which again I don't see a sufficient benefit.
@DirtyCajunRice Do you have any thoughts on this?

Okey, to give some more imput:
You could have the script output the last run time into a file and have a -healthcheck handle to compare that to current time.
If there was too much time between the last run and the current time running -healthcheck you can assume it isn't running properly.
Said idea could be expanded to even include dependencies successes and base the health on that too, but I think just knowing if it ran should be enough (if it ran and a single dependency didn't. that isn't really related to the health of the varken script itself IMHO)


LOW PRIORITY - Android version?

Godot seems to support building APK. I wonder if our code is portable to android by default? Would need looking into, but low priority.

Protip you can use the labels to mark issues. I made a couple for low priority and high priority issues

Nice, thanks


backspace button works twice at physical Android device

build application ( $ flutter build appbundle )
share build application and install using "Google play internal App sharing"
Input word in textfield
press backspace

Expected results:
just delete 1 word
Actual results:
2 word will be delete

PS C:\Users\hatadev\Desktop\product\plotter\manga_plotter\mangaplotter> flutter doctor -v
[√] Flutter (Channel beta, 1.24.0-10.2.pre, on Microsoft Windows [Version 10.0.19042.630], locale ja-JP)
    • Flutter version 1.24.0-10.2.pre at C:\src\flutter
    • Framework revision 022b333a08 (5 days ago), 2020-11-18 11:35:09 -0800
    • Engine revision 07c1eed46b
    • Dart version 2.12.0 (build 2.12.0-29.10.beta)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
    • Android SDK at C:\Users\hatadev\AppData\Local\Android\sdk
    • Platform android-30, build-tools 29.0.1
    • Java binary at: C:\Program Files\Android\Android Studio1\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio1
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] VS Code (version 1.51.1)
    • VS Code at C:\Users\hatadev\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.16.0

[√] Connected device (4 available)
    • AOSP on IA Emulator (mobile) • emulator-5554 • android-x86    • Android 9 (API 28) (emulator)
    • Web Server (web)             • web-server    • web-javascript • Flutter Tools
    • Chrome (web)                 • chrome        • web-javascript • Google Chrome 87.0.4280.66
    • Edge (web)                   • edge          • web-javascript • Microsoft Edge 87.0.664.41

looks like a duplicate of https://github.com/flutter/flutter/issues/70744


Helm installer: Tolerations and node selectors should be propagated to the daemon nodes

Have you

[x] Read Troubleshooting Guide
[x] Searched on GitHub issues and Discussions

What steps did you take and what happened:
[A clear and concise description of what the bug is.]
When deploying to a cluster where a set of nodes has tolerations, we can configure node tolerations for the controller but not for the daemon set that this controller installs (DaemonSet/csi-secrets-store-csi-driver). I had to manually edit this daemonset to include the tolerations:.
I installed with:
helm install -f secrets-helm-config.yaml csi csi-secrets-store-provider-azure/csi-secrets-store-provider-azure
Where the config file contains:
linux:
  nodeSelector:
    agentpool: scfnodes
  tolerations:
    - key: "version"
      operator: "Equal"
      value: "1.18"
      effect: "NoSchedule"

And the controller nodes were correctly installed in the matching nodes but the csi-secrets-store-provider-azure were only installed in the nodes that did not have tolerations.
What did you expect to happen:
I was expecting the tolerations to be applied to the csi-secrets-store-provider-azure daemonset or have another option on the helm to define them.
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Which access mode did you use to access the Azure Key Vault instance:
[e.g. Service Principal, Pod Identity, User Assigned Managed Identity, System Assigned Managed Identity]
Pod identity but not related to the issue
Environment:
Latest helm tag.

Secrets Store CSI Driver version: (use the image tag):secrets-store-csi-driver-0.0.21
Azure Key Vault provider version: (use the image tag): csi-secrets-store-provider-azure-0.0.18
Kubernetes version: (use kubectl version and kubectl get nodes -o wide): v1.17.16 & v1.18.17
Cluster type: (e.g. AKS, aks-engine, etc): AKS

Hi @alsastre helm chart of provider has driver chart as dependency. You can provide those override in values.yaml file under secrets-store-csi-driver section.
Here is an example override for driver:
secrets-store-csi-driver:
  install: true
  linux:
    enabled: true
    nodeSelector:
      agentpool: scfnodes
    tolerations:
      - key: "version"
        operator: "Equal"
        value: "1.18"
        effect: "NoSchedule"
    kubeletRootDir: /var/lib/kubelet
    metricsAddr: ":8080"
    image:
      repository: mcr.microsoft.com/oss/kubernetes-csi/secrets-store/driver
      tag: v0.0.21
      pullPolicy: IfNotPresent
    registrarImage:
      repository: mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar
      tag: v2.1.0
      pullPolicy: IfNotPresent
    livenessProbeImage:
      repository: mcr.microsoft.com/oss/kubernetes-csi/livenessprobe
      tag: v2.2.0
      pullPolicy: IfNotPresent

Great thanks!

Hi @nilekhc , the fix you proposed is not working for the csi-secrets-store-provider-azure pods. These provider pods are still only getting deployed to the nodes without the taint. I even tried adding this to my yaml file but it didn't work.
csi-secrets-store-provider-azure:   install: true   linux:     enabled: true     tolerations:       - key: "dedicated"         operator: "Equal"         value: "load"         effect: "NoSchedule"


useConditionalEffect dependencies conflicts with predicates

What is the current behavior?
Using an empty deps array forces the effect to run only once while disregarding the predicates.
The same applies if there are deps in the array, but the predicates aren't truthy at the time it runs.

The issue surfaces mostly when using refs as predicates, since those can't be used as deps for the effect.

useConditionalEffect(
  () => {},
  [],
  [!!ref.current]
)

What is the expected behavior?
[] should equal undefined (but run only once), so respecting the predicates.
Possible solution
Set the deps to undefined internally until the effect can run once following the predicates, then stopping further runs.
Environment Details

@react-hookz/web version: 11.0.0
react version: 17.0.2
react-dom version: 17.0.2
OS: Big Sur
Browser: All
Did this work in previous versions? I don't think so

I am really not sure about that, besides that it is one of possible ways of doing that.
So we have two ways:

conditions over deps
Works as usual effect hook but with extra check of conditions. Dependencies change check performed each render, conditions predicate checked when deps changed.
deps over conditions
This one flips it upside-down. Conditions check will be performed each render and then we check dependencies.

First one more "aligned" with native hook.
I'd start the vote on that🙃 @JoeDuncko

I'm thinking (1) is more intuitive and how I'd expect the hook to work. Is there a case where (2) makes more sense?

Closing due to lack of activity in conversation


Initial support for SPI and I2C

This is an early (but working) support for both SPI and I2C.
I2C has been tested with a DS 3231 RTC + logical analyzer.
SPI has been tested with MAX7219 + logical analyzer.
Chances are that there are still some bugs, but  it's still better than no support at all :)
I'm still new to Rust, so there may be some construct that are not idiomatic... In particular, the types used for alternate function are still a bit new for me, so my solution may not be the best.

As a side note, this has been tested with ek-lm4f120xl and ek-tm4c123gxl boards.

Many thanks for this PR - I'm really excited about adding I2C and SPI support for this board.
I see what you mean about the type state for I2C. I'm going to have a bit of a think about how best to ensure the I2C GPIO pins are set in the correct mode and get back to you. I'm not sure giving AF3 a mode in itself is right, but I don't know what the right answer is either.

Ok. Maybe I could try to do something at the same level as the AFx types, ie. AF3OD ? Do not hesitate to give even hint of potential things to try; I'm doing this as a way to learn rust, so any exercise is good for me :)

I can also split this PR in 2 (spi & i2c) so they can be merged separately.

OK, I've had a bit of a think, and I'd like to propose a alternative solution to the extra type state this adds to AF3. If the I2C driver takes a GPIO pin which implements SdaPin then we know the I2C driver "owns" that pin - no one else can use it. We also know it must already have been placed into the correct Alternate Function mode (which may vary depending on the pin and the peripheral, but in this case seems to be AF3 for I2C), but we do not know whether the Open Drain bit has been set. As there is almost never a scenario where you don't want your SDA pin in Open Drain mode, I think the best thing to do is to add an unsafe fn for all GPIO pins, regardless of which mode they are in, which sets the Open Drain bit. The I2C driver should then call this unsafe function on the SDA pin it is provided, to ensure the Open Drain bit is set.

Makes sense :) I can give it a try if it's ok for you !

Small question: why is it not the global model (ie. letting drivers own the abstract pin and configure it as they want) ?

Sorry for the delay,busy week....
I can see why the low level GPIO config is not pushed in drivers code when it's not the driver's work to decide if it needs to set the pctl to value x or y depending on which device it is setting up. But what if for a given driver, the config is always the same ? In our case, i2c pins always have pclt == 3, and 1 pin must have open drain set. I don't see it as contradictory to the stm reference, but maybe I'm wrong.
I find it odd to have the pin setup split between the caller and the callee. If the previous proposition is still not ok by you, wouldn't it be a bit more homogeneous to have an extra AF3OD type (along with AF1, AF2, AF3, ...) ? There would be an extra into_af3od() that returns the pin in the correct state (same as in my current code, without the extra type generics).

So the concept of using the GPIO module to set pin config and passing pre-configured pins into the peripheral was a model proposed by @japaric and one I'm keen to follow to get some consistency.
I've proposed a new GPIO API for handling Alternate Functions in https://github.com/thejpster/tm4c123x-hal/tree/new_gpio_af. It allows for AF pins to be Open Drain or Push Pull, and if in Open Drain lets you specify floating or pull-ups (I figured pull-down was useless on an Open Drain pin). Let me know what you think.

Hi ! As said before I'm new so it's still a bit hard to compare different solutions. But as you said, it looks more consistent. When you merge these changes in your master branch, I'll rebase my commit !
Thanks !

New GPIO stuff merged.

I've rebased all my changes and was able to test that SPI is still working. I need to do some basic tests for I2C and then I can submit my changes for review.
Thanks !

Ok, I've tested both I2C and SPI and they seem to work. Can't say that I've been stress-testing them very hard, but at least with both my devices (max7219 and DS3231) on both boards (tm4c and lm4f), it works.
Do not hesitate to make me change part of the code... I'm still learning...

Thank you for taking the time to submit this PR. Sorry, I've been tied up with election things recently. I'll make a note to check on this shortly.

Tell me when you think it's best for me to refresh this PR. I see that you've done some cleanup, including in spi/i2c. I can rebase it if you think you can review it :)

Please do rebase, I should have a chance to take a look before RustFest.

Rebase tested on hardware, works as expected...

This looks great! Just a couple of comments in-line about the SPI calculations.

You want me to add more comments about how to compute SPI values, or do you want me to remove some of them ?

Ah, I meant I've left comments in-line in the source code on the "Files changed" page.

Oh, but now I can't see them. Humm. Anyway, I was concerned regarding the selection of CSPR and the downcast to a u8. Once you've got a u8, it'll definitely be <= 255, so wasn't sure the assert was useful, or it was doing the right thing if a candidate cspr was > 255.

Ah ! You are right, but then it seems I won't correctly handle cases where there is no solution. I'll rework this part to make sure I get all corner cases ! Thanks for the review !

Ok, I've pushed a fixed version of my branch. I'm still not sure what should be done in case of error. Looking at STm32 crates does not show any example of error handling in constructors...

I can't see any changes. I've got src/spi.rs from c26bbab. Is that right?

Yes, that's correct. In this version I compute the cpsr value using u16 and still checking that we find something using assert, and then I downcast the value to u8 before its real usage.

scratch head
I'm looking at

Yes, but cpsr is declared as u16 before the loop and shadowed by a u8 declaration after.
But you're right that scr has the same problem, I was too quick and only focused on cpsr, sorry.

I've reworked this loop, hope it is correct now. I've rebased over your latest changes and also updated the copyright notice. It still works correctly with my test setup.

:)

Yeah, sorry, snowed under atm.
I'm still confused though - Github tells me commits where made on May 25, 2018, but that the individual commits are from 27 March. Have you been adding new commits with changes arising from the comments above, or re-writing the old commits?

Oh, that's why my in-line comments have been disappearing then and the dates are all confused.
Without those comments to check against, I guess this is fine to merge.

Thanks !


[ERROR] Null response.

$ sudo apt install translate-shell
install ok...
$ trans nichons
[ERROR] Null response.
[ERROR] Oops! Something went wrong and I can't translate it for you :(
And I have the same thing whatever the parameters I write.
linux mint 18.2

Please update to the latest version (<IP_ADDRESS>).