Revise approach to mutability of standard data structures

New - Plan for transition

Rename current Array type to ArrayList , List type to ImmutableList - (leave Dictionary as is)
Change from [ ] to { } for Immutable List
Allow ArrayList literals to be created using [ ]
Provide ArrayList with methods for add, remove - like a regular JS list
Add a ImmutableDictionary<K,V> type, with suitable methods
Make symbol table aware of whether each type is mutable or immutable (should also do this for all classes, if not already)
Implement rule that functions can accept only immutable types (including classes) as arguments
Implement rule that neither procedure nor function parameters may be set (re-assigned) (though for procedures they may be mutated via procedure methods, or (for ArrayList) by re-assigning an indexed value.
Provide type aliases e.g. [Int] for ArrayList<Int>, {Int}forImmutableList, [String, Int]` for Dictionary, and {String, Int} for ImmutableDictionary

Lists & Arrays
Change from current set up (mutable Array and immutable List) - to having a mutable array/list (like Python's) and and immutable list.

Create a mutable 'array/list' with all the capability of an array and a list, and implemented as a bog standard JavaScript list.

Literal form:  [a, b, c, d, e]
Type form:   [String] or [Int]  (in contrast to current forms of List<of String> or Array<of Int>
How to initialise an empty arrayList:   var a set to [string]
How to initialise an arrayList with a fixed number of empty values (for emulating old arrays): [string].size(5) or maybe even just [string](5)

Create an immutable list:

Literal form: {1,2,3,4,5}  note that (per #408) we will then stop using curly braces for anything else.
Type form:   {String} or {Int}
Dictionaries

mutable dictionary
Literal form: ["a":1, "b":3, "c":2]
Type form:  `[String:Int]

immutable dictionary
Literal form: {"a":1, "b":3, "c":2}
Type form:  `{String:Int}

Tuples
Are always immutable - as before.
Stack, Queue, Tree, Graph
Proposal is that these are all and only immutable. - as now These data structures are more advanced concepts anyway and it would be good to get pupils onto immutable data structures. There is the additional advantage that with dequeue and pop we don't run into the command-query separation issue. Both methods return a tuple consisting of the sought item and the revised data structure
The type-forms retain the current syntax for generics e.g.
Stack<of Int>
Graph<of Place, Int>

Limit all function parameters to immutable types only

ordinary value types
immutable versions of all standard data structures (per above)
immutable user-defined classes

Immutable types can hold references only to values or other immutable types
This applies to standard immutable data structures (per above) or to a user-defined immutable class
In neither a functions nor a procedure can you `set' (re-assign) a parameter (this would be compile error)
However in a procedure, if a parameter is a mutable reference type, you can mutate it:

If it is an ordinary list/array or dictionary by index e.g.
set p[0] to 3
By adding/removing from an ordinary list/dictionary
By calling procedure methods on the parameter

A constant may be set only with an immutable type

Currently waiting on RP to make decision concerning the type syntax & other issues


Support for python extra paths

Hi,
First of all, thanks for this extension - it's really helpful.
We have ran into a similar issue which I think can be fixed in a similar way.
The quick fix for imports always tries to import from the monorepo root.
We can workaround this by setting python.atuoComplete.extraPaths and python.analysis.extraPaths to contain each app folder but then it will suggest cross app imports.
So two questions

Have you ran into this and found a better solution?
If it is possible to handle this in the same way do you think it's within scope for this extension and would you welcome a PR or would it be better for it to be a separate extension?

Thanks

HI thanks for reaching out. I have to confess I don't fully understand the issue you are trying to resolve. Can you try to explain it in more detail? I'd also be happy to consider a PR, as long as it makes sense for what is a rather simple extension.

Hey Robert,
If we have a folder structure of mono/app1 and mono/app2 then VSCode tries to resolve all imports from the root, like from mono.app1.lib import foo but we actually want from app1.lib import foo.
We're new to using a mono repo so we might just be doing something wrong.
No harm done if I raise the PR and you decide against it then it's easy enough to take the PR and make a separate extension.

OK, if you do that then please also provide a minimal example that shows what you describe above. I wonder if you shouldn't be doing something like this instead: see libs in https://github.com/langchain-ai/langchain. This repo is intended more for having multiple virtualenvs hanging off the same root monorepo. Each of these can correspond to a package or a service that may inherit some dependencies from the parent (this is a nice feature of poetry) and have some dependencies of its own. Your example is more about relative imports and I think doing this in an automatic way could lead to confusion (e.g., picking up the wrong package if there are several of the same name at different levels). I would make this explicit in the project settings (as you appear to have done). WDYT?

Sorry, I don't think I've explained clearly.
It's not a relative import, the root of each app is app1 and app2 and the root of the repository is mono, so when VSCode tries to import as from mono.app1.lib import foo it errors at runtime.
We use docker and copy in from the app folder into the container so mono doesn't exist.
Though you're right it does seem a little confusing as VSCode would allow us to import across apps which would also fail at run time.
I think multi root workspaces partially helps here but that came with other issues (which I've forgotten).
I'm away from home for a few days but I'll take another look at the multi root workspace when I'm home and figure out which approaches come with which issues.

Sorry, not had time to look into this more.
It doesn't seem to be causing us any issues (so far...) so not too much of a priority.
I'll close this down and raise a PR if it becomes more of an issue for us 🙂
Thanks again for the extension.


Refactor: widen type parameter boundary to RuntypeBase

Related to #212. This will simplify type instanciation substantially.

Coverage increased (+0.001%) to 99.03% when pulling bf990876bfab5c2f8258dc9e6bd5558bb64197f2 on yuhr:refactor/simple-static-types into 2d56b9439cb588dd332f2032e20b8fa61f6b6359 on pelotom:master.

Oops, wrong branch.


Import Error: cannot import name 'GenericStorage'

Tried to use one of the both plotting example. Installed Oemof Version is 0.3.2 and oemof visio version is 0.0.1 on a windwos 10 computer. When executing both examples (oemof-examples/oemof_examples/oemof.solph/v0.3.x/plotting_examples/) storage_investment_plot.py and variable_chp_plot.py  the error code: Import Error: cannot import name 'GenericStorage' gets returned. Fixed the bug by adding in the ...\oemof_visio\energy_system_graph.py in line 28 .components.
Old:
from oemof.solph import GenericStorage
New (Fixed):
from oemof.solph.components import GenericStorage

I tried the same for the plots and got the same error.
but as you mentioned: Fixed the bug by adding in the ...\oemof_visio\energy_system_graph.py in line 28 .components.
The lib is still old and not fixed.
Could you help me out, please

Hey,
you just have to add in the code ...\oemof_visio\energy_system_graph.py in line 28: from oemof.solph import GenericStorage
to: from oemof.solph**.components** import GenericStorage and then it should work.

Hi,
I have tried but I could not able to edit site-packages.
is there a way to add in the code ?

I am using winpython environment. i have imported oemof_visio from github and am unable to do any changes.
i think, it has to be edited in github. which i pulled a request.
try:
from oemof.solph import GenericStorage
except ModuleNotFoundError:
GenericStorage = None

I guess, that's a problem with different versions of solph:

from oemof.solph import GenericStorage works in solph v0.4 but not in v0.3 and (upcoming) v0.5
from oemof.solph.components import GenericStorage works in all of these versions.

Thanks for https://github.com/oemof/oemof-visio/pull/8: As visio does not require a specific version, it should work with all of them.
PS: Is there a reason to use oemof v0.3 instead of oemof.solph v0.4?


Added 1.6.0 update

Added additional filtering and conditionally visible tabs for selected items.
Change(s):

Added formatting
Added Selection Tabs
Split date in separate fields
Fixed incorrect currency type

Reason for Change(s):

Added more granularity

Version Updated:

1.5.0 > 1.6.0

Testing Completed:

Tested in multiple workspaces

All looks good


Download CSV

Download CSV of the table.

Actually nevermind. I think a dependency for this would be persisting all the responses on the FE so the table collects them additively. Then you could download CSV. A Google Sheets integration wouldn't require that, just add row from extracted output. Needs prompt to enforce headers are matching. I've had pretty good luck dropping headers into the prompt, but not when I include the cells for context. Obviously you need OAuth, but with a Google Sheets integration, you could automatically generate schema from your Google Sheet.

Is cacheing responses in the table a worthy mission?


dynamically linked vs statically linked supported by mcsema

I found a very weird problem that mcsema just supports the dynamically-linked binary lift and it doesn't do for statically-linked binary. is it true?

Maybe. You can try adding an additional symbol file [1] that specifies names for things like _start, main, make sure that main is the --entrypoint, and possibly add stuff to the exclude list [2]. That might achieve the desired effect. Please respond back with progress, possibly a log from mcsema-disass.
[1] https://github.com/trailofbits/mcsema/blob/master/tools/mcsema_disass/ida7/get_cfg.py#L1548
[2] https://github.com/trailofbits/mcsema/blob/master/tools/mcsema_disass/ida7/get_cfg.py#L1362

I don't know how to add those additional symbol files

"--syms",
type=argparse.FileType('r'),
default=None,
help="File containing   pairs of symbols to pre-define."
what the symbols are? how to get the name and address of those symbols?
another thing is how to store   as a pair in file ? is there any delimiter between name and address?

exclude = set(["_start", "__libc_csu_fini", "__libc_csu_init", "main",
"__data_start", "__dso_handle", "_IO_stdin_used",
"_dl_relocate_static_pie"])
add stuff to the exclude list? most of programs starts with the function _start or main, if so, what else I should add to this exclude list?

The delimiter is likely a space, but you can confirm that by testing it or looking at the code that parses the file. You can look at the code in IDA or some other disassembler, and if you recognize something hasn't been named, e.g. main or _start, then you can add a line to the file with the address and name that you want to give that address.

Dear Peter, thanks for the previous feedback, I am working together with Wei, and our goal is to convert statically linked binaries to LLVM IR, modify them, and recompile them again to native (we start from x86 and we want to get x86 and ARM - we focus on 64bit only). This is connected to the Popcorn Linux project (popcornlinux.org). I am now able to run statically compiled binaries based on musl libc - I will upload the code on git soon. However, I am now stuck on another problem related to a reference to .bss from a .data section that is missed when lifting a cross-reference. The cross-referencing python code is emitting "!!! target_ea = 602010 item_size = 1" and the cross-reference is lost (at least this is my understanding). So, when you run the code the first argument to memcpy is a constant in the .data section that points to something that doesn't exist. The code below is enough to create the problem via dynamic linking. I am using IDA  version 7.2. Any suggestion about how to fix this? Thanks!
#include <stdio.h>
#include <string.h>
#define BUFSIZE 1024
#define UNGET 16
unsigned char buf[BUFSIZ+UNGET];
struct min {
char * buf;
unsigned long buf_size;
int fd;
};
struct min __stdout_FILE = {
.buf = buf, //+UNGET,
.buf_size = sizeof buf, //-UNGET,
.fd = 1
};
struct min * const __stdout = &__stdout_FILE ;
int main () {
char min_min[]="helloworld";
memcpy(__stdout->buf, min_min, 9);
printf("%s", __stdout->buf);
return 0;
}

@abarbala Thanks for the context. Can you provide your OS version and command line invocation used to produce the binary from that C code, as well as upload the binary that reporduces the problem?

Ubuntu 18.04.02 (kernel 4.18.0-15-generic)
gcc 7.3.0-27
gcc buf.c -o buf -std=c99
mcsema-disass --disassembler ~/ida-7.2/idat64 --os linux --arch amd64 --output buf.cfg --binary buf --entrypoint main --log_file buf.log
mcsema-lift-4.0 --os linux --arch amd64 --cfg buf.cfg --output buf.bc
remill-clang-4.0  -o buf.new buf.bc /usr/local/lib/libmcsema_rt64-4.0.a
./buf.new

Hi Peter,
attached is the binary file.
On Thu, Apr 18, 2019 at 8:39 PM Antonio Barbalace<EMAIL_ADDRESS>wrote:

Ubuntu 18.04.02 (kernel 4.18.0-15-generic)
gcc 7.3.0-27
gcc buf.c -o buf -std=c99
mcsema-disass --disassembler ~/ida-7.2/idat64 --os linux --arch amd64
--output buf.cfg --binary buf --entrypoint main --log_file buf.log
mcsema-lift-4.0 --os linux --arch amd64 --cfg buf.cfg --output buf.bc
remill-clang-4.0 -o buf.new buf.bc /usr/local/lib/libmcsema_rt64-4.0.a
./buf.new
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftrailofbits%2Fmcsema%2Fissues%2F543%23issuecomment-484732743&data=02|01|wwang88%40stevens.edu|fc701b81dc7b4831557608d6c45f8820|8d1a69ec03b54345ae21dad112f5fb4f|0|0|636912311920059124&sdata=Nj4h6koPX66zHzVqWZ0%2BBfEj7bI6Gu7rjPKV3rfh6Wc%3D&reserved=0,
or mute the thread
https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FALYHNJMUQ5YQXTFKYGBSSLLPREIFNANCNFSM4HFRZWAA&data=02|01|wwang88%40stevens.edu|fc701b81dc7b4831557608d6c45f8820|8d1a69ec03b54345ae21dad112f5fb4f|0|0|636912311920059124&sdata=iY3mMOXZVP931pi5lvVd%2Fsb%2Bshrr%2BNXxdzBlyfIMYKc%3D&reserved=0
.

Hi, I am not sure how to retrieve the binary, but it is quite possible that the binary gcc produced is by default position independent, therefore you may need to include --pie_mode flag when invoking mcsema_disass.

Hi Aiethel,
here is the output using --pie_mode
mcsema-disass --disassembler ~/ida-7.2/idat64 --pie_mode --os linux --arch amd64 --output buf.cfg --binary buf --entrypoint main --log_file buf.log
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/mcsema_disass-2.0-py2.7.egg/mcsema_disass/ida7/disass.py", line 77, in execute
cwd=os.path.dirname(file))
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '/home/antonio/ida-7.2/idat64 -B -S"/usr/local/lib/python2.7/dist-packages/mcsema_disass-2.0-py2.7.egg/mcsema_disass/ida7/get_cfg.py --output /home/antonio/remill-buf-test/buf.cfg --log_file /home/antonio/remill-buf-test/buf.log --arch amd64 --os linux --entrypoint main --pie_mode" /tmp/tmp479Z9j/buf' returned non-zero exit status 1
Generated an invalid (zero-sized) CFG. Please use the --log_file option to see an error log.
buf.new.zip

UPDATE With Chengbin Pang and Jun Xu (also Stevens) we verified that by changing one line of mcsema_disass/ida7/segment.py the demo program works correctly. Note that this helps my statically compiled framework based on musl libc to work. However, this doesn't sound the right way to go. Can you please advise?
===START patch===
--- ../remill/tools/mcsema/tools/mcsema_disass/ida7/segment.py	2019-04-17 09:31:55.072014778 -0400
+++ /usr/local/lib/python2.7/dist-packages/mcsema_disass-2.0-py2.7.egg/mcsema_disass/ida7/segment.py	2019-04-19 12:48:56.329774586 -0400
@@ -56,7 +56,7 @@
item_size = idc.get_item_size(ea)
DEBUG("!!! target_ea = {:x} item_size = {}".format(ea, item_size))

return 1 != item_size

return True #1 != item_size

def is_read_only_segment(ea):
seg_ea = idc.get_segm_start(ea)
===END patch===

I did some debugging. It looks like mcsema is not finding a reference from __stdout_FILE.buf to buf. The CFG recovery code (erroneously) interprets __stdout_FILE.buf as an integer.
When you open the compiled binary in IDA, it shows a proper reference from __stdout_FILE.buf to buf and idc.get_item_size returns the proper 8 byte size. I suspect the values are not populated for mcsema because it turns off auto-analysis.
Your fix works correctly because mcsema does a manual scan through the data section and detects that there is a qword that can be a reference, but the is_sane_reference_target call fails if the target size is 1. I am not exactly sure why that's there -- it seems perfectly reasonable to reference something of size 1.
While investigating this I also found a minor bug that I'll be making a PR on in a few minutes. I'm sure there is a good reason the check for targets of size 1 was put in, but I can't recall why and may need some input from @pgoodman or @kumarak .
My intuition is that your fix is fine.


No strong name for .NET Framework targets

Description
The library has no strong names and cannot be referenced from a Framework project.
Error/Exception Message
System.IO.FileLoadException
Expected Behavior
No exception.
Actual Behavior
Exception thrown.
Steps To Reproduce
Reference the NuGet package from a Framework project and use it.
Screenshots

Additional context/Comments/Notes/Rants
https://github.com/nissl-lab/npoi/pull/1135#issuecomment-1667826536

Oh sorry, just saw this. Despite repeatedly telling gmail to prioritize GitHub emails as important, they still filed in with the rest of my general inbox items most of the time.
Yeah, I can strongname and sign my assemblies for you. I just recently remarked to myself that I should probably be doing this for all my libraries now that some of them are getting popular or are the top library for a particular numerical type.
I will try and get that set up released today. ETA about 8PM mountain standard time.
Thank you for your interest in my library.

Oh, by the way, I was reading the pull request on the referenced library, NPOI, and wanted to know: Did you want/need me to also target net472 and netstandard2.0 with my library as well? This would be trivial to add.

net472 and netstandard2.0

It would be sufficient if the project targets .NET Standard 2.0, since 2.0 covers .NET Framework >=4.6.2 and .NET (Core) >=2.0

Topics

The Assembly is now Strong Named
ⓘ A Returning to Semantic Versioning
Updated NuGet Package Published
New Targeted Frameworks
⚠ Truncate Method Now Functionally Different

The Assembly is now Strong Named

The assembly is now strong named and available on NuGet as version <IP_ADDRESS>30.
Note: Nuget does not recognize the new version as being the latest package. See here for further discussion on this.
Because this is an open source project, as per Microsoft's recommendation, I checked in the identity/signing key so that further
versions can be strong named by others.
Note: This is not an issue, strong naming does not provide authenticity or anti-tampering  guarantees, only a unique identity that you can tie to when referencing it from a project.
I also didn't want to be the sole gatekeeper for strong naming releases, in the event I am suddenly abducted by aliens and never heard from again (or the proverbial hit-by-a-bus scenario, which ever you prefer).

A Returning to Semantic Versioning

Version numbering scheme has changed. We are returning to using semantic versioning.
I bumped the major version. We are at 2.0.0 now. Actually, version <IP_ADDRESS>30 to be exact.
The version based on the date was nice for me, but would be absolute hell for anyone using our library who wanted to know if a newer version introduced a breaking change or not.
Under the old scheme, the left most version number had zero correlation with whether the new version introduced breaking changes or not; it was the year of the date the assembly was built!
There will be no more of that nonsense going forward. Version numbers will adhere to semantic versioning guidelines.
I plan to make the same change for all my numeric libraries.

Updated NuGet Package Published

The updated assembly with the strong naming and changes mentioned here has been pushed to NuGet and is version <IP_ADDRESS>30.
Warning: Nuget is not currently showing this as the latest version, likely because 2 is smaller than 2023. Ill look into how to get nuget to recognize the new versioning scheme correctly. I can always deprecate all prior versions if it comes to it.
Until I figure it out, you'll need to select and install version <IP_ADDRESS>30 explicitly (not the latest version, according to NuGet).

New Targeted Frameworks

I added two new targeted frameworks:

net472
netstandard2.0

Truncate Method Now Functionally Different

Please take note, the BigDecimal.Truncate method is now functionally different due to a bug-fix:
The Truncate now behaves like Floor, as it should, instead of Round, which is wrong.
I hope you wern't relying on this incorrect behavior.


Handle min/max limits JavaScript

Need to investigate this, but we should toss errors when we exceed limits.
Needs to be handled in both float and integer parsing.
Likely needs to be done in conjunction with:

#69

Requires knowing when we run on Erlang and JavaScript. Limit Float and Int values in javascript. Write target-specific tests for both at the boundaries. Assert JavaScript throws error and Erlang does not.

Closed via: https://github.com/JosephTLyons/lenient_parse/pull/83


Fix render selection object in enums

Fixing the issue https://github.com/yiisoft/yii2/issues/19926

Would you please re-submit the pull request to https://github.com/yiisoft/yii2? Thanks.


[Provider Audit] provider.bluepeer.io

Hi,
I'd like to request that my provider is audited please.
Email Address<EMAIL_ADDRESS>Thanks,
Liam

Hi @Liam126126 :wave:
Looks like your provider is down:
$ ping provider.bluepeer.io
PING bluepeer.io (<IP_ADDRESS>) 56(84) bytes of data.
^C
--- bluepeer.io ping statistics ---
20 packets transmitted, 0 received, 100% packet loss, time 19334ms

Apologies, I'm currently rebuilding my provider. I should have it back up and running by the end of the week.
If it's ok, I will let you know when it's running again, so you can proceed with the audit.
Thanks,
Liam

From: Andrey Arapov @.>
Sent: 25 January 2024 20:01
To: akash-network/community @.>
Cc: Liam126126 @.>; Mention @.>
Subject: Re: [akash-network/community] [Provider Audit] provider.bluepeer.io (Issue #462)
Hi @Liam126126https://github.com/Liam126126 👋
Looks like your provider is down:
$ ping provider.bluepeer.io
PING bluepeer.io (<IP_ADDRESS>) 56(84) bytes of data.
^C
--- bluepeer.io ping statistics ---
20 packets transmitted, 0 received, 100% packet loss, time 19334ms
—
Reply to this email directly, view it on GitHubhttps://github.com/akash-network/community/issues/462#issuecomment-1910902959, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHWMRVTURFZ7ZMKAFDMZLFDYQK2Z5AVCNFSM6AAAAABCI7LL3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJQHEYDEOJVHE.
You are receiving this because you were mentioned.

@andy108369
I've got the provider up and running now.
Please let me know if you run into any other issues while auditing.
Thanks,
Liam

provider attributes signed!
tx id https://www.mintscan.io/akash/tx/8C71571B7DCAABD84AE59EE5763305C517C2D65D77D85C42B67BB0B541256AC4
audit log
$ provider_info.sh provider.bluepeer.io
provider.bluepeer.io  akash1864dl8nwyvmppzh09aq0xwr27mmpwxufknr0ry
type                  cpu                                           gpu  ram                 ephemeral           persistent
used                  0                                             0    0                   0                   0
pending               0                                             0    0                   0                   0
available             31.5                                          0    30.285743713378906<PHONE_NUMBER>3672132  0
node                  31.5                                          0    30.285743713378906<PHONE_NUMBER>3672132  N/A

$ provider-services query provider get akash1864dl8nwyvmppzh09aq0xwr27mmpwxufknr0ry -o text
attributes:
- key: organization
  value: bluepeer
- key: email
  value<EMAIL_ADDRESS>- key: host
  value: akash
- key: location-region
  value: eu-west
- key: location-type
  value: server-room
- key: capabilities/cpu
  value: intel
- key: capabilities/storage/3/class
  value: beta3
- key: capabilities/memory
  value: ddr5
- key: network-speed-up
  value: "1000"
- key: network-speed-down
  value: "1000"
- key: capabilities/storage/1/persistent
  value: "true"
- key: tier
  value: community
- key: arch
  value: amd64
host_uri: https://provider.bluepeer.io:8443
info:
  email: ""
  website: ""
owner: akash1864dl8nwyvmppzh09aq0xwr27mmpwxufknr0ry

attributes OK
provider bids (dseq 14730411)
lease-shell/events/logs OK
ingress & node ports OK
network speedtest OK

root@app-667d4fb5f5-v2zvk:~# speedtest
Retrieving speedtest.net configuration...
Testing from Secured Servers LLC (<IP_ADDRESS>)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Wightfibre Limited (Cowes) [7264.18 km]: 14.768 ms
Testing download speed................................................................................
Download: 832.65 Mbit/s
Testing upload speed......................................................................................................
Upload: 531.03 Mbit/s

disk test OK

root@app-667d4fb5f5-v2zvk:~# curl -sL yabs.sh | bash -s -- -ig
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
#              Yet-Another-Bench-Script              #
#                     v2024-01-01                    #
# https://github.com/masonr/yet-another-bench-script #
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #

Fri Jan 26 09:48:59 UTC 2024

Basic System Information:
---------------------------------
Uptime     : 0 days, 0 hours, 55 minutes
Processor  : Intel(R) Core(TM) i9-14900K
CPU cores  : 32 @ 3187.200 MHz
AES-NI     : ✔ Enabled
VM-x/AMD-V : ✔ Enabled
RAM        : 30.6 GiB
Swap       : 8.0 GiB
Disk       : 250.9 GiB
Distro     : Ubuntu 22.04.3 LTS
Kernel     : 5.15.0-92-generic
VM Type    :
IPv4/IPv6  : ✔ Online / ❌ Offline

IPv4 Network Information:
---------------------------------
ISP        : Digital Infrastructure Ltd
ASN        : AS211178 Digital Infrastructure LTD
Host       : Ipxo LLC
Location   : Shrewsbury, England (ENG)
Country    : United Kingdom

fio Disk Speed Tests (Mixed R/W 50/50) (Partition overlay):
---------------------------------
Block Size | 4k            (IOPS) | 64k           (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 509.08 MB/s (127.2k) | 3.70 GB/s    (57.8k)
Write      | 510.43 MB/s (127.6k) | 3.72 GB/s    (58.1k)
Total      | 1.01 GB/s   (254.8k) | 7.42 GB/s   (115.9k)
           |                      |
Block Size | 512k          (IOPS) | 1m            (IOPS)
  ------   | ---            ----  | ----           ----
Read       | 3.62 GB/s     (7.0k) | 5.11 GB/s     (4.9k)
Write      | 3.82 GB/s     (7.4k) | 5.45 GB/s     (5.3k)
Total      | 7.44 GB/s    (14.5k) | 10.56 GB/s   (10.3k)

YABS completed in 11 sec


The default pros project structure cann't appear in the vscode 1.79.2.

Does this issue occur when all extensions are disabled?: Yes/No
No

VS Code Version:  1.79.2
OS Version:  windows 10 22H2 19045.3086

Steps to Reproduce:

open the vscode with pros plugin installed
click the pros icon on the left side bar
click the Create Project on the pros side bar
use the default option in the guide
the project is created with nothing.
on the page: https://pros.cs.purdue.edu/v5/tutorials/walkthrough/clawbot.html
there is the following project structure:
project
│   project.pros        (used by PROS CLI to know kernel version and other metadata)
│   Makefile            (instructs make how to compile your project)
|   common.mk           (helper file for Makefile)
│
└───src                 (source files should go here)
│   │   main.cpp        (source for competition task functions, like operator control and autonomous)
|
└───include             (Header files should go in here)
│   │   api.h           (Lets source files know PROS API functions)
│   │   main.h          (Includes api.h and anything else you want to include project-wide)
|   └───pros            (Contains all of the specific header files for the PROS API functions)
|   └───okapi           (Contains all of the header files for OkapiLib)
|   └───display         (Contains all of the header files for LVGL, the graphics library for the V5 screen)
│
└───firmware
│   libpros.a       (Pre-compiled PROS library)
│   okapilib.a      (Pre-compiled OkapiLib library)
|   v5.ld           (Instructs the linker how to construct binaries for the V5)
how can I get the project stucture like above?
shall I connect the vex robotic before I create the project?

/causedByExtension

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines. If you don't know which extension is causing the problem, you can run Help: Start extension bisect from the command palette (F1) to help identify the problem extension.
Happy Coding!


Fast scroll bug on Android 5.1

There is a design bug on Android version 22. Fast scroll indicator looks weird (not like in contacts app).

This is weird. How do you think the fast scroller should be used on 5.1 ?
Has anything changed in this regard?

The design of the fast scroll hasn't changed in Contacts app on 5.1 so it should be the same I think.
I haven't seen setFastScrollStyle() yet but is was introduced in 21 so that might not be it.

@percicjan Yes, I have no idea what's going on. Please let me know if you find out the cause for this, and how to fix it.

@percicjan I've found why it happens : That's just how it is on Android 5.1 for ListView or any AdapterView.
However, I'm sure it's possible to use this library I've made to mimic how it looks like on the contacts app:
https://github.com/AndroidDeveloperLB/LollipopContactsRecyclerViewFastScroller


MonadShControl isn't exposed

The MonadShControl class is not exported, making it is essentially impossible to use verbosely, etc. if you have encapsulated your monad stack in a newtype.

Is this what you need? https://github.com/yesodweb/Shelly.hs/commit/2ab177fa778e8af9ca6f0894dc69e2dca71ad6f8

That ought to do it.


Travis fixes

Disabled using of AppDomains in tests. Looks like it much more stable without them.
Changed artifacts upload script - it is possible to configure upload folder name now, use build date suffix for uploaded artifacts to preserve artifacts of rerun.

With this change, I can configure uploading build artifacts to my Yandex.Drive (publicly accessible https://yadi.sk/d/YnPDF_zfkzAbH). @kg, are you OK for me to update SQ/JSIL Travis-CI configuration after this PR will be merged?

Yeah, sounds good. Thanks for knocking this out.

Some magic happens.
After removing of app domains I don't se any sgen faults anymore, but I nearly every build see incorrect encoding of JS console outputl. Our test treats JS output, that is really UTF8 as UTF16LE. Really, first symbol there is UTF16LE BOM. Probably it would be easy to detect in our test and decode it back. I've seen similar errors before several time, but not as often as it is happen without app domain usage :(

Added fix to correct encoding. Looks like it works stable enough

Updated Travis-CI settings, build artifacts are now accessible via https://yadi.sk/d/YnPDF_zfkzAbH
Really, it worse create some notes in wiki about different type of JSIL test-cases, how to run them, what CI we have and how can they be configured for fork.


'global_average_pooling2d_1' doesn't exist in 'DenseNet-BC-121-32-no-top.h5'

I try "model = DenseNetImageNet121((224,224,3),classes=5, weights='imagenet' ,include_top=False)" and I have downloaded the 'DenseNet-BC-121-32-no-top.h5', so 'model.load_weights( 'DenseNet-BC-121-32-no-top.h5')' is executed.
But the error raised as blowe :
KeyError: "Unable to open object (Object 'global_average_pooling2d_1' doesn't exist)"
Anaconda3,pythin3.6,in Win7.

Oh that's a slight bug. Ill take care of it in some time.

Fixed via 003c562cfd1bc4856cc00c23590705544dd65b74


Make Node examples package self-contained

This makes grpc install under the examples, instead of using the repo itself. This makes it easier to test installation and to use the examples.

LGTM


fix(versions): update Activiti/example-cloud-connector versions into master

UpdateBot pushed helm dependency: common to: 0.0.1

UpdateBot commands:
updatebot push-version --kind helm common 0.0.1

UpdateBot commands:
updatebot push-version --kind helm common 1.1.5


docs: add individual icon as favicon for each library

I faced an issue when bookmarking zustand library docs. see it's the default one of Pmndrs.docs. so, I can't figure out which link it is [check the screenshot below], then I thought it would be better to set the individual icon as favicon for each library docs. I couldn't find icons for react-three-fiber, a11y and react-postprocessing.
if you find this helpful, then feel free to merge it or leave feedback. thank you.

Thanks for looking out.


Create soft links instead of copies when installing stuff from the cache...

and rename cache to stage to avoid confusion.

Closing as done. Didn't rename though.


Anerdw: Blacklist money[\W_]*back[\W_]*from[\W_]*a[\W_]*wrong[\W_]*transaction

Anerdw requests the blacklist of the keyword money[\W_]*back[\W_]*from[\W_]*a[\W_]*wrong[\W_]*transaction. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

money[\W_]*back[\W_]*from[\W_]*a[\W_]*wrong[\W_]*transaction has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by Ryan M in Charcoal HQ


Feature: setting to disable cache source validation

In #116, a new feature MapperBuilder#warmup will be introduced, which allows projects to pre-generate cached class definitions within their CI pipeline.
In some projects, this might lead to the problem, that the pipeline is being executed on a different server and thus probably in a different location (path).
The current cache implementation provides an ability to verify if the cache is still "up2date". This is done by comparing the current filemtime of the cache-source file in combination with the timepoint of that moment, when the cache file was created/generated.
I'd like to propose a setting to disable that cache validation as (at least in our case) the source-code does not change when its deployed to production. Having some kind of filemtime check in non-production systems make absolutely sense and thus this validation should be enabled by default (as it was before).
Happy to get some feedback here.

Hi @boesing, thanks a lot for the contribution.
As stated in https://github.com/CuyZ/Valinor/issues/131#issuecomment-1133629748, I already thought about another way of dealing with caches and invalidation in general. I'll soon be submitting a patch to change the behavior, that will make this PR obsolete.
In the meantime I'll keep it open, and when the patch comes out I'd be pleased to have your feedback. 🙂

Hi @boesing, just submitted #132, could you take a look and give some feedback if needed?

Ah, sorry! I had a quick glance on what you changed in #132 and that totally suids my needs.
Closing this in favor of #132


Read and write files (To allow for more types of AI models in Ollama)

To my understanding it will seem Ollama can only support text chat based models and to my understand it could support more kinds of models by adding a reading files and writing files feature...

A way to have a model read one or more file on your system and be able to send it to the AI model to process.
A way for the AI model to return a file, by generating a file (Writing a file) onto the system and them being able to link it into the chat response.

To my understanding, this can allow Ollama to work with more model types such as text to image models, image to image models, text to audio models, audio to text models, audio to audio models, etc.

I'm realizing on rereading my response that I was not super clear. The API doesn't read the file per se, but you can pass images along in the request. In the API you can do that with:
curl http://localhost:11434/api/generate -d '{
  "model": "llama2",
  "prompt": "Why is the sky blue?",
  "images": [ ... <list of image data> ... ]
}'

Or you can do:
curl http://localhost:11434/api/chat -d '{
  "model": "llama2",
  "messages": [
    {
      "role": "user",
      "content": "why is the sky blue?",
      "images": [ ... <list of image data> ],
    }
  ]
}'

You can find more info in the docs.
I'm going to go ahead and close the issue, but feel free to keep commenting, or ask away in the discord.


only check deploy overcommited if no files are returned directly

part of simplifying the logic on the client side, when we have a direct response with the required files

going in a different direction


/bal username BTC returns 0 if GULD assets are equal to less than 1BTC

should return fractional amount instead up to 8 decimals

Fixed by adding commodity definitions with price formats.


Wrong Date type formatter for date 0001-01-01

Environment details
OS: Windows 10 64 bit
.NET version: .Net Framework 4.5
Package name and version:
Google.Cloud.BigQuery.V2.dll 1.2.0
Google.Api.Gax.Rest 2.5.0
Google.Apis.Bigquery.v2 <IP_ADDRESS>4
Google.Api.Gax 2.5.0
Google.Apis.Auth 1.36.1
Newtonsoft.Json <IP_ADDRESS>27
Google.Apis 1.36.1
Google.Apis.Core 1.36.1
Steps to reproduce

The following query is an example from BigQuery documentation:

SELECT NULL AS x, '' AS y, STRUCT(false AS a, DATE '0001-01-01' AS b) AS s

Running this query in console or with GetQueryResults method in API gives the json result:

[
{
"x": null,
"y": "",
"s": {
"a": "false",
"b": "1-01-01"
}
}
]

To convert string result to DateTime, the following converter is used by BigQueryRow:

private static readonly Func<string, DateTime> DateConverter = v => DateTime.ParseExact(v, "yyyy-MM-dd", CultureInfo.InvariantCulture);

This converter is however not valid for "1-01-01" string.

It still works fine for recent dates like '2017-01-01'. And I think, it did work before. So, perhaps from some point the server started to return "1-01-01" instead of "0001-01-01".

I'm pleased to say this has now been fixed server-side. Thank you so much for reporting it.


My Portfolio-Hacktober fest

I would like to add my portfolio

Hi there!
I am the Mentor of this project .
Although this repo is not part of Hacktoberfest 2024, we have some great alternatives for you. Welcome to SkillShow, a repository focused on skill enhancement!
Guidelines:
Please adhere to the existing guidelines.
No additional rules, thanks!
Check it out here: SkillShow.
Note: Start by creating an issue. Once it’s assigned to you, feel free to open a pull request (PR). Directly opening a PR will lead to an invalid label.
Looking forward to your contributions!


Update RuboCop and use children matching

Children matching was introduced in RuboCop 0.68.0.
This is a conservative update of RuboCop dependency to 0.68.1 (that has some minor bug fixes compared to 0.68.0).
A couple of our cops were updated to use children matching.
It allowed to convert iterations with that new pattern syntax, and reduce the amount of code.
Focus cop is intentionally left unchanged, there are improvements for it in #777 that are making use of the new syntax as well.
As per https://github.com/rubocop-hq/rubocop-rspec/pull/777#discussion_r311897354 and https://github.com/rubocop-hq/rubocop-rspec/pull/773#issuecomment-495966090.
It seems I just had a stroke of  syndrome.

Before submitting the PR make sure the following are checked:

[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[-] Added tests.
[-] Added an entry to the changelog if the new code introduces user-observable changes.
[x] The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

@bquorning @Darhazer @dgollahon Is there anything that needs to be addressed here?
Speaking of aggregate_failures?/aggregate_failures_present? - I would rather keep two very similar patterns in hope to collapse them into one in the moment of enlightenment rather than to build support code around an improperly collapsed one to work around the difference in its application.

Fixed CHANGELOG conflict.

@dgollahon Would you have time to review this PR?

@dgollahon Appreciate if you could take a look. Those changes are very similar to what you did in #777.


Rename PantherBrowser::inspect()

This function, when not running your tests in headless mode, pauses the test and allows you to view what's going on in the real browser. Ryan pointed out the name isn't great, some alternatives:

open()
pause() (might get mistaken for wait())
freeze()

Closed via e34c1bf1ce8d91e65b48bcc6aad7f3d1ffbf1905


Adding MedSAM2 to the model zoo

What changes are proposed in this pull request?
Adding MedSAM2 to the model ZOO by adding documentation to this PR by Evatt Harvey Salinger.
How is this patch tested? If it is not, please explain why.
Manually tested
Release Notes
Is this a user-facing change that should be mentioned in the release notes?

[ ] No. You can skip the rest of this section.
[x] Yes. Give a description of this change to be included in the release
notes for FiftyOne users.

This PR adds MedSAM2 to the FiftyOne Model Zoo. Detailed description in this PR.
What areas of FiftyOne does this PR affect?

[ ] App: FiftyOne application changes
[ ] Build: Build and test infrastructure changes
[ ] Core: Core fiftyone Python library changes
[x] Documentation: FiftyOne documentation changes
[x] Other: FiftyOne Zoo

I will rebase develop before merging :)


Added optional schema type information to the ModelElementType for duplicate names

Added optional schema type information to the ModelElementType (and its builder) as an option to differentiate elements which have the same name (eg. dmn-model InputData.class and InputDataReference.class).
In addition, added methods to the ModelImpl to find the ModelElementType instance based both the elements name and schema type.
This change is backward compatible with all existing code as the schema type information is optional. It should be added to elements which have the same name in the downstream projects (DMN, ...).
This addresses the issue found here: https://forum.camunda.org/t/query-dmn-model/5414 . It makes sure that not only lookups of elements by type (addressed and fixed as a side effect of #6 ), but also lookups of elements by ID (and potentially others) are processed and created correctly.

Hi @TFaga,
Thank you for your contribution.
I will look into your pull request and provide you some feedback next week.
Stay tuned!
Cheers
Tassilo

Hey @TFaga
I started looking into your contribution. I think there might be a simpler solution to this problem. I will continue with the analysis tomorrow and provide you with feedback (or a merge) asap. :)
Best,
Nikola

Hi @TFaga ,
I just finished reviewing your pull request. The idea is excelent, however, I think that by introducing a second Map in the ModelImpl class, a lot of data is being duplicated.
Instead of creating separate QName objects for the schemaTypes, I propose to add an additional (optional) schema field to the QName class and include it in the hash code generation method. This way we get different hash codes and different keys in the existing Map.
Would you be willing to refactor your code to implement this?
Best Regards,
Nikola

Hi @koevskinikola ,
Thanks for checking out the pull request. I agree, something like that would be better to reduce the amount of duplicate data. It was a proof of concept to see if it would work and I wanted to hear your feedback about the issue.
I'll refactor it and push it to this pull request.
Thanks!
Best regards,
Tilen

I've added the commit and it's indeed much better and simpler.

Hi @TFaga ,
Great! I just merged your pull request with the master.
Had to change some of the import statements, squashed your commits in a single one and updated the commit message.
Thank you for the contribution!
Cheers,
Nikola

Awesome, thanks!

Hey @TFaga ,
After merging your pull request, several tests in the CMMN Model started failing. More specifically:

shouldGetCaseRoles
shouldGetExpressionTextContent
shouldGetTaskInputsOutputs
shouldNotAbleToAddNewElement

Because of this, I had to revert the changes that you've made (b73b5f1). I'm really sorry about this development and I'm planning to look into what might be causing the failures. It would help if you had a look at it as well, since you might pinpoint the problem faster.
Best,
Nikola


delete hard-coded event types / guard

This file is a stop-gap for constraints: https://github.com/crosshatch/frame-metadata/blob/f4bcbccddc6c4a925410ba751b605c817db717c4/frame_metadata/Event.ts
Should likely be solved in another way / place.

Yes, but it's currently referenced in Tytrate. Will remove once we touch up Tytrate.


Stop tests from panicking and fix stale cache issue

Some changes here are to make the tests not panic. There is also in eris-mint.go a change to remove a stale cache bug.

@silasdavis can you git force this chance on eris-mint into a separate PR; then Im happy to review and merge the test fixes;  with regards to the erismint change, I want to hold a reservation; elaborate discussion and maybe we can even work on a unit test

"Tests part" looks good to me

LGTM, or FIPF


Unsupported parsing mode for /repo

The bot is unable to handle /repo, it can not parse MD format and display links in a readable text form.

fixed it :)


Interested in creating an interactive cycle tutorial

Hiya! I'm going to start building things with cycle as a way to get to know it. I had the idea that it would be fun and charmingly recursive to learn cycle by using it to build a slick interactive cycle tutorial.
I'll probably do this anyway, but it would be fun to have hope that maybe, one day, if it turns out well, it could be included in the cycle repo in the docs section. Would that be something you'd be open to @staltz?

Cool! Sounds like a plan, and I suppose there is still some space on the side menu in cyclejs docs site. Or maybe it could be under a "Try it" section like some sites have (if I recall correctly, kotlin lang has such thing online). Curious what you come up with. :)

Wonderful :100:

Oh wow, I hadn't seen the docs site yet!


Fix change_color_temperatures_() broadcasting error

This patch fixes change_color_temperatures_() crashing on
batches that do not contain exactly 1 or 3 images. #646

Codecov Report

Merging #650 into master will decrease coverage by 1.38%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #650      +/-   ##
==========================================
- Coverage   96.37%   94.99%   -1.38%
==========================================
  Files          41       41
  Lines       14683    14683
==========================================
- Hits        14150    13948     -202
- Misses        533      735     +202

@aleju Hi there, it seems that the latest release 0.4.0 is from before this fix (Feb 2020). Is it possible to cut a new release?


Service Worker in html5-routed web app

Hi everyone, i have a issue when navigating offline to https://example.com/an-html5-route it does not load the index.html.
I added the navigateFallback: '/index.html', but the page does not load and i don't have any service worker installed when i go to Application -> Service Workers.
$locationProvider.html5Mode(true).hashPrefix('!');
Everything works fine with https://example.com, even when offline.
Thanks.

Figuring out why there's no installed service worker is the most important thing, since if you don't have a service worker installed, there's no chance that there will be offline support.
Do you see anything logged in the JavaScript console when you navigate to a page that tries to install the service worker? Can you pass along a URL at which we can reproduce the issue?

You should provide some more information. Because I think example.com isn't where you're actually working on. So we can't inspect/debug it. Nowadays, I've been working with Service Worker API. I brought offline support to our React web application by using sw-precache. Could you share your service worker code?

Closing due to lack of follow-up from the original poster. Please reopen with the detail provided if this is still an issue.


Page continuously refreshes the page when I will create the database in the project folder.

I have used nedb for my data store in my electron APP. If I have set the path of database outside of my project folder then it works fine but if I have created database folder into project directory then it will continually refresh the page.
var Datastore = require('nedb');
var db = new Datastore({ filename: './data/test.db', autoload: true });
It continuously refreshes the page.

I had this same issue when using nedb. Among other reasons myself and another created TeDB. It also has an ElectronStorage driver as well. and Tedb-utils for extra methods if you need them.

Are you use any hot/live reloading package with your Electron app, e.g. electron-reload, electron-reloader, electron-connect, etc.? If so, you can probably configure it to ignore the NeDB files.

I have used "electron-reload". I want to ignore "data" folder from the reload.

Looks like you can exclude it using the ignored option, e.g.:
require('electron-reload')(__dirname, {
  electron: path.join(__dirname, 'node_modules', '.bin', 'electron'),
  hardResetMethod: 'exit',
  ignored: /node_modules|[\/\\]\.|data/
});


Fixed order of arguments to CreateHardLinkW

dst is where the link is created, src is what it points to.

@swift-ci please test and merge

@swift-ci please test macos platform and merge

@swift-ci please test macos platform

@millenomi looks like MacOS is still broken. Is it fine to merge without it in the mean time?


flutter error

Steps to Reproduce

Run flutter create bug.
Update the files as follows: ...
...

Expected results:
Actual results:

Logs

not solve

@Niazmuhammad12
can you provide your flutter doctor -v, your flutter run -v and a complete runnable minimal reproducible code sample

@Niazmuhammad12 ,
When opening an issue, please try to provide all or some of the information indicated in the template.

Issue Template
If you are looking for support, please check out our documentation
or consider asking a question on Stack Overflow:
- https://flutter.dev/
- https://api.flutter.dev/
- https://stackoverflow.com/questions/tagged/flutter?sort=frequent

If you have found a bug or if our documentation doesn't have an answer
to what you're looking for, then fill our the template below. Please read
our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports

Steps to Reproduce

Please tell us exactly how to reproduce the problem you are running into.

Please attach a small application (ideally just one main.dart file) that
reproduces the problem. You could use https://gist.github.com/ for this.

If the problem is with your application's rendering, then please attach
a screenshot and explain what the problem is.

1. ...
2. ...
3. ...

Please tell us which target platform(s) the problem occurs (Android / iOS / Web / macOS / Linux / Windows)
Which target OS version, for Web, browser, is the test system running?
Does the problem occur on emulator/simulator as well as on physical devices?

Target Platform:
Target OS version/browser:
Devices:

Run your application with `flutter run --verbose` and attach all the
log output below between the lines with the backticks. If there is an
exception, please see if the error message includes enough information
to explain how to solve the issue.

Run `flutter analyze` and attach any output of that command below.
If there are any analysis errors, try resolving them before filing this issue.

Finally, paste the output of running `flutter doctor -v` here.

Closing this issue, since no information has been provided.
Thank you.


createColumnsFromImportTest UT failed under JDK8

I tried to replace the openjdk6 to oraclejdk8 on my branch. Some UT failed:
https://travis-ci.org/jackyq2015/OpenRefine/jobs/48385702
It's related to the HashMap value iteration order in JDK8 is not historical. In JDK7, the values will be retrieved in the the same order that were inserted. But JDK8 doesn't guarantee this.
I think if we want to make sure of the order, we should use LinkedHashMap instead of HashMap even for JDK7:
http://docs.oracle.com/javase/7/docs/api/java/util/LinkedHashMap.html

Want to back this issue? Place a bounty on it! We accept bounties via Bountysource.

I fixed this one my fork, this is is the PR:
https://github.com/OpenRefine/OpenRefine/pull/937
Can someone review it and merge into trunk?

Hi Qi Cui.    I just haven't had a chance to review your PR between snowstorms, the Superbowl (winning!) and real work.  I'll get to it tomorrow.

Fixed by PR #937


RK4 unit-test for Luu doesn't pass with N different to zero

In GitLab by @cmastalli on Mar 12, 2019, 13:15
I have defined a general differential action LQR model in this PR !131, i.e.
$l(\mathbf{x},\mathbf{u})=\frac{1}{2}\begin{pmatrix}1 \\ \mathbf{x} \\ \mathbf{u}\end{pmatrix}^T \begin{pmatrix}0 & \mathbf{lx}^T & \mathbf{lu}^T \\ \mathbf{lx} & \mathbf{Lxx} & \mathbf{Lxu} \\ \mathbf{lu} & \mathbf{Lxu}^T & \mathbf{Luu}\end{pmatrix} \begin{pmatrix}1 \\ \mathbf{x} \\ \mathbf{u}\end{pmatrix}$
where

$\mathbf{lx}$ and $\mathbf{lu}$ describes the gradient of the quadratic cost, and
$\mathbf{Lxx}$, $\mathbf{Luu}$ and $\mathbf{Lxu}$ described the Hessian of the quadratic cost.

However when I defined $\mathbf{0}\leq\mathbf{Lxu}\neq\mathbf{0}$, then it's triggered an error in the comparison of $\mathbf{L_{uu}}$ against NumDiff (last line of test_rk4). See !131.
@proyan could you have look on it?

In GitLab by @proyan on Mar 12, 2019, 16:26
mentioned in merge request !138

In GitLab by @proyan on Mar 12, 2019, 16:37
Solved by !138

In GitLab by @proyan on Mar 12, 2019, 16:37
closed


do not use "copy" option , and more.

i like the program, some details may need improvement.
1,when i manually type to create a new note, it looks good. but when i copy something and paste it to create a new note (or edit a existing note), the interface of the application will change : the icon at the bottom of the screen will move to the middle. at this time, you can only exit the program and then reopen it to resume normal display. in short, do not use the "copy" option.
2,select something in view mode, it can only be copied, there are no other options. and cannot "select all" in view mode. if need to select all, must switch to edit mode.
3,first letter of the title automatically capitalized, which is not necessary.
4,in edit mode, there seems to be no keyboard space left in advance.when need to edit a long text, the keyboard will obscures the screen.
5,cannot save the backup password. when a manual backup is required, you need to re-enter the password every time.

1 - I see what you mean. I'll change that so there would be an option so it goes back to its normal display.
2 - Yeah, I'll have to fix that, didn't notice that until now.
3 - Will release an update soon with that fix.
4 - That's still an underlying issue in my part, I'm still trying to get it work.
5 - I'll see what I can do here.
Also thanks for using my project. More updates will be coming soon :>


Support for v8 nightlies

The KiCad v8 release candidates have started hitting git, and pcbnewTransition mis-recognizes them as v5.

This is being addressed by 7c8402f


iOS Exception: Could not load model at ...

Hi there,
First off, thanks for the hard work creating this package.
I am currently having some issues getting the package to run on iOS. I am currently loading both dynamic libraries libggml.dylib & libllama.dylib as such:
 Llama.libraryPath = "libllama.dylib";

The issue comes when trying to load a model like so:
 final model = 'ggml-vocab-gpt-2.gguf';

    final directory = await getApplicationDocumentsDirectory();
    final filePath = '${directory.path}/$model';

    final fileExists = await File(filePath).exists();
    if (!fileExists) {
      final byteData = await rootBundle.load('assets/ai/$model');
      final file = File(filePath);
      await file.writeAsBytes(byteData.buffer
          .asUint8List(byteData.offsetInBytes, byteData.lengthInBytes));
    }

    Llama llama = Llama(
      filePath,
      modelParams,
      contextParams,
      samplerParams,
    );

even doing it as a raw path:
 Llama llama = Llama(
      /Users/Luke/Workspace/llama.cpp/models/tinyllama-2-1b-miniguanaco.Q3_K_L.gguf,
      modelParams,
      contextParams,
      samplerParams,
    );

also does not work.
We are using the latest dev branch (commit hash 231a3e84f9e8b3e92470654af8b48f3811b4ec06).
Any help or guidance here would be greatly appreciated.
Error:
Could not load model XYZ
flutter: Error: LateInitializationError: Field 'context' has not been initialized.

Upon further debugging, here is a lovely xCode output:
llama_load_model_from_file: using device Metal (Apple A15 GPU) - 2727 MiB free
llama_model_loader: loaded meta data with 16 key-value pairs and 0 tensors from /var/mobile/Containers/Data/Application/C44C7A73-3C3E-4778-953F-B3F8412A71BF/Documents/ggml-vocab-gpt-2.gguf (version GGUF V3 (latest))
llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output.
llama_model_loader: - kv   0:                       general.architecture str              = gpt2
llama_model_loader: - kv   1:                               general.name str              = gpt-2
llama_model_loader: - kv   2:                           gpt2.block_count u32              = 12
llama_model_loader: - kv   3:                        gpt2.context_length u32              = 1024
llama_model_loader: - kv   4:                      gpt2.embedding_length u32              = 768
llama_model_loader: - kv   5:                   gpt2.feed_forward_length u32              = 3072
llama_model_loader: - kv   6:                  gpt2.attention.head_count u32              = 12
llama_model_loader: - kv   7:          gpt2.attention.layer_norm_epsilon f32              = 0.000010
llama_model_loader: - kv   8:                          general.file_type u32              = 1
llama_model_loader: - kv   9:                       tokenizer.ggml.model str              = gpt2
llama_model_loader: - kv  10:                         tokenizer.ggml.pre str              = gpt-2
llama_model_loader: - kv  11:                      tokenizer.ggml.tokens arr[str,50257]   = ["!", """, "#", "$", "%", "&", "'", ...
llama_model_loader: - kv  12:                  tokenizer.ggml.token_type arr[i32,50257]   = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
llama_model_loader: - kv  13:                      tokenizer.ggml.merges arr[str,50000]   = ["Ġ t", "Ġ a", "h e", "i n", "r e",...
llama_model_loader: - kv  14:                tokenizer.ggml.bos_token_id u32              = 50256
llama_model_loader: - kv  15:                tokenizer.ggml.eos_token_id u32              = 50256
llm_load_vocab: special tokens cache size = 1
llm_load_vocab: token to piece cache size = 0.3060 MB
llm_load_print_meta: format           = GGUF V3 (latest)
llm_load_print_meta: arch             = gpt2
llm_load_print_meta: vocab type       = BPE
llm_load_print_meta: n_vocab          = 50257
llm_load_print_meta: n_merges         = 50000
llm_load_print_meta: vocab_only       = 0
llm_load_print_meta: n_ctx_train      = 1024
llm_load_print_meta: n_embd           = 768
llm_load_print_meta: n_layer          = 12
llm_load_print_meta: n_head           = 12
llm_load_print_meta: n_head_kv        = 12
llm_load_print_meta: n_rot            = 64
llm_load_print_meta: n_swa            = 0
llm_load_print_meta: n_embd_head_k    = 64
llm_load_print_meta: n_embd_head_v    = 64
llm_load_print_meta: n_gqa            = 1
llm_load_print_meta: n_embd_k_gqa     = 768
llm_load_print_meta: n_embd_v_gqa     = 768
llm_load_print_meta: f_norm_eps       = 1.0e-05
llm_load_print_meta: f_norm_rms_eps   = 0.0e+00
llm_load_print_meta: f_clamp_kqv      = 0.0e+00
llm_load_print_meta: f_max_alibi_bias = 0.0e+00
llm_load_print_meta: f_logit_scale    = 0.0e+00
llm_load_print_meta: n_ff             = 3072
llm_load_print_meta: n_expert         = 0
llm_load_print_meta: n_expert_used    = 0
llm_load_print_meta: causal attn      = 1
llm_load_print_meta: pooling type     = 0
llm_load_print_meta: rope type        = -1
llm_load_print_meta: rope scaling     = linear
llm_load_print_meta: freq_base_train  = 10000.0
llm_load_print_meta: freq_scale_train = 1
llm_load_print_meta: n_ctx_orig_yarn  = 1024
llm_load_print_meta: rope_finetuned   = unknown
llm_load_print_meta: ssm_d_conv       = 0
llm_load_print_meta: ssm_d_inner      = 0
llm_load_print_meta: ssm_d_state      = 0
llm_load_print_meta: ssm_dt_rank      = 0
llm_load_print_meta: ssm_dt_b_c_rms   = 0
llm_load_print_meta: model type       = 0.1B
llm_load_print_meta: model ftype      = F16
llm_load_print_meta: model params     = 0.00 K
llm_load_print_meta: model size       = 0.00 MiB (nan BPW)
llm_load_print_meta: general.name     = gpt-2
llm_load_print_meta: BOS token        = 50256 '<|endoftext|>'
llm_load_print_meta: EOS token        = 50256 '<|endoftext|>'
llm_load_print_meta: EOT token        = 50256 '<|endoftext|>'
llm_load_print_meta: LF token         = 128 'Ä'
llm_load_print_meta: EOG token        = 50256 '<|endoftext|>'
llm_load_print_meta: max token length = 256
llm_load_tensors: ggml ctx size =    0.03 MiB
llama_model_load: error loading model: check_tensor_dims: tensor 'token_embd.weight' not found
llama_load_model_from_file: failed to load model

After even more investigation, it seems the model I was using was malformed. Using a new model, I now get the following errors:
/llama.cpp/src/llama-sampling.cpp:279: GGML_ASSERT(cur_p.selected >= 0 && cur_p.selected < (int32_t) cur_p.size) failed
Any idea on this?
Cheers!

Further updates, got past the above GGML_ASSERTS by modifying the model params and context params.
Hit another wall when it comes to encoding.
llama.cpp/src/llama.cpp:15342: GGML_ASSERT(n_outputs_enc > 0 && "call llama_encode() first") failed

Any ideas here?

@LukeMoody01 I could run tinyllama-2-1b-miniguanaco.Q3_K_L.gguf with script in example folder, both simple.dart and chat.dart --- could it be that your prompt is larger than context? I will try investigate
also thank you for trying dev

@LukeMoody01 please try again

Hey @netdur,
I will give it a go using the model you just mentioned! I was using a flan T5 model.
I am also using iOS as well.
I'll get back to you soon.

Alright, so it "works".
The AI likes to cut off its response very early, but I feel like that could be a config issue on my end. How do you usually allow the A.I to have lengthier responses? @netdur

thanks, in llama class, I have predict field  fixed at low value, this set
length of output, I will expose it
On Wed, Nov 27, 2024, 01:34 Luke Moody @.***> wrote:

Alright, so it "works".
The AI likes to cut off its response very early, but I feel like that
could be a config issue on my end. How do you usually allow the A.I to have
lengthier responses? @netdur https://github.com/netdur
—
Reply to this email directly, view it on GitHub
https://github.com/netdur/llama_cpp_dart/issues/44#issuecomment-2502344420,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAODX2PCSGHMZ6KXUZ7GIU32CUHSNAVCNFSM6AAAAABSPLDD46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBSGM2DINBSGA
.
You are receiving this because you were mentioned.Message ID:
@.***>

That'd be awesome. Great work @netdur 😄

Can I also ask, where do you find the models you test with? As some of the models I find on huggingface usually throw errors such as the ones above, and "GGML_ASSERT(strcmp(res->name, "result_output") == 0 && "missing result_output tensor")"

tested those models
https://huggingface.co/TheBloke/Tinyllama-2-1b-miniguanaco-GGUF/blob/main/tinyllama-2-1b-miniguanaco.Q3_K_L.gguf
https://huggingface.co/mradermacher/Qwen2-7B-Multilingual-RP-GGUF/blob/main/Qwen2-7B-Multilingual-RP.Q8_0.gguf
https://huggingface.co/MaziyarPanahi/gemma-7b-GGUF/blob/main/gemma-7b.Q8_0.gguf

@LukeMoody01 I am currently testing on ios, how do you build llama.cpp for ios?


Goto Next Error or Warning doesn't show up in F1 anymore

VSCode Version: Insider

@alexandrudima assigning to you since you do work in that area right now and the action looks ok for me.

@dbaeumer This works for me on master:
The precondition for the actions is EditorContextKeys.Writable. Are you trying this in a read-only editor?

@alexandrudima no readonly editor. Seeing this in the following build with the following file open:

@dbaeumer Agreed. I can reproduce in the built version of yesterday. Today's builds apparently failed.

Verified that the latest insiders build shows the two actions in the F1 list


helics-runner to set up and launch simulation

@kdheepak can you close this issue if you think this is sufficiently done

I think we have a good start at the moment. It still doesn't support multi machines, but we can add that in later.


Issues building on Win11 re: CMakeCUDACompilerId, Powershell, VSC

Prerequisites
Please answer the following questions for yourself before submitting an issue.

[ X] I am running the latest code. Development is very rapid so there are no tagged versions as of now.
[ X] I carefully followed the README.md.
[ X] I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
[X ] I reviewed the Discussions, and have a new bug or useful enhancement to share.

Expected Behavior
Attempting to install llama-cpp-python on Win11 and run it w/GPU enabled by using the following in powershell:
conda create --name Dingo python==3.9.19 pytorch torchvision torchaudio pytorch-cuda==11.8 -c pytorch -c nvidia -y
conda activate Dingo

$env:CMAKE_ARGS="-DLLAMA_CUDA=on"
$env:CUDATOOLKITDIR="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2"
$env:FORCE_CMAKE=1

pip install llama-cpp-python --no-cache-dir --force-reinstall --verbose

Current Behavior
Currently not able to build the wheel for llama-cpp-python - Log below. I have successfully progressed through other debugging steps (e.g. CUDA Toolkit not found) but this particular error revolving around CMAKE_DETERMINE_COMPILER_ID_BUILD has been a total bear.  Have shifted the relevant four Cuda files to the VSC repo, reinstalled vsc/cmake/gcc, and tried CUDA versions 11.7-11.8, 12.0, 12.2.
Environment and Context
winver -> Windows 11 23H2 (22631.3447)
conda --version -> conda 24.1.2
pip --version -> pip 23.3.1
python --version -> python 3.9.19
cmake --version -> cmake version 3.29.2
gcc --version -> gcc.exe (Rev3, Built by MSYS2 project) 13.2.0
nvidia-smi ->
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 536.25                 Driver Version: 536.25       CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                     TCC/WDDM  | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce RTX 3070 ...  WDDM  | 00000000:01:00.0  On |                  N/A |
| N/A   58C    P8              23W / 138W |    598MiB /  8192MiB |      4%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

Failure Logs
Building wheels for collected packages: llama-cpp-python
  Running command Building wheel for llama-cpp-python (pyproject.toml)
  *** scikit-build-core 0.9.1 using CMake 3.29.2 (wheel)
  *** Configuring CMake...
  2024-04-20 13:58:20,744 - scikit_build_core - WARNING - Can't find a Python library, got libdir=None, ldlibrary=None, multiarch=None, masd=None
  loading initial cache file C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeInit.txt
  -- Building for: Visual Studio 17 2022
  -- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
  -- The C compiler identification is MSVC 19.39.33523.0
  -- The CXX compiler identification is MSVC 19.39.33523.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.41.0.windows.3")
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
  -- Looking for pthread_create in pthreads
  -- Looking for pthread_create in pthreads - not found
  -- Looking for pthread_create in pthread
  -- Looking for pthread_create in pthread - not found
  -- Found Threads: TRUE
  -- Found CUDAToolkit: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.2/include (found version "12.2.91")
  -- CUDA found
  CMake Error at C:/Users/Thatsme/AppData/Local/Temp/pip-build-env-ufodkd12/normal/Lib/site-packages/cmake/data/share/cmake-3.29/Modules/CMakeDetermineCompilerId.cmake:814 (message):
    Compiling the CUDA compiler identification source file
    "CMakeCUDACompilerId.cu" failed.

    Compiler:

    Build flags:

    Id flags: --keep;--keep-dir;tmp -v

    The output was:

    1

    MSBuild version 17.9.8+b34f75857 for .NET Framework

    Build started 4/20/2024 1:58:28 PM.

    Project "C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
    on node 1 (default targets).

    PrepareForBuild:

      Creating directory "Debug\".

    C:\Program Files\Microsoft Visual
    Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5):
    warning MSB8029: The Intermediate directory or Output directory cannot
    reside under the Temporary directory as it could lead to issues with
    incremental build.  [C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CompilerIdCUDA.vcxproj]

      Structured output is enabled. The formatting of compiler diagnostics will reflect the error hierarchy. See https://aka.ms/cpp/structured-output for more details.
      Creating directory "Debug\CompilerIdCUDA.tlog\".

    InitializeBuildStatus:

      Creating "Debug\CompilerIdCUDA.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
      Touching "Debug\CompilerIdCUDA.tlog\unsuccessfulbuild".

    AddCudaCompileDeps:

      C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\cl.exe /E /nologo /showIncludes /TP /D__CUDACC__ /D__CUDACC_VER_MAJOR__=12 /D__CUDACC_VER_MINOR__=2 /D_MBCS /I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\include" /I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin" /I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\include" /I. /FIcuda_runtime.h /c "C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CMakeCUDACompilerId.cu"

    Project "C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
    (1) is building "C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
    (1:2) on node 1 (CudaBuildCore target(s)).

    CudaBuildCore:

      Compiling CUDA source file CMakeCUDACompilerId.cu...
      Creating directory "C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CompilerIdCUDA\x64\Debug".
      cmd.exe /C "C:\Users\Thatsme\AppData\Local\Temp\tmp3adc6f89e6574352bcb8d48d65baa9ff.cmd"
      "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin\nvcc.exe" -gencode=arch=compute_52,code=\"sm_52,compute_52\" --use-local-env -ccbin "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64" -x cu   -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\include"  -G   --keep-dir CompilerIdCUDA\x64\Debug  -maxrregcount=0   --machine 64 --compile -cudart static -v -g  -D_MBCS -Xcompiler "/EHsc /W0 /nologo /Od /FS /Zi /RTC1 /MDd " -Xcompiler "/FdDebug\vc143.pdb" -o "C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CompilerIdCUDA\x64\Debug\CMakeCUDACompilerId.cu.obj" "C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CMakeCUDACompilerId.cu"

      C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin\nvcc.exe" -gencode=arch=compute_52,code=\"sm_52,compute_52\" --use-local-env -ccbin "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64" -x cu   -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\include"  -G   --keep-dir CompilerIdCUDA\x64\Debug  -maxrregcount=0   --machine 64 --compile -cudart static -v -g  -D_MBCS -Xcompiler "/EHsc /W0 /nologo /Od /FS /Zi /RTC1 /MDd " -Xcompiler "/FdDebug\vc143.pdb" -o "C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CompilerIdCUDA\x64\Debug\CMakeCUDACompilerId.cu.obj" "C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CMakeCUDACompilerId.cu"

    C:\Program Files\Microsoft Visual
    Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA
    12.2.targets(799,9): error MSB3721: The command ""C:\Program Files\NVIDIA
    GPU Computing Toolkit\CUDA\v12.2\bin\nvcc.exe"
    -gencode=arch=compute_52,code=\"sm_52,compute_52\" --use-local-env -ccbin
    "C:\Program Files\Microsoft Visual
    Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64" -x cu
    -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\include"
    -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\include" -G
    --keep-dir CompilerIdCUDA\x64\Debug -maxrregcount=0 --machine 64 --compile
    -cudart static -v -g -D_MBCS -Xcompiler "/EHsc /W0 /nologo /Od /FS /Zi
    /RTC1 /MDd " -Xcompiler "/FdDebug\vc143.pdb" -o "C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CompilerIdCUDA\x64\Debug\CMakeCUDACompilerId.cu.obj"
    "C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CMakeCUDACompilerId.cu""
    exited with code 1.  [C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CompilerIdCUDA.vcxproj]

    Done Building Project "C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
    (CudaBuildCore target(s)) -- FAILED.

    Done Building Project "C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
    (default targets) -- FAILED.

    Build FAILED.

    "C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
    (default target) (1) ->

    (PrepareForBuild target) ->

      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CompilerIdCUDA.vcxproj]

    "C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
    (default target) (1) ->

    "C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CompilerIdCUDA.vcxproj"
    (CudaBuildCore target) (1:2) ->

    (CudaBuildCore target) ->

      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA 12.2.targets(799,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\bin\nvcc.exe" -gencode=arch=compute_52,code=\"sm_52,compute_52\" --use-local-env -ccbin "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64" -x cu   -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2\include"  -G   --keep-dir CompilerIdCUDA\x64\Debug  -maxrregcount=0   --machine 64 --compile -cudart static -v -g  -D_MBCS -Xcompiler "/EHsc /W0 /nologo /Od /FS /Zi /RTC1 /MDd " -Xcompiler "/FdDebug\vc143.pdb" -o "C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CompilerIdCUDA\x64\Debug\CMakeCUDACompilerId.cu.obj" "C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CMakeCUDACompilerId.cu"" exited with code 1. [C:\Users\Thatsme\AppData\Local\Temp\tmp8hlz1fed\build\CMakeFiles\3.29.2\CompilerIdCUDA\CompilerIdCUDA.vcxproj]

        1 Warning(s)
        1 Error(s)

    Time Elapsed 00:00:01.04

  Call Stack (most recent call first):
    C:/Users/Thatsme/AppData/Local/Temp/pip-build-env-ufodkd12/normal/Lib/site-packages/cmake/data/share/cmake-3.29/Modules/CMakeDetermineCompilerId.cmake:8 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
    C:/Users/Thatsme/AppData/Local/Temp/pip-build-env-ufodkd12/normal/Lib/site-packages/cmake/data/share/cmake-3.29/Modules/CMakeDetermineCompilerId.cmake:53 (__determine_compiler_id_test)
    C:/Users/Thatsme/AppData/Local/Temp/pip-build-env-ufodkd12/normal/Lib/site-packages/cmake/data/share/cmake-3.29/Modules/CMakeDetermineCUDACompiler.cmake:131 (CMAKE_DETERMINE_COMPILER_ID)
    vendor/llama.cpp/CMakeLists.txt:408 (enable_language)

  -- Configuring incomplete, errors occurred!

  *** CMake configuration failed
  error: subprocess-exited-with-error

  × Building wheel for llama-cpp-python (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: 'C:\Users\Thatsme\.conda\envs\Athena\python.exe' 'C:\Users\Thatsme\.conda\envs\Athena\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py' build_wheel 'C:\Users\Thatsme\AppData\Local\Temp\tmp6oisyidr'
  cwd: C:\Users\Thatsme\AppData\Local\Temp\pip-install-lax5oior\llama-cpp-python_fc76770a1f674cdebd8ede0dc231e448
  Building wheel for llama-cpp-python (pyproject.toml) ... error
  ERROR: Failed building wheel for llama-cpp-python
Failed to build llama-cpp-python

I managed to successfully solve this issue. While my debug ended up involved several changes, preventing a direct isolation of the underlying problem, I will touch on all of them.
Process:

I reset my windows install. To do this, go to Systems -> Recovery -> Reset this PC -> Keep My Files.
I installed Visual Studio installer, ran it, downloaded the modules that come with the extension "Desktop Development with C++", and nothing else.
I installed a fresh copy of Visual Studio Code system wide. This went under Program Files.
I recognized (per pytorch a quarter way down) that there were only two cuda versions supported for pytorch for CUDA acceleration, namely 11.8 and 12.1. As my CUDA toolkit install was wiped with the windows install, I installed CUDA 12.1 instead. I also changed my powershell process to reflect this, which I will list below.
I did not move the four files in NVIDIA GPU Computing Toolkit/CUDA/v12.1/extras/visual_studio_integration/MSBuildExtensions to Microsoft Visual Studio/2022/Community/MSBuild/Microsoft/VC/v170 - They were already there, which seemed to bode well.
I ran the powershell file listed below. It behaved, built, and I now have BLAS=1 when running my relevant code.

Potential underlying issues this solved:

I had previously reinstalled Visual Studio Code. While my first install was under Program Files (x86), my second install went under Program Files (x64), but there was a hanging folder in 86. The stack on the error log didn't indicate this hanging folder was used at all, mind you.
Again, the pytorch version. If there was one thing that ate me alive and was a solitary fix, it was this. 11.8 or 12.1, and use the verbiage described at pytorch to install pytorch (I will again have it listed below).

 I ended up finding the relevant file and realizing that the env vars were not used if I was building for Visual Studio (which I think ~everyone (iffy) on Windows has to). This issue was resolved without any changes to the stock arguments the repo recommends you pass (FORCE_CMAKE and CMAKE_ARGS).
Total skill issue on my end.

New file that successfully built:
conda create  --name Athena -y
conda activate Athena
Write-Host "Conda env Athena activated"

# env setup
# pytorch requires python > 3.8
conda install python==3.9.19 -y
# https://pytorch.org/ install of pytorch. Note you MUST use either cuda 11.8 or cuda 12.1
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia -y
$env:CMAKE_ARGS='-DLLAMA_CUBLAS=on' #note this is deprecated, should use LLAMA_CUDA but vestigial
$env:FORCE_CMAKE=1;

# pip installs
pip install llama-cpp-python --no-cache-dir --verbose

Is that the issue related to windows 11? I have intalled it successfully months ago on windows 10. Following the lateset version can't install the GPU version. #1393


speed change

Is there a way to change Gif Speed?
For example, change value of UISlider , gif speed changes.
I tried to change animationDuration.FLAnimatedImageView, but did not work well.

FLAnimatedImage doesn't support a way to alter the playback of a GIF. It would be trivial to expose an interface to tweak @property (nonatomic, strong, readonly) NSArray *delayTimes; but currently the design intents to honor the speed encoded in the original GIF file.
What's your use case?

Thank you for reply.
I want to see a GIF with slow speed or fast speed.
As it stands, will it be achieved to change @property(nonatomic,strong,reawrite) NSArray *delayTimes  or  @property(nonatomic,strong,reawrite) NSUInteger loopCount ??

Yeah, you can tinker with these properties (make them readwrite and assign new values etc.). I'm going to close this issue, as I don't plan to add support for this at the moment.
If you have any more questions on how to exactly implement certain details on this, StackOverflow would be great place to ask for specific coding help.
If you end up implementing a general solution that you feel good about, please don't hesitate to open a pull request and I'm happy to have a look at it.


x/net/trace: Proposal: Remove import side effects

Cross posting this issue from the mailing list (https://groups.google.com/forum/#!topic/golang-dev/IfEhzW_mmV4) in accordance with the contributing doc (I'm still unsure what the usual procedure is here; should I really be posting things in two places?):
Right now if you import the x/net/trace package you wind up with the
side effect that net/http's DefaultServeMux has handlers for
/debug/requests and /debug/events registered on it. The only mention
of this side effect in the docs is a somewhat unclear statement right
at the start:

Package trace implements tracing of requests and long-lived objects. It exports HTTP interfaces on /debug/requests and /debug/events.

To me, this was very confusing. I did not take that statement to mean
that the package implicitly registers the handlers, but that this was
behavior you could achieve with the package (eg. maybe there's a
RegisterHandlers function that registers those two handlers).
I've put in a CL to make the documentation clearer
(https://go-review.googlesource.com/#/c/22208/1) but I'd also like to
propose that this "feature" be removed.
Implicitly setting up the handlers on package import violates Go's
principal of least suprise; in my case, that was just a panic and a
few minutes of me starting blankly at a screen wondering how the
handler I was registering could already be registered, but in someone
elses case it could involve a route to their debugging info being
exposed to the public (because they only thought to put authorization
or authentication in front of the /trace route which is where they
explicitly exposed the trace handler after importing this package).
In the elegant words of one of my coworkers when we discovered this
behavior: "that is a pretty gross side effect".

There's a number of packages (including some in the standard library)
that register HTTP interfaces by default, and that happens via
net/http.DefaultServeMux. x/net/trace is following the same pattern.
Auth shouldn't be a problem if people are unaware. The default
configuration of that package will only serve those interfaces to
requests coming from the same machine; you have to go out of your way
to expose it to the public.

There's a number of packages (including some in the standard library) that register HTTP interfaces by default

A quick greap for http.Handle( and http.HandleFunc( only showed a few things, all under the http/ tree. This feels a bit less suprising to me (though still not ideal) since they were in the same package.

The default configuration of that package will only serve those interfaces to
requests coming from the same machine

Ah yes, I missed that; that's much much better, but it still feels like this would be much better off being something that I as an API consumer have to enable explicitly. Anything that modifies my servers behavior, I probably want to know about. We don't know how users machines are set up, or how they're running their infrastructure, for all we know access to those methods from the same machine is still a problem (maybe there's sensative info in those logs that not all devs get access too and only ops can see? It's a contrived and vague example, but I think the point still stands).

expvar exports on /debug/vars by default too.
If you're in a truly paranoid situation, you can always set up your own http.ServeMux. Remember that you won't get any of this doing anything unless you call something like http.ListenAndServe.
The issue with having to enable it explicitly is that it's the kind of debugging endpoint you want to have present by default. It's annoying to have to load up your func main() with a whole lot of setup things, and if you're getting x/net/trace in your program it's because something is trying to expose information through it (e.g. grpc-go) presumably because that information is useful to be able to access.
I think this is a massive convenience, and a pretty minor risk in practice.

expvar exports on /debug/vars by default too.

Ah, yup, didn't see that. I'm not a huge fan of it there either, but that's in the standard library so there's no changing it. At least it's very clearly documented in that case. I'll grant you that this does establish prescident, but just because something else was done this way before it doesn't make it a good idea or mean we should keep doing it this way in the future.

If you're in a truly paranoid situation, you can always set up your own http.ServeMux

You could do that, but the point is that you have to know to do that and this violates the principal of least suprise. Most users won't expect a package to register http handlers just by being imported [citation needed].
A small bit of setup in main (or wherever you're doing your HTTP setup) does not feel inconvenient to me, it feels explicit and readable; it makes it immediately obvious what's happening (whereas otherwise there is no indication from reading a snippet of code that these handlers are being registered).

This feels similarly annoying to when packages register flags in the global flagset as an import side effect. Explicit is better than implicit.

If you want explicitness, don't use DefaultServeMux. Once you use it, you're already in implicit-land. (And the whole point of that variable is convenience. Better to go all the way, rather than "sort of a little bit more convenient, but not really".)

Multiple suggestions here:

library writers: simply export the handlers instead of registering them
application writers: insert http.DefaultServeMux at any convenient point in your router chain.

So it's been a few days and comments have trailed off. Who generally arbitrates / decides final behavior in disputes about packages in the x/ tree?

This package was originally written by @dsymonds and he seems OK with the current behavior.  Assuming it is documented correctly I'm not sure there is any change to make here.

Oh, I didn't realize that; yah, fair enough. It still feels poor to me, and I don't fully understand ownership in the x/ tree, but if it's original-author's-call I suppose I don't really have anything else to say that I haven't already said to try and convince him.
If this were ever merged into the standard library I'd certainly want to bring this up again though; it doesn't feel like appropriate behavior to me (and still needs to be better documented).
Thanks for the discussion all.

I know I was overruled on this, but I'd like to bring it up again. I'm not having an issue where I'm trying to build an application that imports a vendored version of trace, and also imports a (not-vendored because it's in the same repo using the "repo root is a library with a cmd subdirectory that imports that library" pattern) library that imports trace itself. This causes a panic because both versions of trace call init() and try to register the handler. This seems like a very solid reason not to have this sort of implicit behavior; it leads to unexpected things happening that will just confuse users. Since applications should vendor, and libraries should not, this doesn't seem like that difficult of a situation to get into.
ML discussion in case I'm missing an obvious solution is here: https://groups.google.com/forum/#!topic/golang-nuts/J9BZwJfLnXI
/cc @dsymonds @bradfitz

I have no expressed an opinion in this thread and don't wish to do so, but I was summoned so I'll reply to this part:

Since applications should vendor, and libraries should not, this doesn't seem like that difficult of a situation to get into.

How do you get to that conclusion? If an application vendors two version of net/trace and it blows up, the application can fix their vendoring config and move on.

have not expressed an opinion in this thread and don't wish to do so

Oops, sorry about that; not sure who i was trying to CC there.

If an application vendors two version of net/trace and it blows up, the application can fix their vendoring config and move on.

In this case the application is not vendoring two versions of net/trace; the application is vendering 1 version, and the library that provides the applications core functionality is not vendoring (and not vendored by the application since it's part of the contract that the application will always be up to date with the library that provides its core functionality).
I suppose one could argue that this is really a problem with vendoring, and not net/trace (if you don't vendor everything you'll run into problems), but it still seems foolish to put things that could panic like this in the init() method of a library; it violates the principle of least suprise (although thankfully in this case it does so loudly, so it's not likely to sneak into prod).

Yeah, I suppose you should vendor everything or nothing.


Feature request to suppress output header when no validations to report

A request from a customer:
"Currently the schema validation outputs blank entries for tables matching (with --filter-status=fail). Is it possible to suppress the table outputs in such cases?"
This would apply to all validation types. The customer is redirecting results to CSV and not storing them in BigQuery.
I've raised this on their behalf but we would need to think carefully about how this might effect other users or general usability.

Related to this, another inconvenience around CSV headers is if we validate multiple tables in the same command and redirect the output to a CSV file then we get the header multiple times, part way through the file.
Ideally we would output the CSV header for the first run id and not for subsequent run ids.


Don't display org creation option in apply flow

I just supported a user who went down the wrong path and got stuck and I think we should close that specific path.
We often send people directly to opencollective.com/opensource/apply if they are trying to create a new Collective, or they end the flow by clicking the 'apply' button on the Host page.
If they are a completely new user, they first are asked to create their account, which is fine, but it goes like this:

Go to opencollective.com/opensource/apply
Get directed to create an account
See options for individual or organization registration
Think "I'm here representing my group trying to create a Collective, so I'll click organization"
Register, creating both their individual profile and their org profile
Get magic link login from email and click through back to OC
Continue Collective creation flow
End up with both an Org and a Collective for the project
Be confused

OR
6. Get magic link and do not bother to go to email and get logged in
7. End up with an Org profile only and fail to create a Collective or apply to the Host as intended (what happened in this case)
8. Be confused
I think if someone is entering the flow via applying to a Host, we should only show them the individual user registration option, because registering an Org at this point is not the correct step.

Alternative, people should be able to "Create a Collective + Apply" and "Sign Up" in the same form. I think that would be the best experience.

We updated the collective creation last sprint following the discussion described here #4256
I agree with @znarf and did the corresponding adequations to the Figma file that @Betree and I used to implement https://github.com/opencollective/opencollective-frontend/pull/5555

I've opened a quick fix in https://github.com/opencollective/opencollective-frontend/pull/7129 that hides the Create Organization Profile tab in the create collective flow (/create) and apply flow (/:host/create). If that works for everyone, I'll merge it and will create a separate issue for https://github.com/opencollective/opencollective/issues/4459#issuecomment-897191848: Combined sign up + apply form.

That works for me @Betree we can follow up later for a long term solution


Prevent concurent snapshot and snapshot expiry for a volume

Closes #9558

This pull request didn't trigger Jenkins as its author isn't in the whitelist.
An organization member must perform one of the following:

To have this branch tested by Jenkins, use the "ok to test" command.
To have a one time test done, use the "test this please" command.

Those commands are simple Github comments of the format: "jenkins: COMMAND"

@tomponline Yeah, I misunderstood this. Thanks for clarification.
So I've made PoC with removing snapshots in pruneExpiredContainerSnapshotsTask based on additional map with snapshots being removed and moved this PR to draft. If this approach is fine maybe we should do something similar for:
pruneExpireCustomVolumeSnapshotsTask
autoCreateContainerSnapshotsTask
autoCreateCustomVolumeSnapshotsTask
What do you think about it?

@tomponline Great, thanks!
What do you think about implementing same solution (with map) also for this tasks:
pruneExpireCustomVolumeSnapshotsTask autoCreateContainerSnapshotsTask autoCreateCustomVolumeSnapshotsTask
as this ones are also responsible for creating/pruning snapshots. Then we could remove solution with locking from CreateInstanceSnapshot and have one consistent solution in all places.

Its an attractive idea for sure. However based on @stgraber comment:

for taking snapshots, I don't think we should skip, but for the expiry we definitely can skip as they'll be handled later on.

https://github.com/lxc/lxd/issues/9558#issuecomment-975889261
We wouldn't want to skip if the lock was present on creation.
Also it is possible for snapshots to be taken manually so if the lock was only in the scheduled code path it wouldn't protect manual snapshot creation requests.
Instead if we add the locking to the storage backend, then the scheduler will attempt to create/remove the first time, and if the create is blocked, the next time the scheduler runs it too will be blocked until the snapshot is created. But for the pruning code path, if there is already a prune in progress it will just skip.

@tomponline oh, that's right. Forgot about this @stgraber comment.
but what about pruneExpireCustomVolumeSnapshotsTask?

@tomponline oh, that's right. Forgot about this @stgraber comment.
but what about pruneExpireCustomVolumeSnapshotsTask?

Yes that should have skip locking the same as the other prune task.

@tomponline
I've modified last solution a little bit. First of all I've added new PruneLock struct to reduce code duplication because we need to have this kind of lock in two places right now. Also I've added some logic to remove items from PruneLock map when something goes wrong.

jenkins: please test this

jenkins: test this please