Just curious to what extent SKILL has "kept up with the times". Along the lines of python and pandas where it is possible and encouraged to perform operations on vectors, does SKILL offer similar support?
geGetSelSet() does not return an array of points, it returns a list (technically a singly linked list) of the currently selected figures. A "figure" in turn has a bounding box that is defined in terms of a lower left and an upper right point.If you want for example the x-coordinates of the lower left points of all selected figures you need to go like this:
creates an array (named vector) with one 100 elements which provides true random access to it's elements in terms of an index. It is important to understand the difference between lists and arrays, like I said a list in SKILL is a linked list where each element has a pointer to the next element in the list. So to get to an element somewhere in the middle you need to iterate over the list element by element - this can slow down the performance of a SKILL script if you deal with very long lists.
The idea is that mapcar iterates over the list(s) and then calls the function given as the first argument with the corresponding element of each list (one or more lists). If there is one list, it passes one argument to the function; if there were 10 lists, it would pass 10 arguments and so on.
So it's not really a matter of SKILL keeping up with the times here - these have always existed in SKILL. Sure it's different from Python, but then again all languages are different. In fact Python has a number of concepts which have been inspired by LISP - and we have (here and there) added features to SKILL which were inspired by Python!
Just out of curiousity, it seems like most kinds of operations done to the vectors (to certain extend String too) are in place instead of returning new a new instance. is there a way to always return a new instance for sorting, deduping etc.?
actually just surprised to find out most operations involves mutating state in place, so am wondering if this is by design. For instance in other languages you can concatenate two lists to generate a new one, instead of changing one of them, or create a new string by concatenating two strings together, removing an element from list returns a new list without the element, and so on.
For collections the combination of shared+mutable data is problematic. Some languages avoid this problem by forbidding mutation (shared+immutable), but Rust can also solve this problem by forbidding sharing instead (owned+mutable).
It's not necessarily better, but the mutating ones are often the core primitives because they can avoid allocations more often. (If you're used to things like Java/C#, Rust's String is more like C#'s StringBuilder -- which is also preferred over repeatedly adding C# strings together because it can better amortize allocation costs.)
Another reason is that many things work on slices instead of mutable objects. For things like "I want to sort the first 10 elements of this vector", it's way easier to v[..10].sort_unstable() instead of splitting it, sorting one of them, and joining back together -- in addition to needing no allocations instead of potentially 4 if all those operations made new copies.
You definitely want to check out iterators for most cases of "do stuff to a collection without modifying the original", as it can often stream things together nicely and only .collect() into a collection at the end. For things like sorting, which aren't offered streaming, consider things like IterTools::sorted that encapsulates the collect-then-sort-then-return-it steps.
Furthermore, it appears that the specialized dialects (e.g. x86vector, arm_neon) only contain operations that are not already part of the general-purpose vector dialect. Which seems to mean that lowering from vector goes directly to LLVM. Is this the case? If yes, where can I find documentation on what vector extensions are implemented in LLVM?
Please note that even here our first approach should be to try to keep the vector dialect as architectural-neutral as possible (for example, by passing generic data rearranging intrinsics to the backend and relying on LLVM to eventually pick the best shuffle/unpack sequence for a particular target platform).
our first approach should be to try to keep the vector dialect as architectural-neutral as possible (for example, by passing generic data rearranging intrinsics to the backend and relying on LLVM to eventually pick the best shuffle/unpack sequence for a particular target platform).
My assumption was that MLIR can provide the general vector constructs (which are always quite simple), and then let back-ends implement one or another, and smart lowering engines choose them, possibly automatically
(but you have to be able to express the palette of transformations).
Of course! I am very glad you already found some architectural-neutral ops that bring you closer to a solution, but you may be right that peak performance can only be obtained by introducing a few architectural-specific ops (and please feel free to do so, we have done that ourselves several times when we thought it was necessary). I would like to see your examples and learn from them!
So, what I'm trying to do is use the boolean operations to cut out a section of a shape with a vector brush tool/ pencil tool/ pen tool. However, what's being cut out of the shape is the "fill" of the brush shape. So, if you draw a curve and set its fill to a colour, it will "fill in" from the curve's starting point to endpoint.
And that is not what I'm trying to do. I just want to cut out the shape of the actual brushstroke. Is this possible or am I just going about it the wrong way?
I've attached a simplified image that basically visualises what I've written so you might be able to better understand what I'm trying to do and formulate.
*edit: so the blue and purple line illustrates what's happening while the green line is the thing I actually want to cut out. If possible, the ideal scenario would be that the green that is within the red circle would be cut out or would become its own shape while leaving the outside parts unchanged.
Geometric shapes are provided in AD. These can be converted to curves, lines with adjustable nodes, allowing the shape to be altered. A stroke made with pen, brush or pencil is a central line with fill around it. The layer will have a label saying curve. Expanding the stroke further defines the shape, resulting in a line of nodes surrounding the outside of the original line, allowing it to be further modified. You can see in the attached pics.
The CAF has the unique ability to rapidly deploy anywhere in Canada to offer assistance to communities in need. This assistance complements and enhances federal, provincial and local resources with well-trained military personnel and specialized equipment.
The CAF is ready to respond wherever and whenever the government needs us to help protect Canadians. The Defence Team has been, is, and will continue to be, part of the national response to help minimize the impacts of the COVID-19 pandemic.
The planning for and distribution of COVID-19 vaccines is logistically complex given the geography of the country, requirements for ultra-cold storage, distribution to remote and isolated communities, and coordination between various levels of government. To this challenge, the CAF brings an array of experience and logistical expertise that enhances federal logistic planning and operations.
To ensure that the CAF is fully poised and prepared to support this effort, we have laid the groundwork to have people and equipment available to support delivery of the vaccine, if required, under CAF Operation VECTOR.
As part of that planning, and in anticipation of requests for CAF assistance, select CAF personnel across the country have been conducting specific, tailored training so as to be ready to provide assistance as rapidly as circumstances permit. This training is in place to ensure that CAF personnel participating in the fight against COVID-19 are adequately prepared to overcome the challenges they may face.
We have also assigned military liaison officers for each province and territory, who are acting as a liaison for the logistics of the vaccine roll-out. They are in constant communication with their provincial counterparts to ensure close coordination and cohesion of efforts. Their roles will be further developed as planning progresses and the CAF role is further refined.
Following the acceptance of the request for assistance from the Government of Quebec by the Minister of National Defense and the Chief of the Defense Staff on December 31, 2021, the Canadian Armed Forces were tasked to support the provincial vaccination campaign for the 3rd dose of the COVID-19 vaccine. The last day this assistance was required was February 15, 2022.
In response to a request for assistance (RFA), six Canadian Rangers were engaged to assist the residents of Tuktoyaktuk, Nunavut. Tasks include logistical and general support, distribution of food and supplies, and distribution of information related to pandemic response. This RFA was approved November 16, 2021 and ended on December 5, 2021.
In response to a request for assistance from Province of Nova Scotia, the Canadian Armed Forces (CAF) will provide 25 CAF members to assist with vaccinating members of the public in the Halifax Regional Municipality (HRM) as part of the local public health vaccination program. Beginning on 21 June, CAF personnel will assist provincial authorities with tasks associated with the administration of the COVID-19 vaccine including:
From January 26 to April 30, 2021, in response to a Request for Assistance (RFA) to support the Government of Ontario and ORNGE partners with the delivery of the first doses of the COVID-19 vaccine to 32 communities of the Nishnawbe Aski Nation in Northern Ontario, Canadian Rangers from those communities, and additional CAF personnel assisted provincial vaccination authorities with tasks associated with vaccine administration. These tasks included:
3a8082e126