Insert string keys back in argument annotations

Description
In the gtscript.stencil function, I propose to replace back the actual datatypes with their string placeholders in the argument annotations of the definition function before returning the StencilObject. This allows to properly compile multiple versions of the same stencil - each with a different specification of datatypes - inside a Python session. This is useful for tests parametrized in the fields datatype.
Requirements
Before submitting this PR, please make sure:

[x] The code builds cleanly without new errors or warnings
[x] The code passes all the existing tests
[ ] If this PR adds a new feature, new tests have been added to test these
new features
[ ] All relevant documentation has been updated or added

Additionally, if this PR contains code authored by new contributors:

[x] All the authors are covered by a valid contributor assignment agreement,
signed by the employer if needed, provided to ETH Zurich
[x] The names of all the new contributors have been added to an updated
version of the AUTHORS.rst file included in the PR

Formatting is currently broken. Wait a second and we will merge the fix.

Your fix is clearly easier, Enrique, and I cannot see any argument against it. I will implement your solution and add a couple of unit tests.

It looks fine to me. @stubbiali is there anything else here that you want to add or can I merge?

Nothing more to add. It can be merged.


Coverage combining

Codecov Report

Merging #1075 (bb2386b) into master (380dcc3) will decrease coverage by 2.78%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1075      +/-   ##
==========================================
- Coverage   94.05%   91.27%   -2.79%
==========================================
  Files          86       90       +4
  Lines       12238    13358    +1120
  Branches     1230     1493     +263
==========================================
+ Hits        11510    12192     +682
- Misses        585      954     +369
- Partials      143      212      +69

Impacted Files
Coverage Δ

coverage/debug.py
58.51% <0.00%> (-36.08%)
:arrow_down:

tests/test_oddball.py
81.54% <0.00%> (-18.46%)
:arrow_down:

coverage/optional.py
84.61% <0.00%> (-15.39%)
:arrow_down:

tests/goldtest.py
85.88% <0.00%> (-14.12%)
:arrow_down:

tests/test_process.py
86.33% <0.00%> (-10.52%)
:arrow_down:

tests/test_concurrency.py
86.31% <0.00%> (-10.20%)
:arrow_down:

tests/osinfo.py
41.93% <0.00%> (-9.92%)
:arrow_down:

tests/test_api.py
93.42% <0.00%> (-5.68%)
:arrow_down:

coverage/misc.py
90.00% <0.00%> (-5.07%)
:arrow_down:

tests/coveragetest.py
95.17% <0.00%> (-3.92%)
:arrow_down:

... and 26 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 380dcc3...bb2386b. Read the comment docs.


experiment with removing descriptors from zip file entries during updates

a spin off from #475 which makes the other change suggsted there to remove descriptors from entries during updates, in cases where the header is rewritten rather than just copied directly.
Put in a seperate PR to keep the experiment seperate in case the existing change is the one that's used.
Also adds an extra test, using a zip file created by a version of ZipOutputStream tweaked to not write the signature bytes, on top of the ones created directly during the tests.
The extra tests don't call TestArchive because it thinks that entries whose descriptors don't have signature bytes are invalid, which doesn't seem correct either?
I certify that I own, and have sufficient rights to contribute, all source code and related material intended to be compiled or integrated with the source code for the SharpZipLib open source product (the "Contribution"). My Contribution is licensed under the MIT License.

Something i'm not sure about when looking at the existing code - what's the intention of the bit at https://github.com/icsharpcode/SharpZipLib/blob/a3bed391da11863277a597f6ae9ce2a9b8c20f83/src/ICSharpCode.SharpZipLib/Zip/ZipFile.cs#L2082, where it enables descriptors for entries which are being encrypted - i'm not sure how that would effect the need for a descriptor?
(possibly the tests should be run with both plain and encrypted entries in case there are any differences?))

Well, just before that it checks if the CRC is present. If it isn't then it would have to be added in the descriptor. It might be the case that this couldn't be established before the crypto logic in some cases? It's a perfect example of where a comment would be really helpful.

Well, just before that it checks if the CRC is present. If it isn't then it would have to be added in the descriptor.

Would'nt that only be the case if the header can't be patched later?

In any case, any thoughts on the changed update.Command == UpdateCommand.Copy case in WriteLocalEntryHeader ?

@Numpsy I can't say that I fully understand the zipcrypto, but AFAIK it relates to how the CRC works when using encryption. The current implementation of OutputZipStream forces Descriptors on encrypted Store entries, even with a seekable stream. I have noticed this behaviour, but not investigated much further.
As for the copy, that does seem like what you would want, but the archive updating code is really hard to test correctly!

Required a bit more thought then I think, in case there are any other uninteded consequences.
(If the logic is related to ZipCrypto, that might mean there is something to think about for AES mode as well?)

I've been hoping to get back to this one, but haven't had any time recently to have a real think about it, but still hope to get back to it later.


How to get the number of updated/deleted rows?

Hi,
How i can get the number of affected rows for update/delete?
Example:
auto sql =
    "UPDATE todo SET "
    "title = :title, "
    "body = :body, "
    "data = :data, "
    "done = :done, "
    "updated_at = :updated_at "
    "WHERE id = :id";

auto application = std::static_pointer_cast<ApplicationCoreImpl>(ApplicationCore::shared());
auto db = application->getDB();

SQLite::Statement query(*db, sql);

query.bind(":id", id);
query.bind(":title", todo.title);
query.bind(":body", todo.body);
query.bind(":data", MapHelper::toJsonString(todo.data));
query.bind(":done", todo.done);
query.bind(":updated_at", DateTime::getStringFromDateTime(todo.updatedAt));
query.exec();

Thanks.

There is any utility for this?
sqlite3_changes(db->getHandle())

If not, can you add a function like this ?
int getTotalChanges() const noexcept; // nothrow

You can add this:
// Get total number of rows modified by all INSERT, UPDATE or DELETE statement.
int Database::getChanges() const noexcept
{
    return sqlite3_changes(getHandle());
}

Hello @paulo-coutinho,
Your query.exec() call does already return the number of changes made :)
 * @return number of row modified by this SQL statement (INSERT, UPDATE or DELETE)
 */
int Statement::exec()

Thanks for the suggestion,
I implemented it and added it in examples and unit tests, even if it wasn't really strictly needed; it shows people might look for it like you did.
Cheers!
Sébastien


Material ui #4 Finalize MaterialUI documentation with complete samples.

Finalized MaterialUI documentation with complete samples for all methods

merged in https://github.com/SymDSTools/Docs/pull/3


Integration test: host app service and store not available

I added store and select-values service like this http://ember-engines.com/guide/services
everything works in the application.
in test
const values = this.owner.lookup('service:select-values');
const store =  this.owner.lookup('service:store');
values == undefined
store == engine store, not host store.
How i can get services and host application store in integration test?

You'll need to set the resolver correctly. This should definitely go into the docs!
You can find information on that here: https://github.com/ember-engines/ember-engines/issues/525#issuecomment-400130718 (and below)

I set resolver like this
const resolver = engineResolverFor('appointments-manager');

describe('Integration | Component | Date picker', () => {
  setupRenderingTest({ resolver });

  test('renders text', async function(assert) {
    await render(hbs`{{date-picker}}`);
    // expect something
  });
});

test works if register mock store, but i need set host app store const store = this.owner.lookup('service:store');
store - not host store.

Not sure I understand - but any service that is passed in to your engine (=not defined or installed in the engine itself) will need to be manually injected - see this comment: https://github.com/ember-engines/ember-engines/issues/525#issuecomment-402131973


High mapping score with big KL reg

Hi
I tried to map 3000 cells to 1000 voxels. I see the KL reg stayed in large compare to tutorial case. Waht could be the possible reason for this?
Tim
INFO:root:Allocate tensors for mapping.
INFO:root:Begin training with 271 genes and rna_count_based density_prior in cells mode...
INFO:root:Printing scores every 100 epochs.
Score: -0.002, KL reg: 38.268
Score: 0.704, KL reg: 26.072
Score: 0.712, KL reg: 26.075
Score: 0.719, KL reg: 26.078
Score: 0.723, KL reg: 26.081
Score: 0.730, KL reg: 26.085
Score: 0.733, KL reg: 26.088
Score: 0.735, KL reg: 26.089
Score: 0.738, KL reg: 26.090
Score: 0.740, KL reg: 26.090
INFO:root:Saving results..

Hi @Fclef . Thanks for your question. The values of KL divergence is dependent on the number of voxels in the spatial samples. Normally the larger number of voxels in the samples, the larger the KL divergence can be. As long as it stabilizes at a values and does not fluctuate too much it should not be a big concern.


Adding the umbrella chart for amazon

Should we default to using the rancher version to 2.7.5 instead of 2.7.4 as the changes to support payg offering is in 2.7.5?

Decide to go with deployer option


Applying RNN

Could I receive some guidance on adjusting the net to correctly predict new targets from train.csv?
https://s3-sa-east-1.amazonaws.com/nu-static/workable-data-science/data-science-puzzle.zip

@hpoit
You sent me a zip file. For obvious reason, I am not going to download and open.
Perhaps, if you provided a more specific question (ie. what are you trying to adjust? learning rate, size of net?) with some sample code, I might be able to give you some guidance.  :)

Perhaps cutting and pasting a sample of your csv data would also be helpful

Hi Andy, this is how train.csv looks like
julia> showcols(train)
24976x108 DataFrames.DataFrame
| Col # | Name        | Eltype     | Missing |
|-------|-------------|------------|---------|
| 1     | x016399044a | Int64      | 0       |
| 2     | x023c68873b | UTF8String | 0       |
| 3     | x0342faceb5 | Int64      | 0       |
| 4     | x04e7268385 | Int64      | 0       |
| 5     | x06888ceac9 | Int64      | 0       |
| 6     | x072b7e8f27 | Float64    | 0       |
| 7     | x087235d61e | Int64      | 0       |
| 8     | x0b846350ef | Float64    | 0       |
| 9     | x0e2ab0831c | Float64    | 0       |
| 10    | x12eda2d982 | Float64    | 0       |
| 11    | x136c1727c3 | Float64    | 0       |
| 12    | x173b6590ae | Float64    | 0       |
| 13    | x174825d438 | Int64      | 0       |
| 14    | x1f222e3669 | Float64    | 0       |
| 15    | x1f3058af83 | Int64      | 0       |
| 16    | x1fa099bb01 | Int64      | 0       |
| 17    | x20f1afc5c7 | Float64    | 0       |
| 18    | x253eb5ef11 | Float64    | 0       |
| 19    | x25bbf0e7e7 | Int64      | 0       |
| 20    | x2719b72c0d | Float64    | 0       |
| 21    | x298ed82b22 | Float64    | 0       |
| 22    | x29bbd86997 | Float64    | 0       |
| 23    | x2a457d15d9 | Int64      | 0       |
| 24    | x2bc6ab42f7 | Float64    | 0       |
| 25    | x2d7fe4693a | Float64    | 0       |
| 26    | x2e874bc151 | Float64    | 0       |
| 27    | x361f93f4d1 | UTF8String | 0       |
| 28    | x384bec5dd1 | Int64      | 0       |
| 29    | x3df2300fa2 | Float64    | 0       |
| 30    | x3e200bf766 | Int64      | 0       |
| 31    | x3eb53ae932 | Float64    | 0       |
| 32    | x435dec85e2 | Float64    | 0       |
| 33    | x4468394575 | Float64    | 0       |
| 34    | x49756d8e0f | Float64    | 0       |
| 35    | x4fc17427c8 | Float64    | 0       |
| 36    | x55907cc1de | Float64    | 0       |
| 37    | x55cf3f7627 | Float64    | 0       |
| 38    | x56371466d7 | Int64      | 0       |
| 39    | x5b862c0a8f | Int64      | 0       |
| 40    | x5f360995ef | Int64      | 0       |
| 41    | x60ec1426ce | Float64    | 0       |
| 42    | x63bcf89b1d | Float64    | 0       |
| 43    | x6516422788 | Float64    | 0       |
| 44    | x65aed7dc1f | Int64      | 0       |
| 45    | x6db53d265a | Int64      | 0       |
| 46    | x7734c0c22f | Float64    | 0       |
| 47    | x7743f273c2 | Float64    | 0       |
| 48    | x779d13189e | Float64    | 0       |
| 49    | x77b3b41efa | Float64    | 0       |
| 50    | x7841b6a5b1 | Float64    | 0       |
| 51    | x789b5244a9 | Float64    | 0       |
| 52    | x7925993f42 | Float64    | 0       |
| 53    | x7cb7913148 | Int64      | 0       |
| 54    | x7fe6cb4c98 | Float64    | 0       |
| 55    | x8311343404 | Float64    | 0       |
| 56    | x87b982928b | Float64    | 0       |
| 57    | x8a21502326 | Float64    | 0       |
| 58    | x8c2e088a3d | Int64      | 0       |
| 59    | x8d0606b150 | UTF8String | 0       |
| 60    | x8de0382f02 | Float64    | 0       |
| 61    | x8f5f7c556a | Int64      | 0       |
| 62    | x91145d159d | UTF8String | 0       |
| 63    | x96c30c7eef | Float64    | 0       |
| 64    | x96e6f0be58 | Float64    | 0       |
| 65    | x98475257f7 | Float64    | 0       |
| 66    | x99d44111c9 | Float64    | 0       |
| 67    | x9a575e82a4 | Int64      | 0       |
| 68    | x9b6e0b36c2 | Float64    | 0       |
| 69    | a14fd026ce  | Int64      | 0       |
| 70    | a24802caa5  | Float64    | 0       |
| 71    | aa69c802b6  | Float64    | 0       |
| 72    | abca7a848f  | Int64      | 0       |
| 73    | ac826f0013  | Float64    | 0       |
| 74    | ae08d2297e  | Int64      | 0       |
| 75    | aee1e4fc85  | Float64    | 0       |
| 76    | b4112a94a6  | Float64    | 0       |
| 77    | b709f75447  | Float64    | 0       |
| 78    | b835dfe10f  | UTF8String | 0       |
| 79    | b9a487ac3c  | Float64    | 0       |
| 80    | ba54a2a637  | Float64    | 0       |
| 81    | bdf934caa7  | Float64    | 0       |
| 82    | beb6e17af1  | Int64      | 0       |
| 83    | c0c3df65b1  | Int64      | 0       |
| 84    | c1b8ce2354  | Float64    | 0       |
| 85    | c58f611921  | Float64    | 0       |
| 86    | d035af6ffa  | Float64    | 0       |
| 87    | d2c775fa99  | Int64      | 0       |
| 88    | d4d6566f9c  | Float64    | 0       |
| 89    | dcfcbc2ea1  | Int64      | 0       |
| 90    | e0a0772df0  | Float64    | 0       |
| 91    | e16e640635  | UTF8String | 0       |
| 92    | e5efa4d39a  | Float64    | 0       |
| 93    | e7ee22effb  | Int64      | 0       |
| 94    | e86a2190c1  | Int64      | 0       |
| 95    | ea0f4a32e3  | Float64    | 0       |
| 96    | ed7e658a27  | Float64    | 0       |
| 97    | ee2ac696ff  | Float64    | 0       |
| 98    | f013b60e50  | Float64    | 0       |
| 99    | f0a0febd35  | Float64    | 0       |
| 100   | f1f0984934  | UTF8String | 0       |
| 101   | f66b98dd69  | Float64    | 0       |
| 102   | fbf66c8021  | Float64    | 0       |
| 103   | fdf8628ca7  | Int64      | 0       |
| 104   | fe0318e273  | Float64    | 0       |
| 105   | fe8cdd80ba  | Float64    | 0       |
| 106   | ffd1cdcfc1  | Float64    | 0       |
| 107   | id          | Int64      | 0       |
| 108   | target      | Float64    | 0       |

I'm sorry I understand this isn't an issue about the package, but a question about how to use it.
I have ran a hello world of Mocha.jl on MNIST but not yet for this one. My understanding is that RNNs use shared params over time (not space like CNNs) to extract patterns of sequences.
I would need some guidance on how to apply this package on this 108 column by 24976 row matrix of variables of no particular meaning. The UTF8String columns are SHA-256 hashes for values that represent categorical variables.

@hpoit
Generally, RNNs are used to predict the next variable(s) in a sequence. They are very useful for learning sequential sequence, but this data does not seem to be sequential.  This case seems better suited to a standard DNN, or a perhaps a CNN.
Also note the "Hello World"  of RNN is generally a char-RNN that learns the next character in a sentence. If you are just starting, I suggest having a look at Karpathy"s online example.
http://cs.stanford.edu/people/karpathy/recurrentjs/

Thanks Andy

Andy check these out
http://cs229.stanford.edu/proj2012/BernalFokPidaparthi-FinancialMarketTimeSeriesPredictionwithRecurrentNeural.pdf
http://stats.stackexchange.com/questions/127542/convolutional-neural-network-for-time-series (with a link to LeCun)

| Row   | fbf66c8021 | fdf8628ca7 | fe0318e273  | fe8cdd80ba | ffd1cdcfc1 | id    | target     | |-------|------------|------------|-------------|------------|------------|-------|------------| | 1     | 91.7786    | 1058       | 1.0005      | 40.2978    | 1.74053    | 0     | 0.536383   | | 2     | 26.235     | 1036       | 1.0006      | 6.03076    | 7.08524    | 1     | 0.426536   | | 3     | 48.9608    | 1039       | 0.000571041 | 40.2693    | 5.31598    | 2     | 0.498649   | | 4     | 6.23632    | 1044       | 1.0007      | 29.1151    | 1.78314    | 3     | 1.01357    | | 5     | 19.3486    | 998        | 1.00058     | 44.0475    | 3.21903    | 4     | 4.00876    | | 6     | 62.7932    | 988        | 1.00053     | 43.2183    | 8.44368    | 5     | 1.77013    | | 7     | 97.5266    | 1049       | 1.00069     | 10.2458    | 7.99116    | 6     | 0.895514   | | 8     | 62.2518    | 1025       | 1.00073     | 36.1519    | 3.99028    | 7     | 0.348059   | | 9     | 29.6062    | 1013       | 1.00059     | 13.0537    | 1.14704    | 8     | 0.547179   | | 10    | 1.69667    | 1010       | 1.00059     | 2.71338    | 2.28359    | 9     | 2.38998    | | 11    | 28.5268    | 970        | 1.00049     | 38.6509    | 2.38913    | 10    | 3.36091    | | 12    | 83.2608    | 985        | 1.00078     | 38.2881    | 1.14008    | 11    | 1.4124     | | 13    | 91.1006    | 976        | 1.00076     | 15.5142    | 4.79976    | 12    | -0.0996988 | | 14    | 11.0477    | 981        | 1.00089     | 23.5938    | 3.45635    | 13    | 0.40257    | | 15    | 65.0404    | 969        | 1.00069     | 42.4824    | 3.15091    | 14    | 0.896381   | | 16    | 40.3231    | 1025       | 1.00035     | 39.045     | 1.12076    | 15    | 1.97511    | | 17    | -3.04205   | 1008       | 1.00069     | 14.4767    | 4.3642     | 16    | 0.315973   | | 18    | -19.6236   | 1017       | 1.0006      | 32.9957    | 1.78944    | 17    | 1.35555    | | 19    | 8.65733    | 954        | 1.00044     | 45.9944    | 2.35002    | 18    | 5.32482    | | 20    | 31.6925    | 1046       | 1.00055     | 39.5133    | 2.96461    | 19    | 0.591043   | | 21    | 81.1518    | 979        | 1.00049     | 18.877     | 3.95433    | 20    | 0.610452   | | 22    | 17.8116    | 963        | 1.00045     | 44.2147    | 2.2464     | 21    | 1.45285    | | 23    | 44.6326    | 1006       | 1.00049     | 33.1826    | 2.8726     | 22    | 0.179439   | ⋮ | 24953 | 67.7065    | 966        | 1.00046     | 45.3271    | 3.86463    | 24952 | 7.6247     | | 24954 | 48.4608    | 925        | 0.000645519 | 10.0123    | 5.18167    | 24953 | 0.340788   | | 24955 | 15.8755    | 1009       | 1.00075     | 4.44004    | 3.71273    | 24954 | 0.205181   | | 24956 | 66.2357    | 982        | 1.00049     | 40.2374    | 3.73331    | 24955 | 2.04826    | | 24957 | 7.30888    | 1048       | 1.00046     | 48.0095    | 2.96435    | 24956 | 0.150869   | | 24958 | 38.1056    | 1027       | 1.00057     | 34.4642    | 2.89719    | 24957 | 0.775302   | | 24959 | 54.3954    | 959        | 1.00068     | 43.4772    | 2.30724    | 24958 | 0.214532   | | 24960 | 53.4419    | 1013       | 1.00057     | 8.44832    | 2.55465    | 24959 | 0.1074     | | 24961 | 54.858     | 1031       | 1.00056     | 4.92166    | 1.29723    | 24960 | 0.46036    | | 24962 | 2.46157    | 987        | 1.00056     | 24.7661    | 5.32419    | 24961 | 0.241159   | | 24963 | -1.48726   | 1034       | 1.00047     | 43.5869    | 1.45187    | 24962 | 1.73751    | | 24964 | 64.2474    | 1024       | 1.00052     | 25.3957    | 2.0713     | 24963 | 0.390916   | | 24965 | 24.4898    | 1008       | 1.00041     | 9.17904    | 2.66892    | 24964 | 3.03904    | | 24966 | 1.82829    | 985        | 1.0008      | 23.6407    | 2.76205    | 24965 | 2.71701    | | 24967 | 8.61764    | 981        | 1.00067     | 33.3696    | 4.66886    | 24966 | 2.94019    | | 24968 | 18.3361    | 1024       | 1.00062     | 16.4426    | 2.93404    | 24967 | 0.309083   | | 24969 | 86.9393    | 982        | 1.00046     | 8.75922    | 4.45587    | 24968 | 0.998051   | | 24970 | 84.2475    | 980        | 1.00068     | 6.66636    | 1.15699    | 24969 | 0.762129   | | 24971 | 20.744     | 980        | 1.00059     | 24.2177    | 2.89352    | 24970 | 0.377102   | | 24972 | 9.25122    | 998        | 1.00051     | 48.5923    | 0.837068   | 24971 | 3.88774    | | 24973 | 56.7977    | 1006       | 1.00029     | 20.9637    | 1.36332    | 24972 | 2.39431    | | 24974 | -41.5304   | 954        | 1.00045     | 19.2523    | 1.42232    | 24973 | 0.50462    | | 24975 | 40.2701    | 1035       | 1.00067     | 43.852     | 1.82505    | 24974 | 23.0103    | | 24976 | 12.7766    | 1043       | 1.00066     | 7.67478    | 1.65179    | 24975 | 2.53425    |

This is the target column
julia> train[108] 24976-element DataArrays.DataArray{Float64,1}:   0.536383    0.426536    0.498649    1.01357     4.00876     1.77013     0.895514    0.348059    0.547179    2.38998     3.36091     1.4124     -0.0996988   0.40257     0.896381    1.97511     0.315973    1.35555     5.32482     0.591043    0.610452    1.45285     0.179439    3.16545     ⋮           7.6247      0.340788    0.205181    2.04826     0.150869    0.775302    0.214532    0.1074      0.46036     0.241159    1.73751     0.390916    3.03904     2.71701     2.94019     0.309083    0.998051    0.762129    0.377102    3.88774     2.39431     0.50462    23.0103      2.53425
... which appears to be the output of a logit. This can be done on a CNN, sure, but with no use of shared params over time (memory).

I'm also comparing your rnn.jl code to https://github.com/kzahedi/RNN.jl/blob/master/src/RNN.jl and trying to understand the differences.

If by sequential sequence you meant sampling for the next prediction every epoch (very greedy), there's a more sophisticated way to do this that returns better results, which is by sampling multiple times per epoch, so single bad choices permanently recorded are prevented. This should enable full sequence prediction, which I will look into.

Sequences. Depending on your background you might be wondering: What makes Recurrent Networks so special? A glaring limitation of Vanilla Neural Networks (and also Convolutional Networks) is that their API is too constrained: they accept a fixed-sized vector as input (e.g. an image) and produce a fixed-sized vector as output (e.g. probabilities of different classes). Not only that: These models perform this mapping using a fixed amount of computational steps (e.g. the number of layers in the model). The core reason that recurrent nets are more exciting is that they allow us to operate over sequences of vectors: Sequences in the input, the output, or in the most general case both.
http://karpathy.github.io/2015/05/21/rnn-effectiveness/

Sequences. Depending on your background you might be wondering: What makes Recurrent Networks so special? A glaring limitation of Vanilla Neural Networks (and also Convolutional Networks) is that their API is too constrained: they accept a fixed-sized vector as input (e.g. an image) and produce a fixed-sized vector as output (e.g. probabilities of different classes). Not only that: These models perform this mapping using a fixed amount of computational steps (e.g. the number of layers in the model). The core reason that recurrent nets are more exciting is that they allow us to operate over sequences of vectors: Sequences in the input, the output, or in the most general case both.

http://karpathy.github.io/2015/05/21/rnn-effectiveness/

@johnmyleswhite @StefanKarpinski am I making sense?

@Andy-P
I have an additional question about usage.  How would you apply this library to doing time-series prediction, as in the link below?
http://machinelearningmastery.com/time-series-prediction-lstm-recurrent-neural-networks-python-keras/
I guess one of the main things I don't quite grasp in the example is the usage of the "wil" NNMatrix and how that would be used outside of the example (if it would even be necessary).
Thanks!
Chris

@pazzo83 This library is longer supported. I suggest you use MxNet.jl. There is a good example of an LSTM here


How to show column number like the ruler?

When I don't use Airline, I can use set ruler in my vimrc and I'll see my statusbar look as follows on an empty file:
[No Name]                                         0,0-1       All

When I select the last character in a line of 66 chars + 1 tab, it shows:
[No Name]                                         58,67-70    All

The 67 is what I'm interested in; I want the number of characters on the line. How can I get the column in Airline to show 67-70 (the way ruler does it), instead of 70 (Airline, because it is the column; I want column and character number) in section Z?

To change the contents of a section it's sufficient in airline to redefine the global
value representing the section in your vimrc.
According to init.vim the defualt falue of g:airline_section_z is defined as:
let g:airline_section_z = airline#section#create(['windowswap', 'obsession', '%3p%%'.g:airline_symbols.space, 'linenr', 'maxlinenr', g:airline_symbols.space.':%3V'])

The bit we want to change is at the end, where airline is just dropping through to normal
statusline values: the %3V. By default to make it exactly like vim you can set it to
%c%V instead. See :h 'statusline' for a reference. You could modify the spacing a bit as
well if you like, e.g. for me something like %2.3c%-.3V looks good. Put the new
definition of the entire section in your vimrc and it should just work.

Thanks for your help! %5(%c%V%) looks great; now I don't need that stupid-looking default statusbar! :smiley:


change "dependencies" from a string to a list of strings

I am doing some changes on luarocks-tag-release to be able to run it locally with as stdin a subset of the plugins.json. The "dependencies" as a string was an annoyance and anyway it's cleaner to have it structured.
I need them to join the list as a string for luarocks-tag-release to work with luarocks-tag-release but as I am unsure how to do that with github DSL, testing here

turned out github workflow has a join function that does just that.

Readme needs an update :)

it borke the workflow because the concatenation is not good https://github.com/nvim-neorocks/nurr/actions/runs/9888890852/job/27313793850#step:4:489 :/ I should have added a basic generation in the PR test. I will do a follow up

will try to fix this in https://github.com/nvim-neorocks/nurr/pull/13


Use PlasmaFramework & friends to deposit, tx, start SE, finalize SE

Fixes #948
EDIT originally this was supposed to be deposits & txs only, but expanded this to also do start exit and finalize exit for at least minimum assurance that things make sense
Overview
Switches the integration test to use PlasmaFramework.
(rather) Dirty, refactors pending after it's proven to work.
Changes

use solc 0.5
pull in new contracts from a branch
compile, link & deploy them, collect necessary contract addresses
switch deposit stuff to new appropriate contract
switch submitBlock stuff to new appropriate contract
switch startExit and finalize for standard exit to new appropriate contract
switch to new transaction data model an a couple of new semantics (see commit list)
switched to a branch in plasma_contracts to use contract code that has been e2e tested using the "old" contract test suite (aka Python test suite)
adapt to new contracts' API by storing exit_id instead of recreating it by calling geth

Testing
Some tests will be skipped. Deposit, submitBlock, start SE & finalize SE related integration tests should pass.
Tests skipped are SE challenges, IFEs and EIP712 conformance

Coverage remained the same at ?% when pulling 60d9ef716ab07f7a4987e770d23f5be3da4d4d84 on 948-ald-deposit-tx-integration into 83c297671dad6f746a29dd2d3e7925e9c43600be on master.

One thing that has popped up in a call with @InoMurko and @achiurizo is lack of vault_id / token_standard_id in UTXO and output data structures.

Hey @pdobacz I have a question to regards to UTXOs.
If we have multiple ERC20 currency support + ETH + ERC721. How do we differentiate UTXOs since they all live under the same key in RocksDB? I talked to @paulperegud and he mentioned we need to use a vault identifier... I don't see this here. Just wondering...

Wouldn't outputType be better identifier when thinking about output data structure? like what @pdobacz mentioned in https://github.com/omisego/plasma-contracts/issues/290
but I might be jumping in without right context so.....

lack of vault_id / token_standard_id in UTXO and output data structures.

Guys, this is not the PR you're looking for :). AFAIK, the output format you mention doesn't yet work in the ALD plasma framework contracts, of which the best indication is, that this passes CI :). This still uses the fixed {owner, output, amount} for output.
This PR integrates with the revamp of the contracts structure and typing of txs and some minor changes to the contracts that piggybacked on the ALD change.
The PR for the abstract/new/typed output structure is yet to surface (partly b/c the output's structure and abstract type is in flux).

If we have multiple ERC20 currency support + ETH + ERC721. How do we differentiate UTXOs since they all live under the same key in RocksDB?

The way the UTXOs are keyed and looked up (on tx execution) will depend on the input_pointer_type that they use, i.e. either output_id or utxo_pos. That's agnostic of what the output represents (ERC/ETH/ERC721). The UTXOs will be differentiated by the value not key (unless we have a good reason to lookup by type in the RocksDB, in which case we'd need to provide more indexes - this sounds more like a requirement for the relational WatcherDB). Does this make sense?
But essentially the answer is the same - not in this PR, and this is not set in stone yet. This is all up to the abstract/new/typed output structure PR :point_up:

Just got off a call with @pdobacz and @kendricktan to try to get this PR merged into master and deployed.
The path forward:

[ ] @kendricktan will write a new truffle migration to deploy the contracts in https://github.com/omisego/plasma-contracts/pull/204. And open a new PR based on the 150_python_tests_on_plasma_framework branch. These migrations will only be needed until https://github.com/omisego/plasma-contracts/pull/204 is merged into plasma-contracts/master.
[ ] @kendricktan work with @pdobacz to get this PR merged into elixir-omg/master, using the contracts deployed ☝
[ ] @pdobacz will work with @pik694 to get https://github.com/omisego/plasma-contracts/pull/204 merged into plasma-contracts/master within the next few days. If it takes longer than a few days, we will cherry-pick the needed changes into plasma-contracts/master.
[ ] @pdobacz will change the plasma-contracts dependency in #1005 to a SHA in the plasma-contracts/master history before merging into plasma-contracts/master.
[ ] :tada:

Background
We are trying to merge this to master and build a new dev environment. There are fixes in https://github.com/omisego/plasma-contracts/pull/204 that are needed for integration.
The goal is to minimize the time that the integration of elixir-omg is diverged from the work that is happening on plasma-contracts/master.
Rather than doing branch gymnastics now to get the changes we need into plasma-contracts/master, we decided to try to merge https://github.com/omisego/plasma-contracts/pull/204 as quickly as possible.
@pdobacz @kendricktan – please let me know if I'm off base on any of this. Update the plan, as necessary.

an update/recap:

this PR is mergeable any moment the dev env is setup
https://github.com/omisego/plasma-contracts/pull/204 is mergable AFAIK, passes CI, only pending final CR.

@kendricktan – ready for deployment into the new dev cluster once this merges?

Hey @pdobacz this seems https://github.com/omisego/elixir-omg/issues/1017 like a blocker before we can deploy.

superseded by https://github.com/omisego/elixir-omg/pull/1021 which includes:

@pdobacz@InoMurko fix: drop JSON from env approach … https://github.com/omisego/elixir-omg/pull/1021/commits/e685b8b193df7c52afe049b2cc1669c5ea2828eb
@InoMurko fix: contract exchanger bump fixes 8077248


Build wheels for linux aarch64

Would it be possible to publish binary wheels for linux aarch64?
In particular, this would be useful for users running docker on arm macbooks, as these are effectively linux aarch64 systems. Currently, installing lintrunner on these systems requires having Cargo pre-installed, which would not be necessary if binary wheels were available.
(I can try to contribute if desired, but I have no experience with maturin and rust ecosystem in general)
$ pip install lintrunner
Collecting lintrunner
  Using cached lintrunner-0.12.2.tar.gz (61 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]

      Cargo, the Rust package manager, is not installed or is not on PATH.
      This package requires Rust and Cargo to compile extensions. Install it through
      the system's package manager or via https://rustup.rs/

      Checking for Rust toolchain....
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

This should be supported by maturin and thus relatively easy to add. Here is an example which builds aarch64 macos wheels: https://github.com/ezyang/tlparse/blob/main/.github/workflows/CI.yml
Feel free to make a PR for this; otherwise I'll get around it it later this week

okay, this should be fixed and aarch wheels for macos should be available on pypi


Smaller improvements on MockQueryHandlerRunner

Fixed names of mock objects:

Renamed testing.mock_query_handler_runner.MockQueryHandlerRunner to query_handler.python_query_handler_runner.PythonQueryHandlerRunner
Renamed method PythonQueryHandlerRunner.execute_query() to execute_queries()
Renamed mock_query_result.MockQueryResult to python_query_result.PythonQueryResult

Please additional review by @MarleneKress79789 and @ahsimb


ReferenceError: escade is not defined

I have no idea what escade is, but it's breaking my react application that uses styled-components@master (and has stylis as a dependency):

It was introduced on this commit: https://github.com/thysultan/stylis.js/commit/7c7ebe49637d3477988fadefa22b679ac95dd9cd
Could you prevent this by first checking if this variable exists or any other way?
Thanks.
cc https://github.com/styled-components/styled-components/pull/829

typo, should be escape, patched in v3.0.16


have signed the CLA already but the status is still pending

PR: https://github.com/iresty/apisix/pull/167

But @xiwangzishi already signed the CLA, I confirmed in the contributors list:

URL to the linked Repo/Org:
Steps to reproduce the problem:

What is the expected result?
What happens instead?

I think there is some infrastructure problems atm as I'm having issues installing and configuring. https://twitter.com/GeoffreyHuntley/status/1144454752425529345

It looks like the committer  emitle  hasn't signed the CLA yet.  Could you please check if he/she has signed the CLA and then reach out to us ?.

@ibakshay yes, fixed. thanks very much :)


RestClient not working with SNI enabled endpoint

with Ribbon RestClient 2.2.0 and Apache HttpClient4.5.2, invoking an SNI enabled endpoint results in "handshake_failure" because server_name extension is not in SSL handshake.
While directly using Apache HttpClient4.5.2 can successfully negotiate and server_name extension is successful.
RestClient 2.2.0 appears to be using SSLSocketFactory which is deprecated by apache; while directly using Apache HttpClient uses SSLConnectionSocketFactory.
Is there any workaround?

SNI needs to be added as an SSLParameter to the SSLEngine. That engine is only created in rxNetty, but has been overriden in LoadBalancingHttpClient - https://github.com/Netflix/ribbon/blob/master/ribbon-transport/src/main/java/com/netflix/ribbon/transport/netty/http/LoadBalancingHttpClient.java#L510
You would have to add code there or modify rxNetty. I really don't think there is a clean way to do it without the rxNetty modification.

https://github.com/Netflix/ribbon/pull/391


Verbatim reference link out broken

The link out to all records linking to a given referenceID seems to be wrong.
For ILDIS none return a result. Are all possible places such a reference can show up linked?

https://www.col.plus/dataset/1015/verbatim?type=acef:AcceptedInfraSpecificTaxa&type=acef:Synonyms&type=acef:Distribution&type=acef:CommonNames&type=acef:NameReferencesLinks&acef:ParentSpeciesID=1478&acef:AcceptedTaxonID=1478&acef:AcceptedTaxonID=1478&acef:AcceptedTaxonID=1478&acef:ID=1478&termOp=OR
https://www.col.plus/dataset/1015/verbatim?type=acef:CommonNames&type=acef:NameReferencesLinks&acef:ReferenceID=544&acef:ReferenceID=544&termOp=OR

this seems to be a data issue, for ref 453 it is actually working

see https://github.com/Sp2000/colplus-repo/issues/79


v4.x generates nullable attributes for non-nullable fields

I noticed that in Dart Prisma ORM version 4.x, the generated model classes have nullable attributes (?) for all fields, even when the corresponding fields in the Prisma schema are explicitly marked as non-nullable.
Is this an expected behavior in Prisma ORM 4.x? If so, what is the reasoning behind generating nullable attributes for non-nullable fields?
If this is not the intended behavior, I would appreciate any guidance on how to ensure that the generated Dart models respect the nullability constraints defined in the Prisma schema.
Thank you for your help!

You should note that 4.0 supports the select and include functions. This means that the returned data fields are completely undefined. You can ask the ORM to return fields that you specify. Then other fields mean null values. So all fields being nullable is deliberate behavior.

For example prisma.user.findMany({ select: { id: trye} })
means the returned data is [{id: 1}, {id: 2}]


⚠ RPC server - xDai has degraded performance

In cf3d78f, RPC server - xDai ($XDAI_RPC_URL) experienced degraded performance:

HTTP code: 200
Response time: 434 ms

Resolved: RPC server - xDai performance has improved in 3d9e9dd after 1 hour, 3 minutes.


Create a queue of animation

Is there a way to create a queue of animation instead of using after()?
after() makes the code complex with a large number of animations that has to be done in sequence.
Plus, I'm not sure how to use after() with dynamically generated animations. For example, if I have a loop like this
for (var i = 0; i < 10; i++) {
    element.animate({duration: i}).move(i, i);
}

how can I use after() to have the animations done in sequence?

Is this implemented already?
I think it would be cool if you could simply chain .animate() calls like this:
element
  .animate(300).move(10, 10)
  .animate({ duration: 500 }).fill('#f06')
  .animate({ ease: '>' }).size(50, 50)

I believe the current behaviour of this is to stop an already running animation, though this is not really needed, as one can always use .stop()
This would also make sense as it uses the same code that is already being used for animation.

This was stalled long time but hey - take a look at the 3.0.0 branch when you want to go the first steps with the new fx module. Until now only the move function works and its surely not ready. But in case you are curious just try it out!

implemented in 2.3.0


Cannot serialize the AST with serde_json::to_string

Describe the bug
First thanks for the amazing project! I'm working on a Python wrapper for swc to parse a Javascript code and output AST into JSON format. However, I'm having issues with the serialization serde_json::to_string at here. Rust keeps complaining that serde::ser::Serialize is not implemented for swc_ecma_ast::Program, but from my understanding we should be able to use serde and there is test cases in the code base. I'm new to Rust so there might be some easy things I'm missing. The code is in https://github.com/cllu/pyswc/blob/main/src/lib.rs.
error[E0277]: the trait bound `swc_ecma_ast::Program: serde::ser::Serialize` is not satisfied
    --> src/lib.rs:69:48
     |
69   |         let serialized = serde_json::to_string(&program.unwrap());
     |                          --------------------- ^^^^^^^^^^^^^^^^^ the trait `serde::ser::Serialize` is not implemented for `swc_ecma_ast::Program`
     |                          |
     |                          required by a bound introduced by this call
     |
     = help: the following other types implement trait `serde::ser::Serialize`:
               bool
               char
               isize
               i8
               i16
               i32
               i64
               i128
             and 238 others
note: required by a bound in `serde_json::to_string`

Input code
No response
Config
No response
Playground link (or link to the minimal reproduction)
https://github.com/cllu/pyswc/blob/main/src/lib.rs
SWC Info output
No response
Expected behavior
I'd like to use serde to serialized AST into JSON string.
Actual behavior
No response
Version
latest
Additional context
No response

Closing as this is not a bug of SWC and rather it's about not understanding cargo.

Thanks for pointing that out. I was missing the features=["serde-impl"] for the swc_ecma_ast package.
swc_ecma_ast = {version = "0.109.1", features=["serde-impl"]}


Update CHANGELOG.

Codecov Report

Merging #1616 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #1616   +/-   ##
=========================================
  Coverage     83.51%   83.51%
  Complexity     1813     1813
=========================================
  Files           261      261
  Lines          8339     8339
  Branches        803      803
=========================================
  Hits           6964     6964
  Misses         1121     1121
  Partials        254      254

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c0a5afe...5451137. Read the comment docs.


Use of ComplexType results in "TypeError: 'bool' object is not iterable"

Whenever I use the ComplexType and then pipe the activity to target-csv I get a TypeError: 'bool' object is not iterable error
Traceback (most recent call last):
  File "c:\python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\john.timeus\.local\bin\target-csv.exe\__main__.py", line 7, in <module>
  File "c:\users\john.timeus\.local\pipx\venvs\target-csv\lib\site-packages\target_csv.py", line 141, in main
    state = persist_messages(config.get('delimiter', ','),
  File "c:\users\john.timeus\.local\pipx\venvs\target-csv\lib\site-packages\target_csv.py", line 59, in persist_messages
    validators[o['stream']].validate(o['record'])
  File "c:\users\john.timeus\.local\pipx\venvs\target-csv\lib\site-packages\jsonschema\validators.py", line 129, in validate
    for error in self.iter_errors(*args, **kwargs):
  File "c:\users\john.timeus\.local\pipx\venvs\target-csv\lib\site-packages\jsonschema\validators.py", line 105, in iter_errors
    for error in errors:
  File "c:\users\john.timeus\.local\pipx\venvs\target-csv\lib\site-packages\jsonschema\_validators.py", line 300, in properties_draft4
    for error in validator.descend(
  File "c:\users\john.timeus\.local\pipx\venvs\target-csv\lib\site-packages\jsonschema\validators.py", line 121, in descend
    for error in self.iter_errors(instance, schema):
  File "c:\users\john.timeus\.local\pipx\venvs\target-csv\lib\site-packages\jsonschema\validators.py", line 105, in iter_errors
    for error in errors:
  File "c:\users\john.timeus\.local\pipx\venvs\target-csv\lib\site-packages\jsonschema\_validators.py", line 312, in required_draft4
    for property in required:
TypeError: 'bool' object is not iterableTraceback (most recent call last):
  File "c:\python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\john.timeus\.local\bin\target-csv.exe\__main__.py", line 7, in <module>
  File "c:\users\john.timeus\.local\pipx\venvs\target-csv\lib\site-packages\target_csv.py", line 141, in main
    state = persist_messages(config.get('delimiter', ','),
  File "c:\users\john.timeus\.local\pipx\venvs\target-csv\lib\site-packages\target_csv.py", line 59, in persist_messages
    validators[o['stream']].validate(o['record'])
  File "c:\users\john.timeus\.local\pipx\venvs\target-csv\lib\site-packages\jsonschema\validators.py", line 129, in validate
    for error in self.iter_errors(*args, **kwargs):
  File "c:\users\john.timeus\.local\pipx\venvs\target-csv\lib\site-packages\jsonschema\validators.py", line 105, in iter_errors
    for error in errors:
  File "c:\users\john.timeus\.local\pipx\venvs\target-csv\lib\site-packages\jsonschema\_validators.py", line 300, in properties_draft4
    for error in validator.descend(
  File "c:\users\john.timeus\.local\pipx\venvs\target-csv\lib\site-packages\jsonschema\validators.py", line 121, in descend
    for error in self.iter_errors(instance, schema):
  File "c:\users\john.timeus\.local\pipx\venvs\target-csv\lib\site-packages\jsonschema\validators.py", line 105, in iter_errors
    for error in errors:
  File "c:\users\john.timeus\.local\pipx\venvs\target-csv\lib\site-packages\jsonschema\_validators.py", line 312, in required_draft4
    for property in required:
TypeError: 'bool' object is not iterable

Attached is a anonymized jsonl (change extension from txt to jsonl)
that can be passed to target-csv to generate the error
cat .\Activity.txt | target-csv
Activity.zip

Hi, John. Thanks very much. I actually found the issue quickly. The problem is there are two specs for "required" in different versions of JSON Schema. As of Draft 4 (which is what we are using and which most other versions use), the "required" property is defined at the object (complex-type) level, and it contains a list of required attributes. Specification text here: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#page-12
Previously, we were also appending "required": true which was conflicting with that spec.
The latest update (poetry add singer-sdk==0.0.2-dev.1068113915) should resolve the issue, but please let me know once you've confirmed. Thanks!
Also, for reference, here's the relevant commit diff: https://gitlab.com/meltano/singer-sdk/-/commit/c7b70eb3ac5becd379f85dd662c30441f1913470
I simply removed the addl. boolean flag in favor of the list-based approached which was already implemented.

Confirmed fixed, thanks!


feat: add support for string and int arrays

Like the title said, this adds support for

ARRAY(BIGINT())
ARRAY(TEXT())

Technically this is a breaking change. Where previously all array types were ARRAY(JSONB()), now there's more nuance. Unlikely that many people rely on this behaviour, but we had to write a migration. Should we increment the major version (or at least the minor) to signal this change? Or introduce a feature switch?

Unlikely that many people rely on this behaviour, but we had to write a migration.

@rubenvereecken what would be the migration steps?


Fix username validation to require alpha

Require alphabetic character at the start of the username.
Added (manual) tests.
Closes: #1

It's a good idea to open an issue first for discussion.

[x] Tests pass
[ ] Appropriate changes to README are included in PR

Lab completed.


assign reviewers

Thanks for making spr, really useful.
I like that for creating PRs I can do it all from the command line. however, is there a way to assign a reviewer (e.g. in the commit message) without having to open the github website?

You could write a script or followup with this command in the gh CLI. --add-assignee is what you're looking for.

thanks


fix typo in docs/conceptJoin

fixed spelling of individual

My first PR from someone besides me :-)

Yay!
On Fri, Feb 3, 2017 at 12:42 PM, Kevin Bridges<EMAIL_ADDRESS>wrote:

My first PR from someone besides me :-)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/KevinAst/astx-redux-util/pull/1#issuecomment-277327678,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAWOdeOQyESqJzWXgD2lEZY76kt0nnLks5rY3UvgaJpZM4L2pjo
.

--
Jeff Barczewski
Founder of CodeWinds
http://codewinds.com/
Live and Online developer training

this doc change has been published


Using postgresql with external volume from Mac

I am trying to mount it directly from the Mac file system.
docker run  -v $HOME/postgres_data:/var/lib/postgresql kartoza/postgi

This results in a bunch of errors about user permissions:
initdb: could not create directory "/var/lib/postgresql/9.3/main/global": Permission denied
2015-01-07 16:33:52 UTC FATAL:  data directory "/var/lib/postgresql/9.3/main" has wrong ownership
2015-01-07 16:33:52 UTC HINT:  The server must be started by the user that owns the data directory.

Can a directory shared from Mac file system ever have the read/write permissions that postgres apparently needs?

This seems to be related to https://github.com/boot2docker/boot2docker/issues/629

I have the same error on linux

I also have this issue using osx docker toolbox

There is discussion over on https://github.com/docker-library/mysql/issues/99 dealing with the same issue.  Perhaps we need to add something like https://github.com/docker-library/mysql/pull/161 to postgres?


Validator is not online

The Validator is not online. You can see the Formular you get 404 if you send it.
http://iiif.io/api/image/validator/

Working now, might have been a temporary network outage?

Hmmm, yes – I get a 404 on the results page as well:
http://iiif.io/api/image/validator/results.html?server=https%3A%2F%2Fcontent.wdl.org&prefix=iiif&identifier=iiif-validator-test-image&version=2.0&level=1&id_squares=on&info_json=on&id_basic=on&id_error_escapedslash=on&id_error_unescaped=on&id_escaped=on&id_error_random=on&region_error_random=on&region_pixels=on&size_region=on&size_error_random=on&size_ch=on&size_wc=on&size_percent=on&rot_error_random=on&quality_error_random=on&format_jpg=on&format_error_random=on&jsonld=on&baseurl_redirect=on&cors=on

Fixed. Thanks both!


Unresolved Dependencies during compile

Does anyone know why I might be getting this message when I run sbt compile? I'm on the current develop branch, using Scala 2.10.
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	::          UNRESOLVED DEPENDENCIES         ::
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	:: com.twitter#algebird-test_2.10;0.11.0: configuration not public in com.twitter#algebird-test_2.10;0.11.0: 'test'. It was required from com.twitter#algebird-spark_2.10;0.11.0 test
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] 	Note: Unresolved dependencies path:
[warn] 		com.twitter:algebird-test_2.10:0.11.0
[warn] 		  +- com.twitter:algebird-spark_2.10:0.11.0
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	::          UNRESOLVED DEPENDENCIES         ::
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	:: com.twitter#algebird-test_2.10;0.11.0: configuration not public in com.twitter#algebird-test_2.10;0.11.0: 'test'. It was required from com.twitter#algebird-bijection_2.10;0.11.0 test
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] 	Note: Unresolved dependencies path:
[warn] 		com.twitter:algebird-test_2.10:0.11.0
[warn] 		  +- com.twitter:algebird-bijection_2.10:0.11.0
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	::          UNRESOLVED DEPENDENCIES         ::
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn] 	:: com.twitter#algebird-test_2.10;0.11.0: configuration not public in com.twitter#algebird-test_2.10;0.11.0: 'test'. It was required from com.twitter#algebird-util_2.10;0.11.0 test
[warn] 	::::::::::::::::::::::::::::::::::::::::::::::
[warn]

just doing a ./sbt compile?

Yep

I suspect you might be hitting some oddity between ivy and maven resolving systems. Try change the version.sbt to just add a -SNAPSHOT at the end?

That worked, thanks!


Refactor the code to make it maintainable

Also implement context library and make every hardcodes parameter configurable via Yaml file

Refactor with Repository pattern


UHD 4K READY? (webpack4)

on the road for webpack 4?

I haven’t had a chance to try it out yet.
Are there any issues?

Webpack 4 Error:
ERROR 71559 nodejs.unhandledExceptionError: Plugin could not be registered at 'compile'. Hook was not found.
BREAKING CHANGE: There need to exist a hook at 'this.hooks'. To create a compatiblity layer for this hook, hook into 'this._pluginCompat'.
BREAKING CHANGE: There need to exist a hook at 'this.hooks'. To create a compatiblity layer for this hook, hook into 'this._pluginCompat'.
at MultiCompiler.plugin (egg-vue-webpack-boilerplate/node_modules/webpack/node_modules/tapable/lib/Tapable.js:63:9)
at MultiCompiler.deprecated [as plugin] (internal/util.js:52:15)
at webpackHotMiddleware (egg-vue-webpack-boilerplate/node_modules/webpack-hot-middleware/middleware.js)

Just upgraded to webpack 4, no errors, but: Webpack-hot-middleware is using forever to build and update the browser to changes in the code. It uses the same amount of time as if I would just run "webpack" the normal way

Plugins should use Compiler.hooks.xxx.tap(, fn) now

So you must change yours:
    latestStats = null;
    if (opts.log) opts.log("webpack building...");
    eventStream.publish({action: "building"});
  });
  compiler.plugin("done", function(statsResult) {
    // Keep hold of latest stats so they can be propagated to new clients
    latestStats = statsResult;
    publishStats("built", latestStats, eventStream, opts.log);
  });

    latestStats = null;
    if (opts.log) opts.log("webpack building...");
    eventStream.publish({action: "building"});
  });

Looks like there is a guide here: https://medium.com/webpack/webpack-4-migration-guide-for-plugins-loaders-20a79b927202
Haven’t read it yet, but I want to maintain compatibility with <4 and >4 at the same time.

if (options.compiler.hooks) {
        options.compiler.hooks.done.tap('WebpackServe', done);
      } else {
        options.compiler.plugin('done', done);
      }

Looks good, will aim to update later today, unless someone beats me to it with a PR

Thx

I've just pushed ae79f6a to master which I've released as v2.21.1 onto npm.
This supports the old plugin API as well as the new one.
While testing this I seem to have uncovered a bug in build time reporting: https://github.com/webpack/webpack/issues/6625
This might be why other people above have been reporting build times being the same. Testing using the example/ folder in this repo seems to show hot reloading working correctly.
I'm going to leave this issue open for now in case other issues or reports emerge.

Oh, and you will still see a warning from webpack-dev-middleware until that gets upgraded.
Slightly annoyingly they've decided to go to v3 for the fix and break back-compat with older webpacks. Oh well.

i has the same question: the hot build(90s) takes almost as long as the first build(138s).
@koiski , have you solved the problem?

@weixiaohuster I found a workaround using HardSourceWebpackPlugin.

good idea! @koiski
I tried it, but it didn't work as well, the hot build time reduced from 90s to 60s.
what about you?

Mine is down to about 5s now. Remember to check what source-map you are using when you are building in dev mode

optimization: {     splitChunks: {       cacheGroups: {         default: true,       }     }   },
and
config.devtool = 'cheap-module-eval-source-map';
Helped to get my hot build time to 2s


feat: update Tanstack Router generator and examples with latest changes

Newer versions of Tanstack Router have some breaking changes to the package and API names.

@tanstack/react-router@beta has been changed to @tanstack/router@beta - docs
ReactRouter has been changed to Router - docs

This PR updates the generator code for both changes as well as the example for Tanstack router.

Released at v1.15.1


0.0

i am just curious if you got one :D

n
This script is neither efficient nor profitable.
Have a good day.


local-ai: 2.16.0 -> 2.17.1

Description of changes
update local-ai to latest version
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

It builds both with and without cuda support. Didn't fix my issue https://github.com/NixOS/nixpkgs/issues/320145 but I have no idea how to fix that or if it's even related so feel free to merge

Thanks for testing. I have no cuda device, therefor I can only try to guess. But I will have a look.

Hey :wave: LocalAI author here - it might be needed to set CUDA_LIBPATH to point to the CUDA libpath in order to have libcuda.so linked properly. (I'm not a NixOS user so I can't test this, but probably can help @ck3d debugging it if interested in having help!)

Thanks for the hint.
I tested this version with cuda on a GTX 1080 and I had no issue. So I am not sure what the reason could be.


chore: bdd-spring-1578164019 to 0.0.1

chore: Promote bdd-spring-1578164019 to version 0.0.1

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


CRUD

Hey guys,
im having some major issue with updating data. Can create, display data, delete , but when im using update   only first property of any document is updated.
any suggestion?
tnx

@batosai85 which data?

@batosai85 Any update here?

Not so far, same problem , can't update any data

Can you elaborate on what you mean by can't update any data? Are you getting any error messages? What code are you using to try to update data? What version of meanjs are you running? Any steps you can give us to reproduce the issue?

It is latest version of MEAN. It is code similiar like one  in articles folder, with some more form fields. Everything is  working except that  i  can't update data via put verb(can create, delete, read). No error in console so far.  I will try to do it from scratch again , and will let you know what happend.

@batosai85 please let us know how it ended up. whether you found a fix/solution or noticed a really problem with the framework.
For now I'm closing but you're welcome to re-open if you see fit.


Derivation crashes compiler on 2.12

Reported by @contagnas here.
package example

import io.circe.Encoder, io.circe.generic.auto._

trait Base
case object X extends Base

object Base {
  case class Wrapper[E: Encoder](v: E)

  implicit val encodeBase: Encoder[Base] = Encoder.instance[Base] {
    case X => Encoder[Wrapper[X.type]].apply(Wrapper(X))
  }
}

The error looks like this:
[warn] /Users/travisbrown/tmp/circe/src/main/scala/test/example.scala:12:22: match may not be exhaustive.
[warn] It would fail on the following input: X
[warn]     case X => Encoder[Wrapper[X.type]].apply(Wrapper(X))
[warn]                      ^
[error] ## Exception when compiling 1 sources to /Users/travisbrown/tmp/circe/target/scala-2.12/classes
[error] Could not find proxy for val pat$macro$8: example.X.type in List(value pat$macro$8, method from, class anon$macro$9, value $anonfun, value encodeBase, object Base, package example, package <root>) (currentOwner= method to )
[error] scala.tools.nsc.transform.LambdaLift$LambdaLifter.searchIn$1(LambdaLift.scala:316)
[error] scala.tools.nsc.transform.LambdaLift$LambdaLifter.$anonfun$proxy$4(LambdaLift.scala:321)
...

It compiles fine on 2.13, or if you use semiautomatic derivation for Wrapper.
I'm unlikely to have time to look at this, since there are lots of reasonable workarounds and since it's fixed in 2.13, but if someone else wants to that'd be great.

Closing in cleanup run, If anyone cares about this, please comment and I'll reopen.


Update sbt-http4s-org to 0.6.0

Updates org.http4s:sbt-http4s-org from 0.4.1 to 0.6.0.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.http4s", artifactId = "sbt-http4s-org" } ]

labels: sbt-plugin-update, semver-minor

#3980


Add Nation Makers to partners and credit on maker map

fixes #752

Send the logo through tinypng.com and save 58KB

I don't know you @drwestco but I like you.


.osm endpoint returning different data

Investigate why the .osm endpoint is returning different data each time a request is made. This is happening on meteor_v4 form of the Tanzania instance.

Checked the data in two osm exports and the number of nodes, ways and relations exported are the same, although the ids of the elements are different.
Maybe we have a bug in the rewriteNegativeId and rewriteNegativeRef functions that is causing a error: https://github.com/hotosm/OpenMapKitServer/blob/master/api/odk/osm/aggregate-osm.js#L149


Fix leaking order data for unauthorized user

Require permission manage_orders for most of the order fields.

Impact

[ ] New migrations
[ ] New/Updated API fields or mutations
[ ] Deprecated API fields or mutations
[ ] Removed API types, fields, or mutations
[ ] Documentation needs to be updated

Pull Request Checklist

[ ] Privileged queries and mutations are guarded by proper permission checks
[ ] Database queries are optimized and the number of queries is constant
[ ] Database migration files are up to date
[ ] The changes are tested
[ ] GraphQL schema and type definitions are up to date
[ ] Changes are mentioned in the changelog

Task linked: SALEOR-5784 Leaking order data for unauthorized user

Pleas take a look at the failing tests: https://github.com/saleor/saleor/runs/5042008158?check_suite_focus=true

It wasn't marked as ready to review yet.

New PR: https://github.com/saleor/saleor/pull/9128


chore(docs): update table of contents and links in readme

:tada: This PR is included in version 1.6.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Updated kOps to 1.27

Issue #, if available:
Description of changes:

Bumped kOps to 1.27, which worked for Kubernetes 1.23+
Added conditional because it was mad about an empty patches directory. We should keep the directory and logic related to it in case we need to patch kOps again in the future.
0002-Don-t-set-CSIMigrationAWS-for-k8s-1.27.patch is removed because the commit it is cherry-picked from is included by upstream in this release.
0001-remove-hardcoded-requierment-on-flannel-plugin.patch was also removed because they were supposed to removed flannel in 1.27 and the code that this patch modifies has significantly changed in this release. But It is less clear if kOps did actually remove flannel like that had planned. We should know once we use this kOps version for running jobs.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/approve

/lgtm


fix: make sure the imageUri exists before using

Codecov Report

Merging #282 (c6dc37b) into develop (f459278) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #282   +/-   ##
========================================
  Coverage    33.09%   33.09%
========================================
  Files           49       49
  Lines         4804     4804
========================================
  Hits          1590     1590
  Misses        3063     3063
  Partials       151      151

Flag
Coverage Δ

unittests
33.09% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f459278...c6dc37b. Read the comment docs.


Implement new workflow for self-guided account creation via Open Banking API

Link to feature: https://mifos.productboard.com/feature-board/planning/features/4700138


fix(mempool): fix nonce incremental

This change is

Codecov Report
Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 83.10%. Comparing base (ab3a562) to head (06e3c21).

Files
Patch %
Lines

crates/mempool/src/mempool.rs
0.00%
1 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #509      +/-   ##
==========================================
+ Coverage   82.92%   83.10%   +0.18%
==========================================
  Files          37       37
  Lines        1786     1782       -4
  Branches     1786     1782       -4
==========================================
  Hits         1481     1481
+ Misses        228      224       -4
  Partials       77       77

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


JavaScript syntax not working as expected

VSCode Version: 1.2.1
OS Version: Mac OS X 10.11.5

Steps to Reproduce:

Paste some JavaScript code (I used this one: https://github.com/wbkd/d3-extended/blob/master/d3-extended.js);
Check highlight errors;

The theme I'm using is Monokai.

Can you describe what you are expecting?

@aeschli, I want highlighted:

console.log;
prototype.addClass;
document.createElement;
parentNode;
insertBefore;
etc.

Just compare the JS file you find at: https://github.com/wbkd/d3-extended/blob/master/d3-extended.js

This is from SublimeText:

This one is from Atom:

I hope this helps   :-)

Ok, what you want is highlighting for references of variables and functions.
Duplicate of https://github.com/Microsoft/TypeScript-TmLanguage/issues/149

document.createElement is something built-in in JS (it's DOM programming), not custom code, anyway

It depends if you are in a browser or nodejs environment. But yes, I see what you mean. it's colorizing for standard library functions.

@aeschli Of course, yes. In this case, since d3.js is a client library (it deals with SVG), it's client code


.Net Core

Is it possible to compile this targeting .Net Core instead of .Net Framework?
Tom

Have you tried compiling it against .Net Core?  What libraries were used, but not available?

+1 I need to use it in netcore2.0

+1

+1

OwO Net.5

Haha net 6? 7 soon.


Ignore error if not state found

@iamkhalidbashir Hello, would it be possible to run the command provided by the bot to generate the documentation, so that your PR could be merged ? We really need this.

Hello 👋
Looks like you've added built files; I'm afraid we cannot close this with these files included.
I'll review this once that is fixed 👍

Closing this due to:

the inclusion of built source
a proper fix for the state issue should eliminate the need for this workaround
lack of response from the original author


Budget Quick Switch not working, console errors

Name of Defective Feature

Budget Quick Switch

System Settings (Required)

ToolKit Version: 2.16.0
Operating System (Mac/Windows/Etc): Mac
Browser (Chrome/Firefox/Safari): Chrome
Browser Version: 78.0.3904.70
Other Extensions: LastPass, Google Tag Assistant, JSON Formatter, aXe

Export of Toolkit Settings (Bottom Left of Settings Page)

Settings Export
[{"key":"AccountsDisplayDensity","value":"0"},{"key":"AccountsEmphasizedOutflows","value":false},{"key":"AccountsStripedRows","value":false},{"key":"AutoDistributeSplits","value":false},{"key":"AutomaticallyMarkAsCleared","value":false},{"key":"BetterScrollbars","value":"0"},{"key":"BudgetCategoryFeatures","value":true},{"key":"BudgetProgressBars","value":"0"},{"key":"BudgetQuickSwitch","value":true},{"key":"BudgetSpendingGoal","value":false},{"key":"BulkManagePayees","value":false},{"key":"CalendarFirstDay","value":"0"},{"key":"CategoryActivityCopy","value":false},{"key":"CategoryActivityPopupWidth","value":"0"},{"key":"ChangeEnterBehavior","value":false},{"key":"ChangeMemoEnterBehavior","value":false},{"key":"CheckCreditBalances","value":false},{"key":"CheckNumbers","value":false},{"key":"ClearSelection","value":false},{"key":"CollapseSideMenu","value":false},{"key":"ColourBlindMode","value":false},{"key":"CompactIncomeVsExpense","value":false},{"key":"CreditCardEmoji","value":true},{"key":"CurrentMonthIndicator","value":true},{"key":"CustomFlagNames","value":false},{"key":"DaysOfBuffering","value":true},{"key":"DaysOfBufferingHistoryLookup","value":"0"},{"key":"DeselectTransactionsOnSave","value":false},{"key":"DisableToolkit","value":false},{"key":"DisplayTargetGoalAmount","value":"0"},{"key":"DisplayTotalMonthlyGoals","value":false},{"key":"DisplayUpcomingAmount","value":false},{"key":"EasyTransactionApproval","value":false},{"key":"EditAccountButton","value":"0"},{"key":"EnlargeCategoriesDropdown","value":true},{"key":"EnterToMove","value":false},{"key":"FilterCategories","value":true},{"key":"GoalIndicator","value":false},{"key":"GoalWarningColor","value":false},{"key":"GoogleFontsSelector","value":"0"},{"key":"HideAccountBalancesType","value":"0"},{"key":"HideAgeOfMoney","value":false},{"key":"HideClosedAccounts","value":false},{"key":"HideHelp","value":false},{"key":"HideReferralBanner","value":true},{"key":"HideTotalAvailable","value":false},{"key":"HighlightNegatives","value":false},{"key":"ImportNotification","value":"0"},{"key":"IncomeFromLastMonth","value":"0"},{"key":"IncomeVsExpenseHoverHighlight","value":true},{"key":"LargerClickableIcons","value":false},{"key":"LinkToInflows","value":false},{"key":"MonthlyNotesPopupWidth","value":"0"},{"key":"NavDisplayDensity","value":"0"},{"key":"POSStyleCurrencyEntryMode","value":false},{"key":"Pacing","value":"0"},{"key":"PrintingImprovements","value":true},{"key":"PrivacyMode","value":"0"},{"key":"QuickBudgetWarning","value":false},{"key":"ReconciledTextColor","value":"0"},{"key":"RemovePositiveHighlight","value":false},{"key":"RemoveZeroCategories","value":false},{"key":"ResizeInspector","value":false},{"key":"ResizeSidebar","value":false},{"key":"RightClickToEdit","value":true},{"key":"RowHeight","value":"0"},{"key":"RowsHeight","value":"0"},{"key":"RunningBalance","value":"0"},{"key":"SeamlessBudgetHeader","value":false},{"key":"SetMultipleFlags","value":false},{"key":"ShowCategoryBalance","value":false},{"key":"SpareChange","value":false},{"key":"SplitTransactionAutoAdjust","value":false},{"key":"SquareNegativeMode","value":false},{"key":"StealingFromFuture","value":false},{"key":"SwapClearedFlagged","value":false},{"key":"TargetBalanceWarning","value":false},{"key":"ToBeBudgetedWarning","value":false},{"key":"ToggleMasterCategories","value":false},{"key":"ToggleSplits","value":false},{"key":"ToggleTransactionFilters","value":"0"},{"key":"ToolkitReports","value":true},{"key":"TransactionGridFeatures","value":true},{"key":"ViewZeroAsEmpty","value":false},{"key":"l10n","value":"0"}]

Steps to Reproduce the Behavior

Open YNAB.
Click budget name in top left to launch menu.
Click on another budget in the Budget Quick Switch menu.

Expected Behavior

Clicking other budget should load other budget.
Actual Behavior

Nothing happens. There are errors in the console.
Message:  Nothing handled the action 'openBudget'.
Might be fixed by https://github.com/toolkit-for-ynab/toolkit-for-ynab/pull/1695

I am experiencing the same issue but not seeing errors, juse selecting the quick budget switch does nothing. I have to use the built in open budget selection.

This is a known problem. Just trying to find the time for someone to fix it. Hopefully it won't be too much longer.

I submitted a PR, not sure if it's the best way to fix it, but it works for me #1695

Still not working for me.  No error just doesn't switch.

Hey @firstladymb the fix for this should be in our current release! If you notice the issue still exists and you're definitely running the newest version of the toolkit, please reopen! Thanks!
Please note, all browser can take up to an hour to provide updates to all users. You can force an update if it's available for you by going to chrome://extensions and clicking the "Update" button. Firefox users can go to about:addons, click the setting cog, and click "Check for updates...".

Thanks! LGTM, @joshmadewell!


Error thrown from parser gem when running rubocop

Expected behavior
To not to throw any error but show warning or style errors if any
Actual behavior
Throws an error and is not able to continue to check for style problems
Steps to reproduce the problem
Any addition of code to one my model files in Rails is throwing an error
When I run bundle exec rubocop -a --fail-level E
I get
91 files inspected, 402 offenses detected, 21 offenses corrected
comparison of Parser::Source::Range with Parser::Source::Range failed
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/parser-<IP_ADDRESS>/lib/parser/source/tree_rewriter/action.rb:38:in `sort_by'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/parser-<IP_ADDRESS>/lib/parser/source/tree_rewriter/action.rb:38:in `ordered_replacements'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/parser-<IP_ADDRESS>/lib/parser/source/tree_rewriter.rb:191:in `process'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/cop/corrector.rb:68:in `rewrite'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/cop/team.rb:126:in `autocorrect_all_cops'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/cop/team.rb:70:in `autocorrect'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/cop/team.rb:98:in `block in offenses'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/cop/team.rb:115:in `investigate'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/cop/team.rb:94:in `offenses'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/cop/team.rb:44:in `inspect_file'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/runner.rb:265:in `inspect_file'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/runner.rb:212:in `block in do_inspection_loop'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/runner.rb:244:in `block in iterate_until_no_changes'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/runner.rb:237:in `loop'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/runner.rb:237:in `iterate_until_no_changes'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/runner.rb:208:in `do_inspection_loop'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/runner.rb:111:in `block in file_offenses'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/runner.rb:129:in `file_offense_cache'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/runner.rb:109:in `file_offenses'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/runner.rb:100:in `process_file'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/runner.rb:78:in `block in each_inspected_file'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/runner.rb:75:in `each'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/runner.rb:75:in `reduce'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/runner.rb:75:in `each_inspected_file'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/runner.rb:67:in `inspect_files'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/runner.rb:39:in `run'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/cli.rb:160:in `execute_runner'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/cli.rb:88:in `execute_runners'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/lib/rubocop/cli.rb:41:in `run'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/exe/rubocop:13:in `block in <top (required)>'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/rubocop-0.57.1/exe/rubocop:12:in `<top (required)>'
/Users/piktochart/.rbenv/versions/2.4.2/bin/rubocop:23:in `load'
/Users/piktochart/.rbenv/versions/2.4.2/bin/rubocop:23:in `<top (required)>'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/cli/exec.rb:74:in `load'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/cli/exec.rb:28:in `run'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/cli.rb:424:in `exec'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/cli.rb:27:in `dispatch'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/cli.rb:18:in `start'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/exe/bundle:30:in `block in <top (required)>'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/Users/piktochart/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/bundler-1.16.2/exe/bundle:22:in `<top (required)>'
/Users/piktochart/.rbenv/versions/2.4.2/bin/bundle:23:in `load'
/Users/piktochart/.rbenv/versions/2.4.2/bin/bundle:23:in `<main>'

RuboCop version
$ rubocop -V
0.57.1 (using Parser <IP_ADDRESS>, running on ruby 2.4.2 x86_64-darwin17)

Same here with:
$ rubocop -V
0.57.2 (using Parser <IP_ADDRESS>, running on ruby 2.4.4 x86_64-linux)

I've found that this error occurs when both the first and last lines of the target file are empty/blank.
$ ls -a
.  ..  sample.rb
$ cat sample.rb

puts 'foo'

$ rubocop -a -d sample.rb
For /tmp/tes: configuration from ~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/config/default.yml
Inheriting configuration from ~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/config/enabled.yml
Inheriting configuration from ~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/config/disabled.yml
Inspecting 1 file
Scanning /tmp/tes/sample.rb

0 files inspected, no offenses detected
comparison of Parser::Source::Range with Parser::Source::Range failed
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/parser-<IP_ADDRESS>/lib/parser/source/tree_rewriter/action.rb:38:in `sort_by'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/parser-<IP_ADDRESS>/lib/parser/source/tree_rewriter/action.rb:38:in `ordered_replacements'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/parser-<IP_ADDRESS>/lib/parser/source/tree_rewriter.rb:191:in `process'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/cop/corrector.rb:68:in `rewrite'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/cop/team.rb:126:in `autocorrect_all_cops'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/cop/team.rb:70:in `autocorrect'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/cop/team.rb:98:in `block in offenses'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/cop/team.rb:115:in `investigate'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/cop/team.rb:94:in `offenses'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/cop/team.rb:44:in `inspect_file'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/runner.rb:265:in `inspect_file'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/runner.rb:212:in `block in do_inspection_loop'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/runner.rb:244:in `block in iterate_until_no_changes'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/runner.rb:237:in `loop'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/runner.rb:237:in `iterate_until_no_changes'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/runner.rb:208:in `do_inspection_loop'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/runner.rb:111:in `block in file_offenses'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/runner.rb:129:in `file_offense_cache'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/runner.rb:109:in `file_offenses'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/runner.rb:100:in `process_file'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/runner.rb:78:in `block in each_inspected_file'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/runner.rb:75:in `each'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/runner.rb:75:in `reduce'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/runner.rb:75:in `each_inspected_file'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/runner.rb:67:in `inspect_files'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/runner.rb:39:in `run'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/cli.rb:160:in `execute_runner'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/cli.rb:88:in `execute_runners'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/lib/rubocop/cli.rb:41:in `run'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/exe/rubocop:13:in `block in <top (required)>'
~/.rbenv/versions/2.4.4/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
~/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/rubocop-0.57.2/exe/rubocop:12:in `<top (required)>'
~/.rbenv/versions/2.4.4/bin/rubocop:23:in `load'
~/.rbenv/versions/2.4.4/bin/rubocop:23:in `<main>'

thank you! Removing the empty line at the top fixed this issue for me.

I can't reproduce this on current master, with the default configuration. Could you please post your .rubocop.yml as well?

I can reproduce with current master and default configuration:
$ git clone https://github.com/rubocop-hq/rubocop
$ cd rubocop
~/rubocop$ bundle install
~/rubocop$ echo \nclass T\nend\n\n > test.rb
~/rubocop$ bundle exec ./exe/rubocop --debug  --force-default-config --auto-correct test.rb
Default configuration from /home/user/rubocop/config/default.yml
Inheriting configuration from /home/user/rubocop/config/enabled.yml
Inheriting configuration from /home/user/rubocop/config/disabled.yml
Inspecting 1 file
Scanning /home/user/rubocop/test.rb

0 files inspected, no offenses detected
comparison of Parser::Source::Range with Parser::Source::Range failed
/q/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/parser-<IP_ADDRESS>/lib/parser/source/tree_rewriter/action.rb:38:in `sort_by'
/q/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/parser-<IP_ADDRESS>/lib/parser/source/tree_rewriter/action.rb:38:in `ordered_replacements'
/q/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/parser-<IP_ADDRESS>/lib/parser/source/tree_rewriter.rb:191:in `process'
/home/user/rubocop/lib/rubocop/cop/corrector.rb:68:in `rewrite'
/home/user/rubocop/lib/rubocop/cop/team.rb:126:in `autocorrect_all_cops'
/home/user/rubocop/lib/rubocop/cop/team.rb:70:in `autocorrect'
/home/user/rubocop/lib/rubocop/cop/team.rb:98:in `block in offenses'
/home/user/rubocop/lib/rubocop/cop/team.rb:115:in `investigate'
/home/user/rubocop/lib/rubocop/cop/team.rb:94:in `offenses'
/home/user/rubocop/lib/rubocop/cop/team.rb:44:in `inspect_file'
/home/user/rubocop/lib/rubocop/runner.rb:265:in `inspect_file'
/home/user/rubocop/lib/rubocop/runner.rb:212:in `block in do_inspection_loop'
/home/user/rubocop/lib/rubocop/runner.rb:244:in `block in iterate_until_no_changes'
/home/user/rubocop/lib/rubocop/runner.rb:237:in `loop'
/home/user/rubocop/lib/rubocop/runner.rb:237:in `iterate_until_no_changes'
/home/user/rubocop/lib/rubocop/runner.rb:208:in `do_inspection_loop'
/home/user/rubocop/lib/rubocop/runner.rb:111:in `block in file_offenses'
/home/user/rubocop/lib/rubocop/runner.rb:129:in `file_offense_cache'
/home/user/rubocop/lib/rubocop/runner.rb:109:in `file_offenses'
/home/user/rubocop/lib/rubocop/runner.rb:100:in `process_file'
/home/user/rubocop/lib/rubocop/runner.rb:78:in `block in each_inspected_file'
/home/user/rubocop/lib/rubocop/runner.rb:75:in `each'
/home/user/rubocop/lib/rubocop/runner.rb:75:in `reduce'
/home/user/rubocop/lib/rubocop/runner.rb:75:in `each_inspected_file'
/home/user/rubocop/lib/rubocop/runner.rb:67:in `inspect_files'
/home/user/rubocop/lib/rubocop/runner.rb:39:in `run'
/home/user/rubocop/lib/rubocop/cli.rb:160:in `execute_runner'
/home/user/rubocop/lib/rubocop/cli.rb:88:in `execute_runners'
/home/user/rubocop/lib/rubocop/cli.rb:41:in `run'
/home/user/rubocop/exe/rubocop:13:in `block in <top (required)>'
/q/rbenv/versions/2.4.1/lib/ruby/2.4.0/benchmark.rb:308:in `realtime'
/home/user/rubocop/exe/rubocop:12:in `<top (required)>'
/q/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli/exec.rb:74:in `load'
/q/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli/exec.rb:74:in `kernel_load'
/q/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli/exec.rb:27:in `run'
/q/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli.rb:362:in `exec'
/q/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/q/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/q/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/q/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli.rb:22:in `dispatch'
/q/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/q/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/cli.rb:13:in `start'
/q/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/exe/bundle:30:in `block in <top (required)>'
/q/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/q/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/exe/bundle:22:in `<top (required)>'
/q/rbenv/versions/2.4.1/bin/bundle:22:in `load'
/q/rbenv/versions/2.4.1/bin/bundle:22:in `<main>'```

Thanks for the feedback. I confirmed this reproduction.
Although this is an assumption, it may be that some kind of conflict is occurring by auto-correct of Layout/LeadingBlankLines cop and Layout/TrailingBlankLines cop 🤔 It is because there is no problem with auto-corrected by individually cop.

Looks like error is produced only if Layout/LeadingBlankLines is the first cop to make modifications.
For example:

# (blank line above this comment)
# frozen_string_literal: true
def bar(arg =1); end

also triggers the error with default config, but with comments first offence to be fixed is Style/FrozenStringLiteralComment and then Layout/LeadingBlankLines works fine.
Trying to debug.

Found the culprit, Layout/LeadingBlankLines constructed Parser::Source::Range from raw_source instead of buffer which caused comparison error (Parser::Source::Range checks the other to be on the same buffer).
PR is in progress, tests for this are going to take more time than actual fix.


downgrade spec

why target 9.0
im try downgrade target 8.0 in my project and work CMIIW

Thank you for your Pull requests

u welcome


react-native prototype

So far I've been having issues getting react-native and osm-p2p working together.
The challenge is getting react-native to run node modules.
Here are some things I've tried:

rn-nodeify – I believe I did everything correctly, but it still didn't recognize modules and global variables that should have been caught by the shim.js file. This also takes an approach that seems inappropriate: rewriting package.json files of dependencies.
ReactNativify – this is documentation of an approach one can take to transform source files to rewrite import statements to point to the desired dependencies. But it looks like this approach doesn't work as expected with latest react-native, v0.43: https://github.com/mhzed/react-native-sm-transformer/issues/2
haul – haul is a command-line tool that replaces react-native's built-in packager. It was promising, but still gave a mysterious TypeError that traced to the messages.js file in hyperlog.

react-native doesn't support indexeddb, but that should be solved with the react-native-level module: https://github.com/developmentseed/field-data-collection/blob/master/prototypes/react-native/FieldDataCollection/lib/osm-p2p.js

I seem to have gotten slightly further along with https://github.com/mojodna/surveyor-prototype
In order for it to pick up node_modules, I had to restart the packager. Next was that hyperlog and other dependencies require "core" Node libraries, so I had to install browser polyfills (see package.json) and manually patch some files in node_modules according to what I ran into.
The last error I ran into was:
error: bundling: UnableToResolveError: Unable to resolve module `stream` from `/Users/seth/src/mojodna/Surveyor/node_modules/level-logs/node_modules/from2/node_modules/readable-stream/readable.js`: Module does not exist in the module map or in these directories:
  /Users/seth/src/mojodna/Surveyor/node_modules/level-logs/node_modules/from2/node_modules
,   /Users/seth/src/mojodna/Surveyor/node_modules/level-logs/node_modules
,   /Users/seth/src/mojodna/Surveyor/node_modules

FTR, node_modules/hyperlog/lib/messages.js looks like this after I patched it:
var protobuf = require('protocol-buffers')
var fs = require('browserify-fs')
var path = require('path-browserify')

module.exports = protobuf(fs.readFileSync(path.join(__dirname, '..', 'schema.proto'), 'utf-8'))

IIRC, there's a way to configure Webpack to provide alternative versions of dependencies when imported or required, possibly https://webpack.js.org/plugins/normal-module-replacement-plugin/ or https://webpack.js.org/configuration/resolve/ (better).
Related:

https://github.com/facebook/react-native/issues/1871
https://github.com/facebook/react-native/issues/6253
https://www.npmjs.com/package/node-libs-browser
https://github.com/mvayngrib/react-native-node-libs

osm-p2p, etc. are all built to target browsers using browserify, so to wedge them into a React Native app, we'll either need to incorporate browserify into RN's packager or figure out how to achieve similar results. Haul uses Webpack, which seems promising.

After mojodna/surveyor-prototype@8f33146, it gets much further along, but RN now bails with:
SyntaxError: Unexpected token '>' (http://localhost:8081/index.android.bundle?platform-android&dev=true&hot=false&minify=false:3263

Vaguely relevant: https://github.com/pouchdb/pouchdb/issues/3787

The source of the "unexpected token" error is asyncstorage-down, which ships with arrow functions. Haul does not transcode node_modules, per https://github.com/callstack-io/haul/blob/master/README.md#limitations, unlike react-native-cli's packager, so a workaround was to manually use babel to replace them (after removing encoding.js, which isn't in git and was probably included by accident). Longer-term, we can probably use the babel webpack loader to do this for us.

With that addressed, I'm back to TypeError: undefined is not an object (evaluating 'this.idb.open')..., which means that something is trying to use IndexedDB (node_modules/idbwrapper/idbstore.js).

...which is not from osm-p2p at all, but rather from browserify-fs, which was configured as the fs shim that hyperlog needed, so we've gone full circle and could probably use osm-p2p (not osm-p2p-db) directly, since it'd be using the same abstraction layer.

react-native-level-fs wraps https://www.npmjs.com/package/level-filesystem, which only implements the async methods in fs, so hyperlog/lib/messages.js doesn't work:
module.exports = protobuf(fs.readFileSync(path.join(__dirname, '..', 'schema.proto'), 'utf-8'))

Inlining it (which is what brfs would be doing if we were using browserify; there's probably a similar way to do this with Webpack (https://github.com/webpack-contrib/transform-loader)) potentially eliminates any uses of fs and allows us to keep going...
module.exports = protobuf('message Node {\n  required uint32 change   = 1;\n  required string key      = 2;\n  required string log      = 3;\n  optional uint32 seq      = 4;\n  optional bytes identity  = 7;\n  optional bytes signature = 8;\n  required bytes value     = 5;\n  repeated string links    = 6;\n}\n\nmessage Entry {\n  required uint32 change = 1;\n  required string node   = 2;\n  repeated string links  = 3;\n  optional string log = 4;\n  optional uint32 seq = 5;\n}\n\nmessage Log {\n  required string log = 1;\n  required uint32 seq = 2;\n}\n\nmessage Handshake {\n  required uint32 version = 1;\n  optional string mode    = 2 [default = "sync"];\n  optional bytes metadata = 3;\n  optional bool live      = 4;\n}');

And now, after mojodna/surveyor-prototype@a88d632, we have a non-build-related error:
secure random number generation not supported by this browser
use chrome, FireFox, or Internet Explorer 11

There's a react-native variant of randombytes (responsible for that error), but installing it is a little tricky: https://www.npmjs.com/package/react-native-randombytes
Sidenote: why am I spending so much time on this? @gmaclennan and I are (I think) convinced that React Native is a better path than Cordova, etc, and this represents a pretty fundamental challenge that we need to overcome in order to be successful (and is likely to be a similar problem within the Cordova world).

GitHub link to that: https://github.com/mvayngrib/react-native-randombytes

This simplifies the installation process:
yard add react-native-randombytes
react-native-link react-native-randombytes

but I still end up with:
Object is not a function (evaluating 'randomBytes(8)')

(which I thought was a result of react-native-randombytes needing to be transpiled, but apparently not.)

From deep in the weeds: osm-p2p / leveldb is probably going to native filesystem access to have decent performance, so we'll likely need to see whether / how to expose native FS functions (or native leveldb).


clansfolk, dropforge (logical-conflict)

This pull request was generated by the 'mq' tool

/trunk merge