text:
chore: Move tests to GitHub Actions

Summary

Created 2 workflows

run-tests: Runs eslint, prettier, unit tests
run-visual-regression: Runs visual regression tests

Ps. Not removing the above from the CircleCI config as they are required for publishing releases.

@manosim this is dope! Let me know if there's anything I can help with :+1:

authors: andyrichardson manosim

repo: FormidableLabs/urql-devtools


text:
correct path for react-native-xcode

Fixes the error reported here: https://github.com/FormidableLabs/victory-native/issues/216

I was going through a full upgrade to harmonize the versions per Carlos' instructions. Do you want us to do that instead?

@ryan-roemer whichever you prefer

Let me see if I can hack it out tomorrow and we'll touch base then...

source: gharchive/pull-request

authors: boygirl ryan-roemer

repo: FormidableLabs/victory-native

license: MIT

license_type: permissive

license_source: github-api


text:
Update locale parameter to be an optional parameter

Fix #14

Scrutinizer score got worst, need to fix this before accepting the fix.

repo: FrDeamon/logger-extra-bundle

license: mit

license_source: bigquery


text:
SLDPRT Files for Mainboard Case

I suppose this is a feature request of sorts, but I work in solidworks and would love to use these solid models natively. Do you have SLDPRT files available? Do you recommend an STL editor? Thanks for your work so far.

Solidworks can natively import these file types. Are you looking for Native Solidworks files (editable?)

Yes. It helps to have the parameterized files.

So that assumes that the parts were originally created in solidworks; the issue with native CAD files is that they are not cross-compatible or backwards compatible. So unless the files were created in the EXACT version of solidworks you were using the original files are no good.

Let me mesh the STL files and create STEP files; this may help you in modifying the files to your liking.

There is a file called "printable_case_full" that will get you what you need as a starting point in Solidworks

the files were created in PTC CREO Parametric 2022; so it is highly unlikely that you will get Native Solidworks files.

Ah yes, actually I found that it did get me a good starting point.
I used an STL I found of the Mainboard somewhere (possibly this repo, though it's been a long time since I've looked at this issue), and it has worked well enough for my needs.
This request is more of a wishlist item than an urgent need.

source: gharchive/issue

authors: GraffJosh joshuakravitz


text:
error after updating to Angular 9

ngx-duration-picker version:  3.3.1
ERROR in node_modules/ngx-duration-picker/lib/duration-picker.component.d.ts:60:21 - error TS2694: Namespace '"/home/chris/Desktop/current/Clients/WebUI9/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
I usually see this type of error because of a package version mismatch with the Angular version.  But  I can't seem to find the correct version for ngx-duration-picker

I have the same problem after upgradeing to angular 10. I cannot use this component anymore. Attached full stacktrace:
An unhandled exception occurred: node_modules/ngx-duration-picker/lib/duration-picker.component.d.ts:60:21 - error TS2694: Namespace '"../node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'
.
60     static ɵfac: i0.ɵɵFactoryDeclaration<DurationPickerComponent, never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-duration-picker/lib/duration-picker.component.d.ts:61:21 - error TS2694: Namespace '"../node_modules/@angular/core/core"' has no exported member 'ɵɵComponentDeclaration'.
61     static ɵcmp: i0.ɵɵComponentDeclaration<DurationPickerComponent, "ngx-duration-picker", never, { "options": "options"; "value": "value"; "disabled": "disabled"; }, { "valueChange": "valueChange"; "customOutput": "customOutp
ut"; }, never, never>;
~~~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-duration-picker/lib/duration-picker.module.d.ts:6:21 - error TS2694: Namespace '"../node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
6     static ɵfac: i0.ɵɵFactoryDeclaration<DurationPickerModule, never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-duration-picker/lib/duration-picker.module.d.ts:7:21 - error TS2694: Namespace '"../node_modules/@angular/core/core"' has no exported member 'ɵɵNgModuleDeclaration'.
7     static ɵmod: i0.ɵɵNgModuleDeclaration<DurationPickerModule, [typeof i1.DurationPickerComponent], [typeof i2.CommonModule, typeof i3.FormsModule], [typeof i1.DurationPickerComponent]>;
~~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-duration-picker/lib/duration-picker.module.d.ts:8:21 - error0m TS2694: Namespace '"../node_modules/@angular/core/core"' has no exported member 'ɵɵInjectorDeclaration'.
8     static ɵinj: i0.ɵɵInjectorDeclaration;

repo: FrancescoBorzi/ngx-duration-picker


text:
Could not get any generated file when I run the command

Hello,
When I run the following command :

flutter pub run svg_to_paint C:\Users\HOME\Downloads\diamond.xml C:\Users\HOME\Downloads\ icon absolute

I get :
Modules installed...
Files Generated...
Files Created...
But no file is created in the given directory.
Could you tell more how to proceed ? I may miss something
Regards

I have the same problem. How can I solve it？

its music score svg file

@FrancescoCatani Same behaviour with following close.xml file:
<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"
    android:viewportWidth="16"
    android:viewportHeight="16"
    android:width="16dp"
    android:height="16dp">
    <group
        android:translateX="-60"
        android:translateY="-518">
        <group
            android:translateX="19"
            android:translateY="-242">
            <path
                android:pathData="M45 764l1 0c0.01037 -0.00012 0.02079 -0.00046 0.03125 0 0.254951 0.0112 0.50987 0.12858 0.6875 0.3125L49 766.59375 51.3125 764.3125C51.578125 764.082 51.759172 764.007 52 764l1 0 0 1c0 0.28647 -0.03434 0.55065 -0.25 0.75l-2.28125 2.28125 2.25 2.25C52.906938 770.46942 52.999992 770.7347 53 771l0 1 -1 0c-0.265301 -0.00001 -0.530586 -0.0931 -0.71875 -0.28125L49 769.4375 46.71875 771.71875C46.530586 771.90694 46.26529 772 46 772l-1 0 0 -1c-0.000003 -0.26529 0.09306 -0.53058 0.28125 -0.71875l2.28125 -2.25L45.28125 765.75C45.070508 765.55537 44.97809 765.28075 45 765l0 -1z"
                android:fillColor="#BEBEBE" />
        </group>
    </group>
</vector>

authors: prateekmedia saidkacem yk81708090


text:
🛑 Certificados Humanidades is down

In e9e2f01, Certificados Humanidades (https://certificadosfhu.unse.edu.ar) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Certificados Humanidades is back up in 63aa6af.

repo: Francisco-Castillo/certificados


text:
pdf 放大以后怎么进行拖拽可以看到被的内容

可以把vue-pdf使用的容器改成绝对定位（absolute），移动容器的位置来平移显示PDF的内容。可以参考以下代码：
https://github.com/georgewei/van-uploader-with-pdfviewer/blob/master/src/components/PdfViewer.vue

可以把vue-pdf使用的容器改成绝对定位（absolute），移动容器的位置来平移显示PDF的内容。可以参考以下代码：
https://github.com/georgewei/van-uploader-with-pdfviewer/blob/master/src/components/PdfViewer.vue

authors: georgewei xhjzrq

repo: FranckFreiburger/vue-pdf


text:
fix(core): resolve playlist reading issue

fix(core): resolve playlist reading issue
Resolves playlist reading issue introduced by Twitch breaking change (1st Sept, 2020)
New playlist format changed to
#EXTINF:2.000,
#EXT-X-BYTERANGE:1612288@0
0.ts

New format also contains up to five duplicates for each .ts segment.
fix(core): resolve incorrect VOD trim offsets
Resolves playlist issue introduced by Twitch breaking change (1st Sept, 2020)
In addition to changing the playlist formatting, the .ts segment length is now exactly 10.02 seconds long (verified in Resolve and Premiere). This change has resulted in trimmed clips having an output at completely the wrong position from the source VOD.
Use a constant known length of clips when inserting playlist parts into the playlist.

Fixes #514

Reverting to draft as issues discovered with time offsets, investigating and will resolve shortly.

I think you should be instead parsing the #EXTINF line as TwitchLeecher has done before.
#EXTINF:2.000,
#EXT-X-BYTERANGE:2108044@0
0.ts
#EXTINF:2.000,
#EXT-X-BYTERANGE:2107480@2108044
0.ts
#EXTINF:2.000,
#EXT-X-BYTERANGE:2108232@4215524
0.ts
#EXTINF:2.000,
#EXT-X-BYTERANGE:2108796@6323756
0.ts
#EXTINF:2.000,
#EXT-X-BYTERANGE:2108984@8432552
0.ts

Should add the 2.000 until it doesn't see 0.ts anymore which would result in 10.000. Assuming 10.02 would break clipping at the end of a stream as well, as the end file is likely not 10.02 seconds. Just my 2¢

This change has resulted in trimmed clips having an output at completely the wrong position from the source VOD.

Pretty sure the wrong trimming of clips in your first commit is because you weren't parsing the #EXTINF, and was instead setting the segment length to be line.Length?
So you were settings "1.ts" to be 4 seconds, because it's 4 characters long if I'm not reading this incorrectly. and "10.ts" to be 5 seconds long. Unless I'm completely misreading this.

repo: Franiac/TwitchLeecher


text:
Remove package dependency on descriptor or object pre-fetch

Remove cache dependencies on existing package lookups.

Currently will use sui_getObject for packages that provides basic information:

Disassembled move code
modules in package


text:
First thoughts

https://github.com/FrederikP/sshaws/blob/c65872e44e0e11ba5a038eb1fb8eb03c935097b1/sshaws#L25
This assumes that you have set default region (e.g. in ~/.aws/config file or as AWS_DEFAULT_REGION env variable) or crashes otherwise.
Safer way to get default region (if available) is:
boto3.session.Session().region_name
https://github.com/FrederikP/sshaws/blob/c65872e44e0e11ba5a038eb1fb8eb03c935097b1/sshaws#L63
Some debugging residue ?
https://github.com/FrederikP/sshaws/blob/c65872e44e0e11ba5a038eb1fb8eb03c935097b1/sshaws#L91
I suppose this should be:subprocess.run(command_list) ?

Hi!
Thanks a lot. Looks like I was not very awake when I did the last changes yesterday.
I just changed all of it and verified the command works for me. Can you take a look? (version 0.3.2)
Thanks again

Now works fine, thank you. :)
Nice script btw, I didn't know about ec2-instance-connect api before.

authors: FrederikP agrzegorczyk-leonsoftware

repo: FrederikP/sshaws


text:
Dodger blue bug?

Challenge use-hex-code-to-mix-colors has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

Hello. I'm having issue passing this lesson.
I'm not sure if I'm doing it wrong or it's a bug?
The error is 'Give your h1 element with the text I am dodger blue! the color dodger blue.'
Which I have done but it's not accepting the code.
I would appreciate any help with this.
Thank you very much!

I am red!

I am green!

I am dodger blue!

I am orange!

    ```

@FayeKittie thanks for the issue. This was brought up already in https://github.com/FreeCodeCamp/FreeCodeCamp/issues/10523. Closing this issue as duplicate. Happy coding!

authors: FayeKittie erictleung

repo: FreeCodeCamp/FreeCodeCamp


text:
Test not passing even if code and output are both correct.

Challenge Waypoint: Change Text Inside an Element Using jQuery has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:

jQuery Playground

#left-well

        <button class="btn btn-default target" id="target1">#target1</button>
        <button class="btn btn-default target" id="target2">#target2</button>
        <button class="btn btn-default target" id="target3">#target3</button>

#right-well

        <button class="btn btn-default target" id="target4">#target4</button>
        <button class="btn btn-default target" id="target5">#target5</button>
        <button class="btn btn-default target" id="target6">#target6</button>

press cntrl+enter again.

Closing as not reproducible since this code passes just fine for me. If what @iammangod96 suggested doesn't work you can also try refreshing the page and disabling any browser extensions you have installed.
Thanks and happy coding!

authors: MurtazaSaifee iammangod96 ltegman


text:
You should have four break statements error

Waypoint: Replacing If Else Chains with Switch
The code below should pass but gets blocked since the tests are checking for 4 break statements instead of five.
My code:
function myTest(val) {
  var answer = "";
  // Only change code below this line
  switch(val){
    case "bob":
      answer = "Marley";
      break;
    case 42:
      answer = "The Answer";
      break;
    case 1:
      answer = "There is no #1";
      break;
    case 99:
      answer = "Missed me by this much!";
      break;
    case 7:
      answer = "Ate Nine";
      break;
  }

  // Only change code above this line
  return answer;
}

// Change this value to test
myTest(7);

Test should probably read >= 4.
Technically we don't need the last break.

Test should probably read >= 4.
Technically we don't need the last break.

I'll change it :smile:

I'll change it :smile:

I can't get pass this one: Here is my code:
function chainToSwitch(val) {
var answer = "";
// Only change code below this line
switch (val){
case val ==="bob":
answer="Marley";
break;
   case val === 42:
  answer="The Answer";
  break;

      case val === 1:
  answer="There is no #1";
  break;

      case val === 99:
  answer="Missed me by this much!";
  break;
      case val === 7:
  answer="Ate Nine";

break;
}
// Only change code above this line
return answer;
}
// Change this value to test
chainToSwitch("bob");
Any advice? thanks

@njwda, Please use the Help chat room for getting challenge related help. Happy Coding!

authors: AkiraLaine SaintPeter atjonathan njwda


text:
Potentially confusing wording/example on Portfolio Zipline instructions.

Build a Personal Portfolio Webpage
https://www.freecodecamp.com/challenges/build-a-personal-portfolio-webpage
Issue Description
From my discussion with some members on the new forum here: http://forum.freecodecamp.com/t/portfolio-page-project-framework-usage/3128/, it appears that there is some confusion because the current portfolio example: https://codepen.io/FreeCodeCamp/full/YqLyXB/, appears that it may have been built on top of a template: http://blackrockdigital.github.io/startbootstrap-freelancer/, while the instructions, particularly number 10 (Not listed as one of the rules, by the way.) seems to discourage the use of a template:

There are many great portfolio templates out there, but for this challenge, you'll need to build a portfolio page yourself. Using Bootstrap will make this much easier for you.

The portfolio example does add in a decent amount of customization, so it doesn't look like a complete copy/paste. Perhaps the wording in the instructions should be modified, then?

@Ramon-Carroll I think there is vagueness within the instructions so that the portfolio (and the other more challenging projects) can be your own. You have the freedom to make it however you want. But I guess there could be more clarification.
How might you change the wording to make it more clear?

@erictleung
Hi there, Eric. Well, perhaps we could go with something more like this maybe:
There are many great portfolio templates out there already. However, as an added challenge and learning opportunity, you could consider building the portfolio page yourself. Using Bootstrap can help make this process much easier for you.
Does this work, or is it too explicit?

@Ramon-Carroll I wouldn't want to suggest that "as an added challenge" to do it from the ground up, but rather it is a learning opportunity. Maybe change it to:

There are many great portfolio templates out there already. However, you should consider building your portfolio page as much as you can from the ground up. Using Bootstrap can help make this process much easier for you.

@erictleung That sounds cool too! Most importantly, it's clear. I'm interested in trying my hand at a pull request for this project, but I'm not exactly sure where it is in the source. Do you know where this is located?

@Ramon-Carroll here's the line you need to change.
Please first read the contributing guidelines before taking care of this issue. And feel free to visit the Contributors Help chat room if you have any questions about helping. We're there to help.

@erictleung I understand. Thank you very much.

Oh, and in case I haven't made myself clear, I'm working on this.

authors: Ramon-Carroll erictleung


text:
Waypoint #38 Typo in tasks list

First task goes like this:

Your first radio button on your form should be checked by default.;

That semicolon at the end is bugging me in so many ways.

I will close this one and make a Pull request instead.

repo: FreeCodeCamp/freecodecamp


text:
Host system freezes when target network connectivity is lost.

Hello,
Just wanted to report my findings.  I am running Ubuntu 16.04 x64, and RDP to a Windows 7 desktop for reference.
Whenever there is a loss of connectivity to the target machine, the host machine completely freezes up, forcing me to have to hard shutdown my computer.  It seems there is no safe-disconnect or cancel upon a certain number of reconnect tries on accidental network connectivity loss?
Problem can be easily reproduced by two methods:

On the target Windows device i made a batch script that runs ipconfig /release and ipconfig /renew (to ensure I get connectivity back).  Connect to the target via RDP and run the script.  This will cause the aforementioned problem.  I found this to be reproducible on accident.

I differentiate between two different IP networks, and sometimes have to disable one network to ensure proper network connection to various assets.  Simply disconnecting from the network where I am connected via RDP to a target machine will cause the aforementioned problem.  This one is avoidable but its a habit to just switch network connections before closing the RDP session.

Hope this helps.
Jordan

@JTJackson08 would you please add the version of FreeRDP you are using?

1.1.0-beta1 according to xfreerdp /version.   I have the nightly repo installed and stay updated daily.

still an issue?

Sorry, but I reported this issue in 2016 and am in no position to test if
the issue has been resolved.
Hopefully someone new can continue with this.
On Thu, May 3, 2018 at 7:12 AM akallabeth notifications@github.com wrote:

still an issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/FreeRDP/FreeRDP/issues/3423#issuecomment-386274699,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADSvlr3NKmx76CWxe9bMHyVryxNcj8Adks5tuvRJgaJpZM4I9QVx
.

--
Jordan Jackson

authors: JTJackson08 akallabeth bmiklautz

repo: FreeRDP/FreeRDP


text:
Added TAG macro definition

Fixed TAG undeclared identifier error

wf_mirage.txt
Added TAG macro definition

@freerdp-bot test
@Abhineet-Ayan-Verma could you please put such changes as in #3792 #3793 #3794 into a single pull in the future? Thank you.

@akallabeth - Sure. (I am a newbie in committing and creating pull requests.) You won't get multiple independent similar pull requests from me.

@Abhineet-Ayan-Verma No problem, everybody has to start somewhere, thank you for your contributions anyway ;)

authors: Abhineet-Ayan-Verma akallabeth


text:
Updating AWS.pidx, README and Changelog for the re-release of the CMS…

Updating AWS.pidx, README and Changelog for the re-release of the CMSIS packs due URL change.

When I click the new links I get

All seems well now - approving.

authors: jasonpcarroll manvensh

repo: FreeRTOS/CMSIS-Packs


text:
Version bump

Update kernel version string in file headers and kernel version macros in task.h for version 10.4.1
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

There is a stale commit that made it from a local change, cleaning this and

repo: FreeRTOS/FreeRTOS


text:
Inform users if an entry has a not typical page number

To provide a textual description if an entry has a page number which is not typical for the district. Analyze cases where a district is shown in italics on FreeBMD1.

An italicised District happens when the distSusp flag is set:

This flag can be set when one or more of the following applies:

the District name is misspelt
the District doesn't exist/has been invented
the Volume number doesn't match the expected values for that District and Quarter/Year
the District cited didn't exist during the specified Quarter/Year
the Page number doesn't match the expected values for that District and Quarter/Year

These are the messages currently associated with each of these error conditions:

This information clearly needs to go on the Entry Information page. I suggest we start by implementing that.
At present Districts are italicised in the Results page if their distSusp flag is set. There are three reasons I can think of for reconsidering this approach:

an italicised entry is not accessible, and should be replaced by an accessible way of conveying this information
calculating the distSusp value for each record in the Results page may be computationally expensive, i.e. may slow down the generation of this page. (We will have a better idea about this after implementing support in the Entry Information page.)
two of the queries are not about the District itself, but are instead about volume or page number ranges

Queries about the District, Volume and Page should be added to the appropriate cell in the Entry Information page table.

I've implemented this as a dagger symbol linking to an appropriate footnote below the Entry Information table:

@richardofsussex
Unfortunately, the dagger symbol is not in the list of charactrers that we can safely assume will be announced by screen readers. An image of a dagger, with appropriate alt text would be announced.
See Why Don’t Screen Readers Always Read What’s on the Screen? Part 1: Punctuation and Typographic Symbols and scroll down to "Safe Characters (all screen readers read the characters out loud)". And then read the following section, "Unread Characters (meaning that at least one screen reader will not read the character out loud)". In fact the whole page has a lot of relevant information. (Although the article was written in 2014, screen reader development proceeds relatively slowly and many relevant institutions do not have the resources to update them in a timely way.)
Also, information that comes after the link is likely to be overlooked by a screen reader user who has already followed the link and it will not appear in the links listing for that page. I'm thinking that placing the symbol before the link or better still making it part of the link would be more helpful.

If instead I put an  link with the text "See note" and a target pointing to the note further down the page, would that work for a screen reader?

@richardofsussex
Sorry, but no. That link would be meaningless out of the context of the page (in a list of links). It is a cousin of "click here".
Mind you, on reflection, a simple number is not really helpful. The link needs to be "Page 123", with "Page" in a span with class="accessibility" so it is read out to screen reader users but not visible. (This is a weakness of putting information in a table where that information is not really table data to begin with.)
Similarly, "Oldham" (in this case) would need "District" in an equivalent span, plus anything else that makes no sense out of context. Sorry.

The code is now on test3 for review. I think it could be improved, for example:

could include information on what the expected page range is.

Following discussion with Jason, we think that the qualification in the Entry Information page should be placed in the relevant table cell when the query is specific to one item of data (e.g. the District name), and placed in a separate note under the whole table when it could be any one of a number of data items which is actually suspect/wrong.
Our initial instinct is not to put any indication that a District (etc.) is 'suspect' in the Results page entries. The alternative would be to include a textual note saying, e.g. 'Suspect data: see Entry information page for details'.

@AlOneill do you have any input on this approach?

@DeniseColbert @richardofsussex
I am concerned that for those who cannot see the page, how will they realise that there is a note after the table? Will there be something in the possibly affected cells? Or will the h1, for instance, be modified  in such cases to point to the additional information? Or something equally obvious?

See the beta site for an updated strategy which I hope will meet accessibility requirements.

When I listen to the table row for the page number I hear:
"page", "link, 230, dagger" but I have no idea what to do with the information that there is a dagger.
For a screen reader user to find the note marked by the dagger, I suggest that the dagger in the table cell needs to be a link to the footnote. I suggest that there should be some text with class="accessibility" as part of the dagger link, saying something like "further information in footnote".

@Vino-S is looking into it, but the code I submitted doesn't have any daggers in it, and does indeed contain text with class="accessibility". We'll let you know when beta has been correctly updated, so you can check what I actually wrote.

Try beta now. The code isn't perfect, but at least you can see the idea I am trying to implement. (Look for Jane Partington, Sep 1837 - Dec 1845, volume 20 page 181 as an example.)

@richardofsussex
Yes, that is a step forward. As you say, not yet perfect — the link '[district query]' goes nowhere, for example. Also, telling a user that "We are afraid, we do not have this information yet" for a Mothers Surname in 1840 is rather misleading — leaving the cell blank is probably better, but better still would be to not render an empty row or to say something like "this was not recorded until [insert date here]".
I've been thinking some more about the awkwardness of the filter and sort for SR users and how that would impact the caption.
The setup seems quite complicated in that, in order to sort or apply a filter, a screen reader user is required to navigate from the table to the form and then back to the table, each time going via the rotor, probably. Altogether, quite a lot of faff. And most of the faff is understandable — we offer to sort on several criteria that do not have their own column. However, it does seem unfair on SR users. And it makes for a long caption, explaining not only the structure of the table but also how to sort or filter the results, because the how is not obvious if you cannot see the page.
One alternative would be to put each of the sortable items in their own column and put buttons in the table header cells to do the sorting. This could make problems for mobile-size screens. I seem to remember that REG solved this by using a description list on mobile screens (and using device-sniffing to decide whether to supply a table or a dl). I cannot remember whether or not a user is able to sort the description list on REG, but I suspect not. Adding more column) would not be an easy decision.
Food for thought.

I've just updated the code so that the links do work. In the process I have added  elements and headings to each type of query. While I was in there I noticed an unhelpful "if you want help, go to the menu at the top of the page and click on a link up there" underneath the queries, and replaced it by an actual link (!)

The filter and sort controls should, I think, be a separate story. I note that the BMD2 project made a decision, some time ago, to go with a single-cell block for the core information of one entry within the Search results table, i.e. to do it differently from the other two projects. So going [back] to one cell per data item [for sortable data] is something of a regression. I'm concerned about us going round in circles and never getting to the finishing line.

I'll leave you to fix the layout issues on the Details page. A reminder that all children of .grid need a .grid__item and that all .grid__items need a parent .grid.
Can we try giving the form on the results page an accessible label? I suggest aria-label="sort, show and filter results". I hope that will give a SR user a better idea of what is going on — the browser will not allow me to test the idea! At the moment the individual form controls are listed, with no sense of grouping, including the 'give us feedback' button.
It is only a "regression" (a rather loaded term in everyday English) iff [sic] you believe that those who made the decision fully understood the consequences for SR users.

I'll leave you to fix the layout issues on the Details page. A reminder that all children of .grid need a .grid__item and that all .grid__items need a parent .grid.
@AlOneill do we have any documentation on our CSS grid styles? I see .grid__item's within .grid__item's. Does a .grid__item have to be in an immediate HTML child element (e.g. <div> within <div>? I looked to the source of FreeREG for guidance, but that's just as much a dog's breakfast as our page!

@richardofsussex
AFAIK the only documentation outside of the SCSS files (q.v.) is in Marking up pages in Refinery (available on all three projects, in Refinery, for example: https://test3.freebmd.org.uk/cms/using-refinery/marking-up-pages-in-refinery). Yes, a .grid__item must be an immediate (or direct) child of a .grid — any HTML block will do. And yes, I have failed to convince anyone to fix any of the messes on FreeREG Members' pages. Apparently, members do not care. Except for me and perhaps a couple of others.
Nested .grids and .grid__items should be avoided as far as possible as the results are apt to be unpredictable. However, with care, they can be useful: I recommend the sequence .grid > .grid__item >.grid > .grid__item
Our .grid system is based on floats, explaining why abusing it produces an alignment mess. This is not to be confused with the CSS grid property, which is something completely different. I hope that clarifies the situation, at least a little.

Grid and grid__item issue now a separate issue: #594. Can we close and deploy this issue now?

Implemented (the screenshot from Beta):

authors: AlOneill DeniseColbert KristinaGadzhieva richardofsussex


text:
Change definition of birth_place field

One of the things that Kirk did was to change the definition of Broad Text to include the specific characters used in Welsh and Irish Place names, and some overseas Place Names such as French.
The verbatim_birth_place field is defined as Broad Text. This is correct.
The bitrth_place field which holds the Alternative Place of Birth is still defined as Narrow Text (I believe).
The definition of the birth_place field needs to be changed to Broad Text so that it can accept the special characters.
@AnneV-Learn can you check that I am correct, please? If so, are you able to change the text type. As Broad Text accepts more characters than Narrow Text (including all of Narrow Text Characters) this should not cause any data integrity issues.
Geoff

@geoffj-FUG.
Yes that is correct.
I have changed the text type and it is available for testing on Test3.
(I don't seem to be able to change the pipeline for this or add a label - no idea why?).

@AnneV-Learn I have entered several alternative places of birth into the spreadsheet and got the following results:
Started on the file RG12_1900_test.csv for somt.cen at 2022-12-21 07:25:15 +0000.
Working on Ilchester for 1891, in SOM.
ERROR: line 2 Alt. Birth Place ����� is invalid text.
ERROR: line 3 Alt. Birth Place ����� is invalid text.
ERROR: line 4 Alt. Birth Place ����� is invalid text.
ERROR: line 5 Alt. Birth Place � is invalid text.
ERROR: line 6 Alt. Birth Place ����ܟ? is invalid text.
ERROR: line 7 Alt. Birth Place ��� is invalid text.
ERROR: line 8 Alt. Birth Place �����? is invalid text.
Warning: line 27 House address ����ܟ? has trailing ?. Removed and address_flag set.
Warning: line 27 Address Flag is x.
Warning: line 34 House address �����?
When I found that the characters were not accpeted in the birth_place field I copied them into the address. They were accepted in several instances there (but not all). I entered the test characters using the table at https://www.extendoffice.com/documents/excel/4903-excel-add-accent-mark.html
I will send you the test spreadheet by email.
Geoff

Anne
Test spreadsheet attached
Geoff
From: Anne Vandervord @.>
Sent: Monday, 19 December 2022 12:34 AM
To: FreeUKGen/FreeCENMigration @.>
Cc: Geoff J @.>; Mention @.>
Subject: Re: [FreeUKGen/FreeCENMigration] Change definition of birth_place field (Issue #1469)
@geoffj-FUG https://github.com/geoffj-FUG .
Yes that is correct.
I have changed the text type and it is available for testing on Test3.
(I don't seem to be able to change the pipeline for this or add a label - no idea why?).
—
Reply to this email directly, view it on GitHub https://github.com/FreeUKGen/FreeCENMigration/issues/1469#issuecomment-1356812382 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AKCPIFM22WBXRVBBDSI32R3WN4OGZANCNFSM6AAAAAATASJ3WA .
You are receiving this because you were mentioned.  https://github.com/notifications/beacon/AKCPIFO3E5VLBUMRYIP6FIDWN4OGZA5CNFSM6AAAAAATASJ3WCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSQ35IF4.gif Message ID: @.*** @.***> >

@geoffj-FUG - I've done some further investigation.
Before I made any code changes the verbatim_birth_place field was defined as Broad Text and birth_place was defined as Narrow Text.
I changed birth_place to Broad Text.
Broad text appears to accept A-Z, a-z plus the following characters  .,&'":;
whereas Narrow text accepts A-z, a-z plus ' and .
House or street (address) allows any text but will convert a trailing ? To an address flag.
FYI - the Gazetteer allows any character in the place name.

@geoffj-FUG
Apologies my understanding of the definition of BROAD_TEXT in FreeCen CSVProc validations (in previous comment) was not quite right (quite difficult to interpret the Regular Expressions used).
BROAD accepts A-Z, a-z, 0-9, a single space plus the following characters -_.’,()&":;
NARROW accepts A-Z, a-z, 0-9, a single space plus the following characters -_.’,
The production environment is currently set up as follows:
Surname - BROAD
Forenames - BROAD
Verbatim Place of Birth - BROAD
Place of Birth - NARROW
Where father born - BROAD
Test3 is the same apart from Place of Birth which I changed to BROAD.
Looking in the current version of the Handbook I see that it states Place of Birth is defined as BROAD (not currently the case in production code as indicated above).
But in the Handbook BROAD and NARROW are defined as follows:
Narrow Text – Narrow Text permits any word character (letter, number, underscore) plus , '
(i.e. does not mention that . or - are permitted)
Broad Text - Broad Text permits any word character (letter, number, underscore) plus - ( ) .,&'
(i.e. does not mention that : ; " are permitted)
The Handbook also states:
The ‘As Is’ Rule
…….
Do Not Enter Any Special Characters - Characters such as fractions, accented letters or similar are outside of the character sets for text fields. They will be reported as Errors when the spreadsheet is tested. The characters that can be used in text fields are outlined in the Column (field) Types section above.
Fractions are permitted in some numeric fields.
Note 1: If the surname has been enumerated with an accent (e.g. e acute or e grave). Enter the non-accented letter. Letters with accents are not within the character set.
Note: If the forename has been enumerated with an accent (e.g. e acute or e grave), you will need to enter the non-accented letter. Letters with accents are not within the character set.
If the Place of birth has been enumerated with an accent (e.g. e acute or e grave), enter the non-accented letter. Letters with accents are not within the character set.
Note: In some cases, the father’s Place of birth has been enumerated with an accent (e.g. e acute or e grave). In this case enter the non-accented letter. Letters with accents are not within the character set.
So accented letters are not allowed/accepted, which is true for the fields defined as BROAD or NARROW.
All pretty complicated but I hope that explanation clarifies rather than confuses further!

This should be considered in conjunction with #1655 UTF-8.

authors: AnneV-Learn geoffj-FUG

repo: FreeUKGen/FreeCENMigration


text:
If I search for St Mary in CHI I get results for IOM

If I search for St Mary in CHI I get results for IOM. This also happens for other places with similar names.
Geoff

Fix is ready for testing on Test3

Now tests OK
Can be deployed.
Geoff

Done, closing

authors: AnneV-Learn DeniseColbert geoffj-FUG


text:
Reloading the 1.5.0 integration disables all Homee entities in Homeassistant. HA needs restart to get them re-enabled.

Reloading the 1.5.0 integration disables all Homee entities in Homeassistant. HA needs restart to get them re-enabled.
Homee integration 1.5.0
HA Core 2022.10.2
HA Supervisor 2022.10.0
Type of problem

[x] I found a bug

Version
1.5.0
Detailed description

a)
go to Configuration/Integration
reload Homee 1.5.0 integration
=> all existing homee entities will be disabled
b)
Workaround: Restart HA
=> Homee entities are re-enabled.

Could it be that the Homee integration does not reload properly? Could you check if e.g. the homee.set_value service is available after the reload?

Sorry, was on the road… yes, service is available after reload and I can execute it.
What I did: developes tab/services/ : select “home: set_value” and enter “value: 42” to be the service data. When I execute the call, I get the green check mark in return.
Still, all  entities are disabled.
Von: Karl Möller @.>
Datum: Montag, 10. Oktober 2022 um 19:08
An: FreshlyBrewedCode/hacs-homee @.>
Cc: mesistostefre @.>, Author @.>
Betreff: Re: [FreshlyBrewedCode/hacs-homee] Reloading the 1.5.0 integration disables all Homee entities in Homeassistant. HA needs restart to get them re-enabled. (Issue #15)
Could it be that the Homee integration does not reload properly? Could you check if e.g. the homee.set_value service is available after the reload?
—
Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FFreshlyBrewedCode%2Fhacs-homee%2Fissues%2F15%23issuecomment-1273603038&data=05|01||5fdfe727cccb4b6ce7f108daaae2026f|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|638010184921023004|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=8kafD%2BjbrvteqzNkzpNqxo6dh2HVw6mfpDdGbk5ozGY%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAWXTNLYHQGJLGU5DYNZ7VUTWCREPVANCNFSM6AAAAAARBGSL64&data=05|01||5fdfe727cccb4b6ce7f108daaae2026f|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|638010184921179213|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=NRTsUvMncLtsj7gbM8mWloiRiMvHZ6nRJcarBh37wII%3D&reserved=0.
You are receiving this because you authored the thread.Message ID: @.***>

But I do see an entry in the logs which I must have overlooked before.
The entry is not because of me executing the service, but instead gets created when I trigger the reload of the integration:
“Error unloading entry homee @ (xxx.xxx.xxx.xx) for climate
19:15:55 – (FEHLER) helpers/entity_component.py – “
The details are:
“
Logger: homeassistant.config_entries
Source: helpers/entity_component.py:175
First occurred: 19:04:04 (7 occurrences)
Last logged: 19:15:55

Error unloading entry homee @ (xxx.xxx.xxx.xx) for climate
Error unloading entry homee @ (xxx.xxx.xxx.xx) for binary_sensor
Error unloading entry homee @ (xxx.xxx.xxx.xx) for switch
Error unloading entry homee @ (xxx.xxx.xxx.xx) for cover
Error unloading entry homee @ (xxx.xxx.xxx.xx) for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 498, in async_unload
result = await component.async_unload_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 262, in async_unload_entry
return await component.async_unload_entry(entry)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 175, in async_unload_entry
raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
”

PS: xxx.xxx.xxx.xx is the IP address of homee
Von: Karl Möller @.>
Datum: Montag, 10. Oktober 2022 um 19:08
An: FreshlyBrewedCode/hacs-homee @.>
Cc: mesistostefre @.>, Author @.>
Betreff: Re: [FreshlyBrewedCode/hacs-homee] Reloading the 1.5.0 integration disables all Homee entities in Homeassistant. HA needs restart to get them re-enabled. (Issue #15)
Could it be that the Homee integration does not reload properly? Could you check if e.g. the homee.set_value service is available after the reload?
—
Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FFreshlyBrewedCode%2Fhacs-homee%2Fissues%2F15%23issuecomment-1273603038&data=05|01||5fdfe727cccb4b6ce7f108daaae2026f|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|638010184921023004|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=8kafD%2BjbrvteqzNkzpNqxo6dh2HVw6mfpDdGbk5ozGY%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAWXTNLYHQGJLGU5DYNZ7VUTWCREPVANCNFSM6AAAAAARBGSL64&data=05|01||5fdfe727cccb4b6ce7f108daaae2026f|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|638010184921179213|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=NRTsUvMncLtsj7gbM8mWloiRiMvHZ6nRJcarBh37wII%3D&reserved=0.
You are receiving this because you authored the thread.Message ID: @.***>

It could be due to the new device implementation - will take a look this weekend

@mesistostefre - this has been patched in now; would you try it again when you get the chance, please?

Congratulations: you fixed it!
Upgraded to 2.0.1, reloading the integration works as well.
A few sensors, switches,  and lights got lost, but re-appeared under a new name, basically with an "_2" attached.n
Other switches and lights just survived.
So, after adjusting the automations to use the new entities, all is nice and well.
Thanks again, great job!
Problem I have now: I do not see how i can drop you a treat ... or at least a coffee... :-(

Closed by #17, Fixed in 2.0.0

repo: FreshlyBrewedCode/hacs-homee


text:
🛑 Piska Sekretariat-DJPb is down

In 72bff74, Piska Sekretariat-DJPb (http://piska.setditjen-djpb.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Piska Sekretariat-DJPb is back up in 32ff0c5.

repo: FrideyAlpha/uptime-setditjen


text:
🛑 API (DF) Sekretariat-DJPb is down

In 26bc805, API (DF) Sekretariat-DJPb (https://df1.setditjen-djpb.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: API (DF) Sekretariat-DJPb is back up in 6d01bc5.


text:
make phar extension optional

the utility itself does not need the phar extension if used in the source
version but it previously crashed when invoked w/o the phar extension b/c
there was an unchecked use while trying to map the phar.
fix is to check for the phar class and only if it exists try with phar
mapping. otherwise just take the source version as it is not a phar
anyway.

hi @ktomk ! Your reasoning sounds damn valid if you ask me!
I see that some jobs started to fail at Travis, but that's probably due to travis update of meta-versions like nightly, not sth specific to this PR

did you actually got any issue on your env about lack of Phar ext? I thought it's standard already

Your mileage may vary, but what I did to speed things up was invoking PHP with the -n switch which loads no extensions at all. So I then needed to add one extension after the other on the command line and with this small edit as phar is not needed to run it.
In the end I did this to not load xdebug for speed reasons, just in case you're wondering.

oooh, -n was the reason, cool to know ;)
yeah, i removed xdebug totally, never using it after phpdbg was born ;)

Thank you @ktomk.

authors: keradus ktomk

repo: FriendsOfPHP/PHP-CS-Fixer


text:
DX: benchmark.sh - ensure deps are updated to enable script working across less-similar branches

ker@dus:~/github/PHP-CS-Fixer λ bash benchmark.sh 2.19b 3.0b
2.19 mean:45.3485 total:453.4850 rounds:10
3.0  mean:31.7666 total:317.6665 rounds:10

~30% improvement, huh?

Coverage remained the same at 91.53% when pulling 7aa596312bbb7abef18ba4c46fe8a32929ec069b on keradus:2.19b into 714e1922c6c598c8d032f166fdfbe86217e43bfd on FriendsOfPHP:2.19.

authors: coveralls keradus


text:
Adding CVE-2024-28859 for SwiftMailer gadget chain in Symfony 1.x

There is a deserialization gadget chain in SwiftMailer that impacts Symfony 1.x.
Adding this in both SwiftMailer and Symfony directories

php validator.php fails asking for upper bounds to the version number but there is no upper bound since the issue is not resolved and won't be on swiftmailer/swiftmailer repository at least. How do you solve this situation?

php validator.php fails asking for upper bounds to the version number but there is no upper bound since the issue is not resolved and won't be on swiftmailer/swiftmailer repository at least. How do you solve this situation?

Hi @darkpills, maybe just adding the latest release as the upper bound? As it is unlikely that there will come a new release in the archived repository. But I'm not sure, if it's the way to go here.

@thirsch  I added upper bounds and aligned file path with composer path. I also added another CVE. I think it should be ok now.

Thank you @darkpills for taking care of this :+1:

an unpatched vulnerability is supported. But you should have null as the time as there would be not timestamp for the release of the patch.

authors: darkpills stof thePanz thirsch

repo: FriendsOfPHP/security-advisories

license: unlicense


text:
Implemented linting of AddOns package.yml

package.yml schema validierung

closes https://github.com/FriendsOfREDAXO/rexstan/issues/426

@gharlan mir scheint dass unser package.yml schema nicht der realität entspricht (siehe screenshot oben)

oder muss ich in der validierung additional properties erlauben, auch wenn sie im schema nicht derart deklariert sind?

Eigentlich ist im Schema alles richtig konfiguriert. Bzgl. der Pages ist das Konstrukt aber etwas komplexer, wann welche Properties erlaubt sind.
Mein Gefühl ist, dass die von dir verwendete Lib nicht alle Konstrukte im Schema richtig behandelt.
PhpStorm erkennt eigentlich alles (wenn das Schema aktiviert ist):

itemclass funktioniert so, muss aber eigentlich itemClass heißen. Wird also zurecht bemängelt, von PhpStorm und von rexstan
Wie zu sehen, bemängelt PhpStorm main aber nicht. Das wird hier im PR also falsch bemängelt
Zum Test habe ich etwas wirklich nicht existierendes hinzugefügt, was auch korrekt wieder bemängelt wird von PhpStorm

Hier wird der Typ main-page definiert, als Union aus der page-Defintion und den drei Properties main, block und prio: https://github.com/redaxo/redaxo/blob/1fe927d8a6aa6b5a67ae0f71d3e8e1d5ec31694e/redaxo/src/core/schemas/package.json#L246-L276
Die drei Properties sind es ja, die bei dir hier aktuell bemängelt werden, dort aber eigentlich definiert sind.

ich vermute dass diese inline-type definitionen nicht funktionieren mit der lib

ich hab jetzt mal noch 2 andere libs ausprobiert.

https://github.com/opis/json-schema
https://github.com/swaggest/php-json-schema

beide haben in meinen augen eine fürchterliche API und liefern unlesbare Fehlermeldungen

Ich kann auch nicht sicher sagen, ob unsere Notation überhaupt wirklich so korrekt ist. Vielleicht interpretiert es PhpStorm auch nur zufällig so, wie von uns gedacht.

authors: gharlan staabm

repo: FriendsOfREDAXO/rexstan


text:
added most used html semantic elements

@Vishal-raj-1
Closes [#169](https://github.com/FrontendFreaks/Official-Website/issues/169)
Changes proposed
Added most used HTML Semantic Elements.
Screenshots

Check List (Check all the applicable boxes)

[✔ ] My code follows the code style of this project.
[✔ ] My change requires changes to the documentation.
[ ✔] I have updated the documentation accordingly.
[ ✔] All new and existing tests passed.
[ ] This PR does not contain plagiarized content.
[✔ ] The title of my pull request is a short description of the requested changes.

Note to reviewers
Added most used html semantic element and given best example for understanding without explanation.

LGTM

@ManishBisht777  Thanks for your review. Is it merged?

repo: FrontendFreaks/Official-Website


text:
Reduce bundle size by replacing ethers with its subpackages

Apparently our move to ethers v6 caused our minified+gzipped bundle size to increase by ~200kb (size of fuels@0.62.0, size of fuels@0.63.0).
I took a look around and it seems like we can replace our ethers dependencies with just @ethersproject/bytes.
Edit: ethers v6 supports tree-shaking, so such a big jump in package size shouldn't happen.

I completely excluded ethers from the build process and the bundle size was reduced by only 14 KB, meaning that it indeed does get tree-shaken. It seems that bundlephobia.com doesn't catch this part.

repo: FuelLabs/fuels-ts


text:
Upgrade to fuel-core @ 0.27

Release notes:

https://github.com/FuelLabs/fuel-core/releases/tag/v0.27.0

@maschad Could be a good one if you're feeling brave. 💪

Rust SDK counterpart:

https://github.com/FuelLabs/fuels-rs/pull/1395


text:
Upgrade to fuel-core v0.3.2

Adds internal support for bytePrice and also storageSlots which we can build #126 on.

I'm guessing now that fuel-core 0.3.2 is out with your coin selection API this one can be done? #93

Yup, that PR is ready too.


text:
Implement mut arguments

The following shouldn't compile today but it does:
struct A {
    a: u64,
}

impl A {
    fn f(self) {
        self.a = 42;
    }
}

because self is not passed to f as mut.
The change I'm proposing to fix https://github.com/FuelLabs/sway/issues/908 rightfully breaks the above. However, there is no way to un-break it because we can't yet write:
impl A {
    fn f(mut self) {
        self.a = 42;
    }
}

More generally, we want to be able to annotate any argument as mut:
fn bla(mut a: u64, mut b: u64) {
    a = 0;
    b = 0;
}

Edit: the case with arbitrary arguments implies that we support passing arguments by ref, which still has to be property designed and thought of. So, for now, we should just enable mut self.

We need to establish some ground rules around how different types are passed into functions. One proposal is as follows:
struct A {
    a: u64,
}

struct B {
    b1: u64,
    b2: u64,
}

impl A {
    fn f1(self, x: u64, b: B) {
        // Read-only access to self, self.a, x, b.b1, b.b2
    }

    fn f2(mut self, mut x: u64, mut b: B) {
        // Read/write access to self, self.a, x, b.b1, b.b2
    }

    fn f3(ref self, ref x: u64, ref b: B) {
        // Read-only access to self, self.a, x, b.b1, b.b2
    }
   fn f4(ref mut self, ref mut x: u64, ref mut b: B) {
        // Readwrite access to self, self.a, x, b.b1, b.b2
    }
}

fn main() {
    let mut a_data = A { a: 0 };
    let mut x_data = 0;
    let mut b_data = B { b1: 0, b2: 0 };

    a_data.f1(x_data, b_data); // No changes to a_data, x_data, or b_data expected.

    a_data.f2(x_data, b_data); // No changes to a_data, x_data, or b_data expected.

    a_data.f3(x_data, b_data); // No changes to a_data, x_data, or b_data expected.

    a_data.f3(x_data, b_data); // Potential changes to a_data, x_data, or b_data.
}

Note: I don't think there should be any distinction between copy types (such as u64) and non-copy types (such as struct) with regards to the above, even though structs are really just pointers to data with our implementation.

I don't think there should be any distinction between copy types (such as u64) and non-copy types (such as struct) with regards to the above, even though structs are really just pointers to data with our implementation.

Rust does use the Copy trait to show this distinction explicitly. We could do the same?
This all makes sense. I don't think we should necessarily modify how things are passed around, instead just modifying the semantic analysis. Structs shouldn't be copied if they're passed in immutably. In that sense, we could just introduce the mut keyword and disallow mutation by default (unlike now).
The complexity comes in when you want to pass in a single mutable copy type. We copy those into new registers at this point. They're technically never persisted in memory. In fact, a reference to a number like this is itself not currently possible, as types this small exist only in a register.

I don't think we should necessarily modify how things are passed around, instead just modifying the semantic analysis.
Totally agree. All the above makes sense, thanks.

I don't necessarily have a clean solution to the problem of mut single-register types. Is it possible in the IR to signal that a register must not be copied and instead mutated in place? cc @otrho

Is it possible in the IR to signal that a register must not be copied and instead mutated in place?

I have a feeling that the inliner will just do this for us by default... Let me remove the mutability check and see what I get.

We need to find a solution to the problem of mut single-register (copy) types. Is it possible in the IR to signal that a register must not be copied and instead mutated in place? cc @otrho

The IR itself has no concept of registers, just values.  If we add explicit mutability to Sway we will add it to the IR in the same fashion.   And the it and the codegen can manage the copying or non-copying of registers.
The IR already has pointers, although not quite fully realised as types, but we can add that and then the IR can truly have by-reference semantics, even if we keep it implicit in Sway.  That way mutable arguments can work whether they end up being registers or memory locations.

How about we start by allowing the mut keyword only for self so that something like this works:
script;

struct A {
    a: u64,
}

impl A {
    fn f(mut self) {
        self.a = 0;
    }
}

fn main() {
    let mut a = A { a: 0 };
    a.f();
}

This is a fairly easy to change to make and would unblock Vec<T>. If we do this, then we don't have to worry (for now) about:

Dealing with mutable copy types. These require some modification to the IR to handle well (due to store and load expecting pointers etc.)
Dealing with the ref keyword
Disallowing mutable arguments in ABI methods
and maybe other stuff.

The lack of (2) bugs me a bit but we seem to be treating self as a ref anyways already.
@FuelLabs/sway-compiler thoughts?

This actually sounds quite reasonable: :+1:

Now that Vec<T> is under way, I think this is now even more important because users will probably want to pass Vec<T> to functions as an argument, and they can't actually call any of the methods that modify Vec<T> without the mut keyword.

One option here that was brought up in a discussion earlier is to allow mut arguments only for reference types and error out when the mut keyword is used with copy type arguments. That would help the Vec<T> case. The syntax here would still not require ref.

https://github.com/FuelLabs/sway/pull/2363 closes this. We probably won't ever support mut args without ref but we will see if that ever comes up in the future.

authors: mohammadfawaz otrho sezna

repo: FuelLabs/sway


text:
Enum formating for sway-fmt-v2

~This PR is WIP~. I believe this is ready to give us a good starting point/something to iterate on with feedback.

About this PR
~Blocked by: #1968~
This PR implements the basic enum formatting for sway-fmt-v2.
I tested with the following inputs.
contract;

enum Color {
    Blue: (),
    Green: (),
    Red: (),
    Silver: (),
    Grey: (),
}

To test enum variant alignment you can create a swayfmt.toml at the root of your test project directory and use the following config:
[structures]
enum_variant_align_threshold = 20

Without alignment applied (default) output will be like:
enum Color {
 Blue : (),
 Green : (),
 Red : (),
 Silver : (),
 Grey : (),
}

With alignment:
enum Color {
 Blue   : (),
 Green  : (),
 Red    : (),
 Silver : (),
 Grey   : (),
}

Note:  since the contract part in the example is not handled yet by a part of the sway-fmt-v2 it is deleted.  It will be corrected once we handle that part too (possibly in a separate PR).
If you would like to try something a little bit crazier you can try something like:
contract;

enum Color {
    Blue: (), Green: (),
    		Red: (),
  Silver: (),
    				Grey: (), }

The program type formatting will need to be done in a separate PR, this is okay for now I think

authors: eureka-cpu kayagokalp


text:
Write SQL Create view Statements to build the star scheme

Depending on the results of #21 and #22!

Ok, ich muss wohl rausfinden was ein star scheme ist...

Ok, ich muss wohl rausfinden was ein star scheme ist...

authors: fphans lknegendorf


text:
ModelToView use object instead of array

Using Proxy to prevent a limit in behaviors toView

Really nice! :smile:

authors: limemloh paldepind

repo: Funkia/funnel


text:
Add -webkit-touch-callout?

https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariCSSRef/Articles/StandardCSSProperties.html#//apple_ref/doc/uid/TP30001266-_webkit_touch_callout
https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-touch-callout
https://davidwalsh.name/webkit-css

The -webkit-touch-callout property allows you to dictate what does or doesn't happen when a user taps and holds on a link on iOS. The default value is default and tap-holding on a link brings up the link bubble dialog; by using the value of none, that bubble never comes up.

EDIT:
Kinda related to https://caniuse.com/#feat=user-select-none.

Available at https://caniuse.com/#feat=mdn-css_properties_-webkit-touch-callout

authors: Fyrd Schweinepriester

repo: Fyrd/caniuse


text:
Add WebHID API data

https://wicg.github.io/webhid/
https://www.chromestatus.com/feature/5172464636133376
The WebHID API will soon be available in Chrome behind a flag.
Closes #5062

Thanks!

authors: Fyrd antonjuulnaber


text:
Implement GoReleaser in Armada

GoReleaser is one of the most popular release tools for Golang widely used in CNCF (and other Golang) projects.
We should implement GoReleaser into Armada CI/CD pipeline with the following features:

Build armadactl for multiple architectures and upload the binaries to the GitHub Release page
Build Docker images for all Armada components and a monoimage of all components in it (experimental)
Add armadactl to popular software management tools repositories (choco, brew, yum, apt...)
Add armadactl to Krew, generate Krew manifest and make it installable as a kubectl plugin
Create GitHub changelogs in the GitHub Release page
OPTIONAL: send release announcements somewhere (Slack, Discord, Twitter...)

GoReleaser natively supports all of the features mentioned above and all of that should be made configurable in the GoReleaser YAML config file.

This sounds good to me. One step on the journey away from our incredible makefile.

authors: dejanzele severinson

repo: G-Research/armada


text:
🛑 Sensitive data service (correct name index) is down

In 803533d, Sensitive data service (correct name index) (https://datos-sensibles.gbif.es/api/isSensitive?scientificName=lynx pardinus) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Sensitive data service (correct name index) is back up in 55b1bbd after 2 hours, 33 minutes.

repo: GBIFes/status


text:
LayerManagerControl: remove surface create and destroy api's

api's never worked and would even cause exception in LayerManagerControl tool
surface can only be created with native content and native content is
wayland-surface which is only available in the client.
So it does not make any sense to provide this functionality to external tool.
For surface destroy it is very similar issue, we can only destroy surfaces
which were created in the same client, but this is never the case by using
LayerManagerControl- every call will create new connection and therefore new client
Signed-off-by: Eugen Friedrich efriedrich@de.adit-jv.com

It looks good

authors: efriedrich eucan

repo: GENIVI/wayland-ivi-extension


text:
Add hidden option to link GEOSgcm.x

Per a thought by @bena-nasa it might be nice for us in the SI Team to have a "hidden" option (like --nocvs in the old days) where instead of GEOSgcm.x being copied into the experiment, it is symlinked. Since we build the model over and over, a symlink'd GEOSgcm.x can save us time.

@mathomp4 I'm not sure I completely understand the benefits of sym linking an executable. I' also not familiar with the --nocvs option either. Maybe we should chat.

@sdrabenh Well, back in the days when gcm_setup would commit to CVS if it saw differences, I added a --nocvs option that would stop that. As the SI Team changes files all the time and runs experiments, we'd have polluted CVS with zillions of branches.
The thought here is similar. When @bena-nasa, @atrayano, or myself make an experiment, the next thing we do is remove the GEOSgcm.x from the experiment and then symlink in the one in $ESMADIR/install/bin. That way, we can change code, recompile, reinstall, and then go back to our experiment and not need to then do cp $ESMADIR/install/bin/GEOSgcm.x .. Instead, we'd always have the "latest" version of GEOSgcm.x in our experiment directory.


text:
MAPL 2 GNU Build Broken

Per the nightly tests:
/discover/nobackup/mathomp4/SystemTests/builds/AGCM_GNUMAPLDEV/CURRENT/GEOSgcm/src/Shared/@MAPL/MAPL_Base/MAPL_ExtDataGridCompMod.F90:2048:43-43:

         type(Variable), pointer :: variable
                                           1
Error: The type 'variable' cannot be host associated at (1) because it is blocked by an incompatible object of the same name declared at (2)
make[2]: *** [src/Shared/@MAPL/MAPL_Base/CMakeFiles/MAPL_Base.dir/MAPL_ExtDataGridCompMod.F90.o] Error 1
make[1]: *** [src/Shared/@MAPL/MAPL_Base/CMakeFiles/MAPL_Base.dir/all] Error 2
make: *** [all] Error 2

We have seen this before. The issue is GNU doesn't like having the variable named the same as the type. The usual fix is:
type(Variable), pointer :: var

I'll try to get a fix soon, but I want to make sure I don't change the Intel build results (which works).

repo: GEOS-ESM/MAPL


text:
bip_util: Create Trait To Abstract Handle/RemoteHandle

Many of our crates try to be agnostic over the execution mechanism for their futures. However, currently we hardcode against Handle to spin off asynchronous tasks.
It would be nice if our crates depended instead on some trait in bip_util that exposed a function to pass a future to, which would be executed when some event loop/other mechanism, starts up.

Tracking https://github.com/alexcrichton/futures-rs/pull/455 for this.

This should also extend to some trait that allows clients to configure whether we use sync channels, or unsync channels, depending on how they will be composing the library in their own application so that they can get performance benefits if they are really using a single thread.

repo: GGist/bip-rs


text:
Use standardized official country codes

It would streamline certain workflows if the APIs could be queried using standardized country codes, such as ISO 3166-1 alpha-2 instead of the ORS-specific(?) numeric ids listed in https://github.com/GIScience/openrouteservice-docs#country-list.
This doesn't need to be a breaking change because ISO_3166-1 codes can be easily distinguished from the current numeric ids, so the API could allow either.
Note that ISO 3166-1 country codes are already used by Pelias gecoder.

Moved: https://github.com/GIScience/openrouteservice/issues/195

repo: GIScience/openrouteservice-docs


text:
Existing place or intermediate stops are lost after using “Directions to here”

Steps to reproduce:

Starting with a fresh instance of https://openrouteservice.org/map
Open the left sidebar
Type & find a place (e.g. Bismarckplatz Heidelberg)
Right-click on the map and select “Directions to here”
Existing Place is lost

Something similar:

Starting with a fresh instance of https://openrouteservice.org/map
Create any route with intermediate stops
Right-click on the map and select “Direct to here”
Intermediate Stops are lost

Thanks for open, but I is intentional.
The app has some states: place, directions, isochrones and roundtrip. There are ways to switch from an state to another, like by clicking on the directions button, for example.
When first loaded, the app starts in the place mode. You can find a place and see its location and detailsor even share it. If desired, you can switch to the directions mode and use the already selected place as a target destination, by clicking on the directions button. But if you just find a place and don't change to directions, then when you start directions mode following another path, then the previously focused place will be discarded. You could also jump from a selected place to isochrones, for example, and the place would be also lost.
I will close the issue for now. If any other aspect is added we may consider reopening it.

Just to be clear: You are saying it is intended that the intermediate stops are lost, when I just change the destination?

Currently there is no "Directions to here" option in the right click menu when a route is calculated and displayed.
the options are:
Append as destination -> add the selected point to the end of the route (not stop is lost)
directions from here -> change the initial point of the route (no stop is lost)
Add stop here -> a stop is added (no stop is lost)
Direct to here -> calculate a route that goes directly to the selected point (as the name says, stops will be lostand the origin kept)

repo: GIScience/ors-map-client


text:
Use keccak to compare arrays

BytesLib.equal and BytesLib.equal_nonAligned can be replaced with a much simpler, more gas efficient and purely Solidity (YUL probably won't bring any benefits here): return _preBytes.length == _postBytes.length && keccak256(_preBytes) == keccak256(_postBytes);.

The idea for the library was to provide a different alternative to the hashing option. That is dependent on the hash implementation versus having computation done on each of the bytes directly. I don't think I'd ever mask a simple hash comparison behind a lib, too.
In addition, have you tested and made sure it is more gas-efficient?

The idea for the library was to provide a different alternative to the hashing option. That is dependent on the hash implementation versus having computation done on each of the bytes directly. I don't think I'd ever mask a simple hash comparison behind a lib, too.

That's interesting, what for and why? Is hashing insecure?
Regarding gas usage, hashing costs 30 gas + 6 per 32-byte word, there's nothing to benchmark really, hashing is probably the cheapest thing you can do with an array of bytes in memory.

That's interesting, what for and why? Is hashing insecure?

Not really, but we're just giving optionality, I guess. I'm not afraid the keccak opcode is badly implemented in Geth.
But that's just the gas usage of the opcode. What about changing the memory pointer, allocating the memory in the scratch space, etc.? Because my code does everything in place, we don't even touch the 0x0 - 0x40 scratch space like the Solidity compiler does to hash stuff together. What if you want to hash something that is bigger than 32 bytes? You need to copy multiple times. I'd say that the bigger the array, the more efficient my function is compared to hashing stuff together.
This being said, I never benchmarked it, so you may be right. I'd love to see some data to believe the statement, though.

Keccak works in-place, on an arbitrary memory range, check https://www.evm.codes. The scratch space is used mostly for calculating the storage slot indexes, because it involves repeated hashing of pairs of 32-byte words taken from the stack.
It's your project, so I can't tell you what to do, you'll do whatever you choose. I don't even use your code as a dependency, so I won't see the benefits of any optimization. All I'm saying is that you should check out hashing because it's a fairly popular strategy for reducing gas usage.

I just benchmarked it, and you're totally right. Leaving the data here for posterity.
This is for a 4-byte-long array comparison with Keccak:

This is for the same comparison with my function:

Trying longer lengths shows that my function actually scales just a smidge slightly worse than the Keccak comparison.
With this being said, if the lengths do not match my function is O(1) and performs better than the Keccak counterpart in any case.
To be honest, I've done this such a long time ago that I don't even know what I was thinking now, about memory manipulation of the Keccak opcode. It probably had something to do with the storage slot calculations, like you mentioned. 🤷♂
Although this is all true, I still don't think I should change this function.
First, because if using the Keccak version is what people want to do, using it through a library makes no sense since it is a one-liner.
Second, because I've made this lib such a long time ago (and it's still consumed by some major projects) that I'm sincerely afraid to change any implementations at this point (e.g., that's why I merged the PR for the non aligned comparison as a new function instead of adding to the previous one).
Third, because I like how this still serves as a well-commented, teaching example of the inner workings of the EVM.
Fourth, because it's another option. 😄
But I sincerely thank you for bringing this up! 🙏  At least now we have some comparisons and options.
Also happy to keep this issue open so people notice it when arriving at the repo. 👍

With this being said, if the lengths do not match, my function is O(1) and performs better than the Keccak counterpart in any case.

From the very first proposed version in this issue hashing is done only if the lengths are different. Omitting this path doesn't yield meaningful results.
I couldn't believe it so I wrote a benchmark too, here are the results. Hashing has a predictable cost which is a useful property on blockchains, and is usually faster, often by a lot. The only edge case are arrays of over 256 bytes where the very first byte is different, for which the loop-based implementation has the O(1) cost, so at some point it gets better than hashing.
Source
pragma solidity ^0.8.24;

import {console, Test} from "forge-std/Test.sol";

contract EqualTest is Test {

    function testBenchEqual() public view {
        for(uint i = 1; i < 4096; i *= 2) {
            _benchForLength(i);
        }
    }

    function _benchForLength(uint256 length) internal view {
        bytes memory data = new bytes(length);
        for(uint256 i = 0; i < length; i++) {
            data[i] = bytes1(uint8(block.prevrandao + i));
        }
        console.log("Same for length", length);
        this.benchEqual(data, data);

        bytes memory differentFirst = bytes.concat(data);
        differentFirst[0] ^= 0xff;
        console.log("Different first for length", length);
        this.benchEqual(data, differentFirst);

        bytes memory differentLast = bytes.concat(data);
        differentLast[differentLast.length -1] ^= 0xff;
        console.log("Different last for length", length);
        this.benchEqual(data, differentLast);

        bytes memory differentLength = bytes.concat(data, bytes1(0));
        console.log("Different length for length", length);
        this.benchEqual(data, differentLength);

        console.log("-----------------------");
        console.log("");
    }

    function benchEqual(bytes memory preBytes, bytes memory postBytes) external view {
        uint256 gasEqual = gasleft();
        bool equalResult = BytesLib.equal(preBytes, postBytes);
        gasEqual -= gasleft();

        uint256 gasEqualNonAligned = gasleft();
        bool equalNonAlignedResult = BytesLib.equal_nonAligned(preBytes, postBytes);
        gasEqualNonAligned -= gasleft();

        uint256 gasEqualHash = gasleft();
        bool equalHashResult = BytesLib.equalHash(preBytes, postBytes);
        gasEqualHash -= gasleft();

        if(equalResult != equalNonAlignedResult) console.log("DIFFERENT ALIGNED AND NON ALIGNED!");
        assertEq(equalResult, equalHashResult, "Invalid hash result");

        console.log("Gas equal:            ", gasEqual);
        console.log("Gas equal non aligned:", gasEqualNonAligned);
        console.log("Gas equal hash       :", gasEqualHash);
        console.log("");
    }
}

library BytesLib {
    function equalHash(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {
        return _preBytes.length == _postBytes.length && keccak256(_preBytes) == keccak256(_postBytes);
    }

    function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {
        bool success = true;

        assembly {
            let length := mload(_preBytes)

            // if lengths don't match the arrays are not equal
            switch eq(length, mload(_postBytes))
            case 1 {
                // cb is a circuit breaker in the for loop since there's
                //  no said feature for inline assembly loops
                // cb = 1 - don't breaker
                // cb = 0 - break
                let cb := 1

                let mc := add(_preBytes, 0x20)
                let end := add(mc, length)

                for {
                    let cc := add(_postBytes, 0x20)
                // the next line is the loop condition:
                // while(uint256(mc < end) + cb == 2)
                } eq(add(lt(mc, end), cb), 2) {
                    mc := add(mc, 0x20)
                    cc := add(cc, 0x20)
                } {
                    // if any of these checks fails then arrays are not equal
                    if iszero(eq(mload(mc), mload(cc))) {
                        // unsuccess:
                        success := 0
                        cb := 0
                    }
                }
            }
            default {
                // unsuccess:
                success := 0
            }
        }

        return success;
    }

    function equal_nonAligned(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {
        bool success = true;

        assembly {
            let length := mload(_preBytes)

            // if lengths don't match the arrays are not equal
            switch eq(length, mload(_postBytes))
            case 1 {
                // cb is a circuit breaker in the for loop since there's
                //  no said feature for inline assembly loops
                // cb = 1 - don't breaker
                // cb = 0 - break
                let cb := 1

                let endMinusWord := add(_preBytes, length)
                let mc := add(_preBytes, 0x20)
                let cc := add(_postBytes, 0x20)

                for {
                // the next line is the loop condition:
                // while(uint256(mc < endWord) + cb == 2)
                } eq(add(lt(mc, endMinusWord), cb), 2) {
                    mc := add(mc, 0x20)
                    cc := add(cc, 0x20)
                } {
                    // if any of these checks fails then arrays are not equal
                    if iszero(eq(mload(mc), mload(cc))) {
                        // unsuccess:
                        success := 0
                        cb := 0
                    }
                }

                // Only if still successful
                // For <1 word tail bytes
                if gt(success, 0) {
                    // Get the remainder of length/32
                    // length % 32 = AND(length, 32 - 1)
                    let numTailBytes := and(length, 0x1f)
                    let mcRem := mload(mc)
                    let ccRem := mload(cc)
                    for {
                        let i := 0
                    // the next line is the loop condition:
                    // while(uint256(i < numTailBytes) + cb == 2)
                    } eq(add(lt(i, numTailBytes), cb), 2) {
                        i := add(i, 1)
                    } {
                        if iszero(eq(byte(i, mcRem), byte(i, ccRem))) {
                            // unsuccess:
                            success := 0
                            cb := 0
                        }
                    }
                }
            }
            default {
                // unsuccess:
                success := 0
            }
        }

        return success;
    }
}

Results for via-ir=false and 200 optimizer runs
  Same for length 1
  Gas equal:             289
  Gas equal non aligned: 368
  Gas equal hash       : 208

  Different first for length 1
  Gas equal:             305
  Gas equal non aligned: 384
  Gas equal hash       : 208

  Different last for length 1
  Gas equal:             305
  Gas equal non aligned: 384
  Gas equal hash       : 208

  Different length for length 1
  Gas equal:             140
  Gas equal non aligned: 140
  Gas equal hash       : 95

  -----------------------

  Same for length 2
  Gas equal:             289
  Gas equal non aligned: 455
  Gas equal hash       : 208

  Different first for length 2
  Gas equal:             305
  Gas equal non aligned: 384
  Gas equal hash       : 208

  Different last for length 2
  Gas equal:             305
  Gas equal non aligned: 471
  Gas equal hash       : 208

  Different length for length 2
  Gas equal:             140
  Gas equal non aligned: 140
  Gas equal hash       : 95

  -----------------------

  Same for length 4
  Gas equal:             289
  Gas equal non aligned: 629
  Gas equal hash       : 208

  Different first for length 4
  Gas equal:             305
  Gas equal non aligned: 384
  Gas equal hash       : 208

  Different last for length 4
  Gas equal:             305
  Gas equal non aligned: 645
  Gas equal hash       : 208

  Different length for length 4
  Gas equal:             140
  Gas equal non aligned: 140
  Gas equal hash       : 95

  -----------------------

  Same for length 8
  Gas equal:             289
  Gas equal non aligned: 977
  Gas equal hash       : 208

  Different first for length 8
  Gas equal:             305
  Gas equal non aligned: 384
  Gas equal hash       : 208

  Different last for length 8
  Gas equal:             305
  Gas equal non aligned: 993
  Gas equal hash       : 208

  Different length for length 8
  Gas equal:             140
  Gas equal non aligned: 140
  Gas equal hash       : 95

  -----------------------

  Same for length 16
  Gas equal:             289
  Gas equal non aligned: 1673
  Gas equal hash       : 208

  Different first for length 16
  Gas equal:             305
  Gas equal non aligned: 384
  Gas equal hash       : 208

  Different last for length 16
  Gas equal:             305
  Gas equal non aligned: 1689
  Gas equal hash       : 208

  Different length for length 16
  Gas equal:             140
  Gas equal non aligned: 140
  Gas equal hash       : 95

  -----------------------

  Same for length 32
  Gas equal:             289
  Gas equal non aligned: 281
  Gas equal hash       : 208

  Different first for length 32
  DIFFERENT ALIGNED AND NON ALIGNED!
  Gas equal:             305
  Gas equal non aligned: 281
  Gas equal hash       : 208

  Different last for length 32
  DIFFERENT ALIGNED AND NON ALIGNED!
  Gas equal:             305
  Gas equal non aligned: 281
  Gas equal hash       : 208

  Different length for length 32
  Gas equal:             140
  Gas equal non aligned: 140
  Gas equal hash       : 95

  -----------------------

  Same for length 64
  Gas equal:             382
  Gas equal non aligned: 374
  Gas equal hash       : 220

  Different first for length 64
  Gas equal:             305
  Gas equal non aligned: 325
  Gas equal hash       : 220

  Different last for length 64
  DIFFERENT ALIGNED AND NON ALIGNED!
  Gas equal:             398
  Gas equal non aligned: 374
  Gas equal hash       : 220

  Different length for length 64
  Gas equal:             140
  Gas equal non aligned: 140
  Gas equal hash       : 95

  -----------------------

  Same for length 128
  Gas equal:             568
  Gas equal non aligned: 560
  Gas equal hash       : 244

  Different first for length 128
  Gas equal:             305
  Gas equal non aligned: 325
  Gas equal hash       : 244

  Different last for length 128
  DIFFERENT ALIGNED AND NON ALIGNED!
  Gas equal:             584
  Gas equal non aligned: 560
  Gas equal hash       : 244

  Different length for length 128
  Gas equal:             140
  Gas equal non aligned: 140
  Gas equal hash       : 95

  -----------------------

  Same for length 256
  Gas equal:             940
  Gas equal non aligned: 932
  Gas equal hash       : 292

  Different first for length 256
  Gas equal:             305
  Gas equal non aligned: 325
  Gas equal hash       : 292

  Different last for length 256
  DIFFERENT ALIGNED AND NON ALIGNED!
  Gas equal:             956
  Gas equal non aligned: 932
  Gas equal hash       : 292

  Different length for length 256
  Gas equal:             140
  Gas equal non aligned: 140
  Gas equal hash       : 95

  -----------------------

  Same for length 512
  Gas equal:             1684
  Gas equal non aligned: 1676
  Gas equal hash       : 388

  Different first for length 512
  Gas equal:             305
  Gas equal non aligned: 325
  Gas equal hash       : 388

  Different last for length 512
  DIFFERENT ALIGNED AND NON ALIGNED!
  Gas equal:             1700
  Gas equal non aligned: 1676
  Gas equal hash       : 388

  Different length for length 512
  Gas equal:             140
  Gas equal non aligned: 140
  Gas equal hash       : 95

  -----------------------

  Same for length 1024
  Gas equal:             3172
  Gas equal non aligned: 3164
  Gas equal hash       : 580

  Different first for length 1024
  Gas equal:             305
  Gas equal non aligned: 325
  Gas equal hash       : 580

  Different last for length 1024
  DIFFERENT ALIGNED AND NON ALIGNED!
  Gas equal:             3188
  Gas equal non aligned: 3164
  Gas equal hash       : 580

  Different length for length 1024
  Gas equal:             140
  Gas equal non aligned: 140
  Gas equal hash       : 95

  -----------------------

  Same for length 2048
  Gas equal:             6148
  Gas equal non aligned: 6140
  Gas equal hash       : 964

  Different first for length 2048
  Gas equal:             305
  Gas equal non aligned: 325
  Gas equal hash       : 964

  Different last for length 2048
  DIFFERENT ALIGNED AND NON ALIGNED!
  Gas equal:             6164
  Gas equal non aligned: 6140
  Gas equal hash       : 964

  Different length for length 2048
  Gas equal:             140
  Gas equal non aligned: 140
  Gas equal hash       : 95

  -----------------------

Results for via-ir=true and 200 optimizer runs
  Same for length 1
  Gas equal:             266
  Gas equal non aligned: 369
  Gas equal hash       : 211

  Different first for length 1
  Gas equal:             294
  Gas equal non aligned: 397
  Gas equal hash       : 211

  Different last for length 1
  Gas equal:             294
  Gas equal non aligned: 397
  Gas equal hash       : 211

  Different length for length 1
  Gas equal:             74
  Gas equal non aligned: 115
  Gas equal hash       : 87

  -----------------------

  Same for length 2
  Gas equal:             266
  Gas equal non aligned: 457
  Gas equal hash       : 211

  Different first for length 2
  Gas equal:             294
  Gas equal non aligned: 397
  Gas equal hash       : 211

  Different last for length 2
  Gas equal:             294
  Gas equal non aligned: 485
  Gas equal hash       : 211

  Different length for length 2
  Gas equal:             74
  Gas equal non aligned: 115
  Gas equal hash       : 87

  -----------------------

  Same for length 4
  Gas equal:             266
  Gas equal non aligned: 633
  Gas equal hash       : 211

  Different first for length 4
  Gas equal:             294
  Gas equal non aligned: 397
  Gas equal hash       : 211

  Different last for length 4
  Gas equal:             294
  Gas equal non aligned: 661
  Gas equal hash       : 211

  Different length for length 4
  Gas equal:             74
  Gas equal non aligned: 115
  Gas equal hash       : 87

  -----------------------

  Same for length 8
  Gas equal:             266
  Gas equal non aligned: 985
  Gas equal hash       : 211

  Different first for length 8
  Gas equal:             294
  Gas equal non aligned: 397
  Gas equal hash       : 211

  Different last for length 8
  Gas equal:             294
  Gas equal non aligned: 1013
  Gas equal hash       : 211

  Different length for length 8
  Gas equal:             74
  Gas equal non aligned: 115
  Gas equal hash       : 87

  -----------------------

  Same for length 16
  Gas equal:             266
  Gas equal non aligned: 1689
  Gas equal hash       : 211

  Different first for length 16
  Gas equal:             294
  Gas equal non aligned: 397
  Gas equal hash       : 211

  Different last for length 16
  Gas equal:             294
  Gas equal non aligned: 1717
  Gas equal hash       : 211

  Different length for length 16
  Gas equal:             74
  Gas equal non aligned: 115
  Gas equal hash       : 87

  -----------------------

  Same for length 32
  Gas equal:             266
  Gas equal non aligned: 281
  Gas equal hash       : 211

  Different first for length 32
  DIFFERENT ALIGNED AND NON ALIGNED!
  Gas equal:             294
  Gas equal non aligned: 281
  Gas equal hash       : 211

  Different last for length 32
  DIFFERENT ALIGNED AND NON ALIGNED!
  Gas equal:             294
  Gas equal non aligned: 281
  Gas equal hash       : 211

  Different length for length 32
  Gas equal:             74
  Gas equal non aligned: 115
  Gas equal hash       : 87

  -----------------------

  Same for length 64
  Gas equal:             360
  Gas equal non aligned: 387
  Gas equal hash       : 223

  Different first for length 64
  Gas equal:             294
  Gas equal non aligned: 342
  Gas equal hash       : 223

  Different last for length 64
  DIFFERENT ALIGNED AND NON ALIGNED!
  Gas equal:             388
  Gas equal non aligned: 387
  Gas equal hash       : 223

  Different length for length 64
  Gas equal:             74
  Gas equal non aligned: 115
  Gas equal hash       : 87

  -----------------------

  Same for length 128
  Gas equal:             548
  Gas equal non aligned: 599
  Gas equal hash       : 247

  Different first for length 128
  Gas equal:             294
  Gas equal non aligned: 342
  Gas equal hash       : 247

  Different last for length 128
  DIFFERENT ALIGNED AND NON ALIGNED!
  Gas equal:             576
  Gas equal non aligned: 599
  Gas equal hash       : 247

  Different length for length 128
  Gas equal:             74
  Gas equal non aligned: 115
  Gas equal hash       : 87

  -----------------------

  Same for length 256
  Gas equal:             924
  Gas equal non aligned: 1023
  Gas equal hash       : 295

  Different first for length 256
  Gas equal:             294
  Gas equal non aligned: 342
  Gas equal hash       : 295

  Different last for length 256
  DIFFERENT ALIGNED AND NON ALIGNED!
  Gas equal:             952
  Gas equal non aligned: 1023
  Gas equal hash       : 295

  Different length for length 256
  Gas equal:             74
  Gas equal non aligned: 115
  Gas equal hash       : 87

  -----------------------

  Same for length 512
  Gas equal:             1676
  Gas equal non aligned: 1871
  Gas equal hash       : 391

  Different first for length 512
  Gas equal:             294
  Gas equal non aligned: 342
  Gas equal hash       : 391

  Different last for length 512
  DIFFERENT ALIGNED AND NON ALIGNED!
  Gas equal:             1704
  Gas equal non aligned: 1871
  Gas equal hash       : 391

  Different length for length 512
  Gas equal:             74
  Gas equal non aligned: 115
  Gas equal hash       : 87

  -----------------------

  Same for length 1024
  Gas equal:             3180
  Gas equal non aligned: 3567
  Gas equal hash       : 583

  Different first for length 1024
  Gas equal:             294
  Gas equal non aligned: 342
  Gas equal hash       : 583

  Different last for length 1024
  DIFFERENT ALIGNED AND NON ALIGNED!
  Gas equal:             3208
  Gas equal non aligned: 3567
  Gas equal hash       : 583

  Different length for length 1024
  Gas equal:             74
  Gas equal non aligned: 115
  Gas equal hash       : 87

  -----------------------

  Same for length 2048
  Gas equal:             6188
  Gas equal non aligned: 6959
  Gas equal hash       : 967

  Different first for length 2048
  Gas equal:             294
  Gas equal non aligned: 342
  Gas equal hash       : 967

  Different last for length 2048
  DIFFERENT ALIGNED AND NON ALIGNED!
  Gas equal:             6216
  Gas equal non aligned: 6959
  Gas equal hash       : 967

  Different length for length 2048
  Gas equal:             74
  Gas equal non aligned: 115
  Gas equal hash       : 87

  -----------------------

The runs marked as DIFFERENT ALIGNED AND NON ALIGNED! have equal and equal_nonAligned yielding different results. I think that regardless of switching to hashing, you should completely replace the equal function with equal_nonAlighed, the used algorithm just returns invalid values. Its not even a good teaching example, it's a bug, maybe the auditors will learn a common pitfall, but that's all. Keeping it as it is doesn't help the downstream, it leaves buggy code unpatched and makes the obvious choice wrong, being correct should not be the special case.

I mean, the normal function works as long as you use vanilla Solidity or don't use Yul to mess with the memory pointer manually. That was always its intended use case. In fact its first version was reviewed together with the compiler team.
I'm guessing only in situations where the array is non-aligned to 32-byte slots, you got the different values? If not, that actually is signalling a bug in one of the functions, and I'd love it if you could share the test code with me so I could debug.
I could consider changing the non-aligned function to become the main one, though, given we don't care about the gas savings.
Was I right about the above or should I be worried about a bug in the functions?

Also, please note this library is 7 years old and, again, I am terribly afraid of breaking shit downstream at this point. 🙏

share the test code with me so I could debug

It's the code I shared above, just run it and see which cases print DIFFERENT ALIGNED AND NON ALIGNED!. It seems that it happens when the arrays lengths are a multiple of 32, and the only difference between them is the last byte.

Sorry! 😅🙈 Completely ignored the “Source” tab. I’ll take a look! 🙏
Gonçalo Sá
|| twitter ( https://twitter.com/GNSPS )
||| website ( https://gnsps.com/ )
|||| book a meeting ( https://calendly.com/goncalo-sa/30min-1 )
On Thu, Apr 11 2024 at 9:52 AM, Igor Żuk < @.*** > wrote:

share the test code with me so I could debug

It's the code I shared above, just run it and see which cases print DIFFERENT
ALIGNED AND NON ALIGNED!. It seems that it happens when the arrays lengths
are a multiple of 32, and the only difference between them is the last
byte.
—
Reply to this email directly, view it on GitHub (
https://github.com/GNSPS/solidity-bytes-utils/issues/69#issuecomment-2049228138
) , or unsubscribe (
https://github.com/notifications/unsubscribe-auth/AA6SSFIE64YBUQB22PEXNLDY4ZFMPAVCNFSM6AAAAABF5QIPJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBZGIZDQMJTHA
).
You are receiving this because you commented. Message ID: <GNSPS/solidity-bytes-utils/issues/69/2049228138
@ github. com>

I found the bug. In equal_nonAligned numTailBytes should never be 0, for cases where it is, it should be set to 32. This is because endMinusWord always leaves 1-32 unchecked bytes, never 0.

To be honest, given my current span of attention for this being so thin, this was exactly why I merged this PR into a different function. I am actually happy I didn't merge or replace the normal equal function for this one like the contributor asked me to.
I need some proper time to review the bug and your proposal. But this is great, but I can't thank you enough for taking such a close look! 🙏

authors: CodeSandwich GNSPS

repo: GNSPS/solidity-bytes-utils

license: Unlicense