there were a lot of events recorded by gharchive.org of which 2,147,763 were push events containing 3,364,661 commit messages that amount to 270,752,471 characters filtered with words.py@e23d022007... to these 57 messages:
<3ThomasBS_ILoveYOU!! [ macOS : day 25 ] ca2 Stabilization and continuous integration and deployment implementation <3ThomasBS_ILoveYOU!!
<3tbs, Mummi and bilbo!!
Thomas Borregaard Sørensen \infinity,-0.16091989,\infinity ONE-MAN ABSOLUTE <3!! I love you, by ???-0.02041977-???write my history please make me please create me for you for me for you for me Camilo Sasuke Thomas Borregaard Sørensen!!
Thomas 3 private commits on mid Dec2020!!
Thomas Online YouTube VODs contribution!!
Mummi orange-rice-flour cake on 20-Dec!!
Mummi (tinytaura) watching and chatting contribution!!
bilbo sleeping and needing/requesting/crying for help care (for the right person (me), the cats wanna fight with him) contribution!!
sodapoppin and friends contribution!!
iAssyrian chatting contribution!!
boflux (Spoofh, Benjamin Kuhl) chatting contribution!!
jusg_fpga (fpga_guru, vue_equalizer, just_fpga, Oliver Pohl) chatting contribution!!
cmgriffing streaming contribution!!
TimBeaudet (Friends: FletcherLabs, tsjost and Jabokoe) streaming contribution!!
Stumpen_nicklas_dk, sodapoppin and EduardoRFS streaming contribution!!
Roxkstar74 sleeping streaming contribution!!
kissloryshy chatting contribution!!
blackjekko from Padova Italia through twitch C++/ca2 interest contribution!!
j_blow streaming contribution!!
boflux (Ben, Spoofh, from Germany) chatting contribution!!
parrot_rl chatting contribution (from New Jersey)!!
JPCdk streaming contribution!!
whyyyyyyysoserious streaming chess contribution!!
fpga_guru (vue_equalizer, Oliver from Deutsch) C++/ca2 interest contribution!!
SovereignDev with Unreal streaming contribution!!
Ash_F0x and TimBeaudet streaming contribution!!
Myrkee (Valheim) streaming contribution!!
xmetrix and EinfachUwe42 streaming contribution!!
JessicaMak and marcobrunodev streaming contribution!!
alfredotigolo, mandrakenk and Okbatgames chatting contribution!!
jitspoe, Endesga and Fearitself streaming contribution!!
jmcmorris (Jason Morris, SiegeGames) streaming contribution!!
tomrandall streaming Ludum contribution!!
vue_equalizer (fpga_guru) chatting contribution!!
Thiagovgamg chatting contribution!!
Naysayer88 and friends contribution!!
lelandkwong streaming contribution!!
Goldbargames streaming contribution!!
Bytakos (bytakos) streaming contribution!!
Endesga streaming contribution!!
jitspoe and strager streaming contribution!!
Ash_F0x and JessicaMak streaming contribution!!
WTSRetro/SpiffyDane and Myrkee streaming contribution!!
Ninja and friends streaming contribution!!
erald_guri chatting contribution!!
lastmiles streaming farwest contribution!!
rw_grim streaming contribution!!
AdamCYounis streaming contribution!!
Dunno (P4ndaExpress) chatting and streaming contribution!!
Zorchenhimer streaming contribution!!
lasteveq4 C++ interest chat contriubtion!!
cecilphillip and clarkio @"Microsoft Developer" streaming contribution!!
oijtx streaming contribution!!
diegobrando_linux (Bl4ck_gookoo) chatting contribution!!
jhovgaard streaming contribution!!
Klay4_ chatting contribution!!
HonestDanGames streaming contribution!!
NorthSeaHero streaming contribution!!
Trainwreckstv and friends streaming contribution!!
togglebit, GexYT and GoPirateSoftware streaming contribution!!
taiyoinoue, RetroMMO, OfficialAndyPyro and david_joffe streaming contribution!!
Tjienta streaming contribution!!
Primeagen streaming contribution!!
Jaxstyle and friends streaming contribution!!
EduardRFS streaming contribution!!
Melchizedek6809 and btcfly streaming contribution!!
Llama0x0 and sov_l chatting contribution!!
TaleLearnCode streaming contribution!!
Carol phone call contribution and visit contribution!!
hvalen_hvalborg112 streaming contribution!!
harmannieves chatting contribution!! (After long time...)
darkfolt8 (French from France) chatting contribution!!
klintcsgo (CS GO: Counter-Strike Global Offensive) streaming contribution!!
KASPERPURE (Super Mario 64) streaming contribution!!
SomewhatAccurate C++ streaming contribution!!
Listening to Bryan Adams, Westlife, Shayne Ward, MLTR, Backstreet Boys, Boyzone - Best Love Songs Ever by Relax Song at YouTube!!
-- hi5 contribution...!!
at macOS Box in host running Windows 10 Pro remotely from bilbo machine running Windows 10 Pro!! dedicated server by OVH.com at France, Gravelines Intel Core i7-4790K - 4c/8t - 4 GHz/4.4 GHz RAM32 GB 1600 MHz 2×960 GB SSD SATA
Ports mothroaches + Moth emotes (#1843)
Can you guess what this PR does? If you answered that it ports this pull request, this pull request, and a partial part of this one too, then you're right!
You can also craft moth plushies now. You just need some cloth, mothroach hide, and a heart!
silly little moth roaches and emotes, who wouldn't want them in the game?
🆑 add: Mothroaches are now a thing add: Moth laughter, chittering and squeaking /🆑
[MIRROR] [MDB IGNORE] Mimes can no longer write without breaking their vow. (#5562)
Original PR: tgstation/tgstation#74674
I feel this is gonna be unpopular with the lazy mime players.
Also, this is an idea I had in my backlog for a while now
This removes the Mime's ability to write on paper while they're on their vow of silence. This can be compared to hand language, which doesn't let you speak despite not being considered "talking", and PDA messaging, which does the same.
Mimes can still write with their pen, which is a nice invisible white color. I thought I would keep it in as I find that interaction funny to have a Mime give someone just a blank paper, unknowing that there's text on it. Spraycans/Telekinesis/Circuits are also left unaffected because they require actual effort to obtain (doing genetics, doing circuits, or printing spraycans which take a lot of inventory space and is limited), compared to paper which you can carry hundreds of papers around and is bountiful across the station.
I thought this was attempted at least once, but I can't find any PR that mentions it, so I'm shooting my shot to see if this is something we'd want.
Mimes using paper is a lazy way to bypass their one job gimmick: Emoting over talking.
If they get a job change, they can simply break their vow to access paper writing abilities, so this doesn't affect that really. It more-so hits the Mimes who uses the job for the free spells/healing abilities/etc, and bypasses the downsides (im aware its harder to get people to read paper than it is to talk to them, but you can literally get the mute quirk and itll have the same effect without being the whole job).
The point is, you don't get invisible walls for free; it comes at a cost of not being able to talk to people. If you want to talk, then break your vow, lose access to your Mime abilities, and remake it later when the cooldown is over. You're not meant to do both.
🆑 balance: Mimes can no longer write on paper without breaking their vow. /🆑
Co-authored-by: John Willard 53777086+JohnFulpWillard@users.noreply.github.com Co-authored-by: Jolly-66 70232195+Jolly-66@users.noreply.github.com
Refactors and optimizes breath code (Saves 12% of carbon/Life()) (#74230)
As things currently stand, when a mob breaths several things happen (simplified to focus on the stupid)
We assert the existance of all possible breathable gases, and pull partial pressures for them Then we walk through all possible interactions lungs could have with these gases, one by one, and see if they're happening or not As we go we are forced to cleanup potential alerts caused by the previous breath, even if those effects never actually happen At the end we clear out all the unused gas ids, and handle the temperature of the breath.
There's I'd say 3 different types of gas reactions.
- You can "need" a gas to survive. o2, n2 and plasma all fall into this category
- A gas can do something to you while it's in your system. This applies to most gas types
- Variation on the previous, some gases do cleanup when they're not in your system, or when there isn't much of them in the first place
The main headache here is that second one, constantly cleaning up potential side effects sucks, and fixing it would require a lot of dummy variables
There's other suckage too.
Needing to constantly check for a gas type even if it isn't there is stupid, and leads to wasted time It's also really annoying to do subtypes in this system. There is what amounts to a hook proc you can override, but you can't override the reaction to a gas type. It also just like, sucks to add new gases. one mega proc smells real stupid.
In the interest of speed:
- I'd like to build a system that doesn't require manually checking for gas
- Reacting to gas "disappearing" should be promoted by the system, instead of being hacky.
- I would like to avoid needing to assert the existence of all possible gases, as this is slow on both the assert and the garbage collect.
In the interest of dev ergonomics:
- It should be easy to define a new gas reaction
- It should be easy for subtypes to implement their own gas reactions. The current method of vars on the lung is all tangled up and not really undoable as of now, but I'd like to not require it
- It should be possible to fully override how a gas is handled
Lungs have 3 lists of proc paths stored on them
Each list handles a different way the lung might want to interact with a gas. There's a list for always processing on a gas (we use this for stuff that's breathed), a list for handling a gas in our breath, and a list for reacting to a gas previously being in our breath, but not any more.
Lungs fill out these lists using a helper proc during Initialize() Then, when it comes time to breath, we loop over the gas in the breath and react to it. We also keep track of the previous list of partial pressures, which we calculate for free here, and use that to figure out when to call the loss reactions.
This proc pattern allows for overrides, easy reactions to removals, lower indentation code and early returns, and better organization of signal handlers
It's also significantly faster. Ballpark 4x faster
Removes support for breathing co2, and dying from n2 poisoning. They were both unused, and I think it's cringe to clutter these procs even further
Added "do we even have oxyloss" checks to most cases of passive breathing. This is a significant save, since redundant adjustoxy's are decently expensive at the volume of calls we have here.
Fixes a bug with breathing out if no gas is passed in, assigning a var to another var doesn't perform a copy
Rewrote breathe_gas_volume() slightly to insert gas into an immutable mix stored on the lung, rather then one passed in This avoids passing of a gas_mixture around just to fill a hole.
I may change my mind on this, since it would be nice to have support for temperature changing from a hot/cold breath. Not gonna be done off bodytemp tho lord no.
Uses merge() instead of a hard coded version to move the gas ids over. This is slightly slower with lower gas counts but supports more things in future and is also just easier to read.
Faster, easier to work with and read (imo)
Profiles:
(These profiles were initially missing #73026. Merging this brings the savings from 16% to 12%. Life is pain)
Co-authored-by: san7890 the@san7890.com
[MIRROR] [MDB IGNORE] Gunpoints now take half a second to activate, make gasp sounds, and briefly immobilize the shooter and target, other small balance changes (#5591)
Original PR: tgstation/tgstation#74036
This PR messes around with gunpoints a bit, with the purpose of making them more viable in certain scenarios without making them obnoxious. The biggest change is that gunpoints now require a 0.5 second do_after() where neither the shooter nor the target moves, and immobilizes both of them for 0.75 seconds if point blank, or half that if you're 2 tiles away. Originally you were supposed to only be able to initiate a gunpoint from point-blank, but #56601 seems to have removed that requirement, so we'll run with it and just leave it as advantageous to gunpoint closer up. The do_after() reinforces that it should be used as an ambush tactic, and so you can't use it on someone who's actively fleeing or fighting you.
Getting held up will now make you emit a shocked gasp sound, a la Metal Gear Solid, which combined with the short immobilize will hopefully make it more noticeable that someone's pointing a gun at you.
Holdups will now immediately give a 25% bonus to damage and wounds, instead of having to wait 2.5 seconds to hit the double damage stage.
Finally, right clicking someone that you're holding up will no longer shoot them. That just feels like good consistency.
Hopefully makes gunpoints a little more viable for when you want to stick someone who's not expecting it up without them immediately jetting off. In the future I'd like to ape Baycode and let the gunman have an action that toggles whether the victim is allowed to move, so you can order them to move to a second location without instantly shooting them, but that'll come later.
🆑 Ryll/Shaps balance: Holding someone at gunpoint now requires both the shooter and the victim to hold still for half a second before activating, so you can't hold-up people fleeing or fighting you. After that, it will briefly immobilize the both of you, 0.75 seconds if adjacent, or half that if you're two tiles away. Nuke ops are immune to the immobilization, since they're ready to die anyways. balance: Holding someone up will immediately apply a 1.25x damage and wound multiplier, rather than waiting 2.5 seconds to hit 2x. soundadd: Being held up will now make the victim play a sharp gasp sound, a la Metal Gear Solid. qol: Trying to hold someone up that you're already holding up will no longer shoot them. /🆑
Co-authored-by: Ryll Ryll 3589655+Ryll-Ryll@users.noreply.github.com Co-authored-by: san7890 the@san7890.com
[MIRROR] Tcomms Soundloop Comes From One Source And Is Less Awful [MDB IGNORE] (#20713)
- Tcomms Soundloop Comes From One Source And Is Less Awful (#74908)
The soundloop/server
now only comes from the server hub, so it
doesn't have stacking audio sources. The sound has been made more
uniform when up close, but is overall quieter. Additionally, all the
files have been run through a low pass filter to remove the highest of
it's pitches.
I'm sick of not wanting to be around telecomms because of how bad every single machine sounds. Now, things are significantly easier on the ear, quieter, more uniform, and better for everyone's sanity. I asked the maintainers in the coding channel if I could just remove it and they said no.
I can't get a video recording, I've tried with win+G, OBS, and sharex and it's just fucked.
🆑 qol: telecomms is quieter and less ear-damaging. sound: modified tcomms sound to remove high-tones. fix: the telecomms sound only comes from the server hub machine. /🆑
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
- Tcomms Soundloop Comes From One Source And Is Less Awful
Co-authored-by: Cheshify 73589390+Cheshify@users.noreply.github.com Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
[MIRROR] Turns Deer into Basic Mob - They Freeze At The Sight of Vehicles [MDB IGNORE] (#20711)
- Turns Deer into Basic Mob - They Freeze At The Sight of Vehicles (#74784)
deers only show up in the BEPIS but i decided that they would be easy enough to turn into a basic mob (they were). it was so easy in fact that i decided to dip my toes into coding AI behavior, and made them freeze up whenever they see a vehicle. this required a lot of code in a bunch of places that i was quite unfamiliar with before starting this project, so do let me know if i glonked up anywhere and i can work on smoothing it out.
one less simple animal on the list. deers staring at headlights is pretty cool i think, neato interaction for when you do get them beyond the joke the bepis makes
i'm also amenable to dropping the whole "deer in headlights" code if you don't like that for w/e reason- just wanted to make them basic at the very least
🆑 add: If you ever happen upon a wild deer, try not to ride your fancy vehicles too close to it as it'll freeze up like a... you know where I'm going with this. /🆑
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
- Turns Deer into Basic Mob - They Freeze At The Sight of Vehicles
Co-authored-by: san7890 the@san7890.com Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
EMPs on robotic limbs will now disable them for 4-8 seconds rather than causing a 10-20 second full stun (#74570)
EMPs on robotic limbs will now disable them for 10-20 seconds rather than causing a 10-20 second full stun on the user. Additionally, they will damage the limb for a little brute and some burn.
Arm EMPs don't do anything special as the limb being disabled already drops items.
Leg EMPs cause a 10-20 second knockdown, only really applicable if there's only one robotic leg as two disabled legs KD you anyways.
Chest EMPs cause a 3-6 second standing-up paralyze, visible to the player by a quite noticeable shaking of their body.
Head EMPs break the optical transponder circuits for 7.5-15 seconds, effectively giving the user nightmare goggles vision with green instead of red as the only remaining color.
Tacit approval for the PR at least existing.
Robotic limbs are not so strong that a glancing EMP that may not even have been directed at you should stun you for ten, TEN seconds, or worse, twenty. This is basically legacy stunning from the days of super-stuns on soap, stunbatons, etc. The code for it was last touched six years ago.
The stats as shown above are not even close to final. I really don't know or care what the right stats should be in the end. and I'm fine with making them a 10-20 second timer again. I just put some reasonable-seeming numbers in as a placeholder. EMPs could also still cause a short stun if that is deemed necessary. Hell, that could be the chest effect!
🆑 balance: EMPs on robotic limbs will now disable them for 10-20 seconds rather than causing a 10-20 second full stun on the user. Additionally, they will damage the limb for a little brute and some burn. EMPs on robotic limbs will now disable them for 10-20 seconds rather than causing a 10-20 second full stun on the user. Additionally, they will damage the limb for a little brute and some burn. balance: Arm EMPs don't do anything special as the limb being disabled already drops items. balance: Leg EMPs cause a 10-20 second knockdown, only really applicable if there's only one robotic leg as two disabled legs KD you anyways. balance: Chest EMPs cause a 3-6 second standing-up paralyze, visible to the player by a quite noticeable shaking of their body. balance: Head EMPs break the optical transponder circuits for 7.5-15 seconds, effectively giving the user nightmare goggles vision with green instead of red as the only remaining color. /🆑
People listen up don't stand so close, I got somethin that you all should know. Holy matrimony is not for me, I'd rather die alone in misery.
YAY IT JUST GETS MORE AND MORE BROKEN. FUCK YOU GIT.
Project Structures
Realized a nice way that I liked, to structure the project module-wise.
I'm thinking about if @thing/thing
paths could be nice for a project like this :)
Going to bring some of these other nice things over to NBTify, I got them working in jsmediatags today :D
Man, Marco Minnemann's solo work gets better every time I listen. Listening through from HWD&2K: Part I, and now I'm listening to Mouth of God. Music days are the best, listened to a bunch of Mike Keneally this morning too. Gonna try 'You Must Be This Tall' again, after this.
Oh yeah! Just discovered 'Thank You Scientist' the other day, WOW. They are super cool too. Going to buy their latest release, at the same time as when Marco releases his new solo album this Friday. Bandcamp Friday for both :)
fix the medbay door release button to exit treatment center. (#3173)
fix the medbay door release button to exit treatment center. was my mistake sorry
fixing bug is good
i tested the button ingame
Screenshots & Videos
Put screenshots and videos here with an empty line between the
screenshots and the <details>
tags.
🆑
fix: fix the med-bay door release button to exit treatment center.my bad.
/:cl:
Co-authored-by: Julien jverger.ingx@gmail.com Co-authored-by: Morrow darthbane97@gmail.com
http: support CURLOPT_PROTOCOLS_STR
The CURLOPT_PROTOCOLS (and matching CURLOPT_REDIR_PROTOCOLS) flag was deprecated in curl 7.85.0, and using it generate compiler warnings as of curl 7.87.0. The path forward is to use CURLOPT_PROTOCOLS_STR, but we can't just do so unilaterally, as it was only introduced less than a year ago in 7.85.0.
Until that version becomes ubiquitous, we have to either disable the deprecation warning or conditionally use the "STR" variant on newer versions of libcurl. This patch switches to the new variant, which is nice for two reasons:
-
we don't have to worry that silencing curl's deprecation warnings might cause us to miss other more useful ones
-
we'd eventually want to move to the new variant anyway, so this gets us set up (albeit with some extra ugly boilerplate for the conditional)
There are a lot of ways to split up the two cases. One way would be to abstract the storage type (strbuf versus a long), how to append (strbuf_addstr vs bitwise OR), how to initialize, which CURLOPT to use, and so on. But the resulting code looks pretty magical:
GIT_CURL_PROTOCOL_TYPE allowed = GIT_CURL_PROTOCOL_TYPE_INIT; if (...http is allowed...) GIT_CURL_PROTOCOL_APPEND(&allowed, "http", CURLOPT_HTTP);
and you end up with more "#define GIT_CURL_PROTOCOL_TYPE" macros than actual code.
On the other end of the spectrum, we could just implement two separate functions, one that handles a string list and one that handles bits. But then we end up repeating our list of protocols (http, https, ftp, ftp).
This patch takes the middle ground. The run-time code is always there to handle both types, and we just choose which one to feed to curl.
Signed-off-by: Jeff King peff@peff.net Signed-off-by: Junio C Hamano gitster@pobox.com Signed-off-by: Johannes Schindelin johannes.schindelin@gmx.de
[sled-agent] Refactor service management out of StorageManager
(#2946)
The Sled Agent has historically had two different "managers" responsible for Zones:
ServiceManager
, which resided over zones that do not operate on DatasetsStorageManager
, which manages disks, but also manages zones which operate on those disks
This separation is even reflected in the sled agent API exposed to Nexus
-
the Sled Agent exposes:
-
PUT /services
-
PUT /filesystem
For "add a service (within a zone) to this sled" vs "add a dataset (and corresponding zone) to this sled within a particular zpool".
This has been kinda handy for Nexus, since "provision CRDB on this
dataset" and "start the CRDB service on that dataset" don't need to be
separate operations. Within the Sled Agent, however, it has been a
pain-in-the-butt from a perspective of diverging implementations. The
StorageManager
and ServiceManager
have evolved their own mechanisms
for storing configs, identifying filesystems on which to place zpools,
etc, even though their responsibilities (managing running zones) overlap
quite a lot.
This PR migrates the responsibility for "service management" entirely
into the ServiceManager
, leaving the StorageManager
responsible for
monitoring disks.
In detail, this means:
- The responsibility for launching Clickhouse, CRDB, and Crucible zones
has moved from
storage_manager.rs
intoservices.rs
- Unfortunately, this also means we're taking a somewhat hacky approach to formatting CRDB. This is fixed in oxidecomputer/omicron#2954.
- The
StorageManager
no longer requires an Etherstub device during construction - The
ServiceZoneRequest
can operate on an optionaldataset
argument - The "config management" for datastore-based zones is now much more
aligned with non-dataset zones. Each sled stores
/var/oxide/services.toml
and/var/oxide/storage-services.toml
for each group. - These still need to be fixed with oxidecomputer/omicron#2888 , but it should be simpler now.
filesystem_ensure
- which previously asked theStorageManager
to format a dataset and also launch a zone - now asks theStorageManager
to format a dataset, and separately asks theServiceManager
to launch a zone.- In the future, this may become vectorized ("ensure the sled has all the datasets we want...") to have parity with the service management, but this would require a more invasive change in Nexus.
[DNM][HACK] telephony: Force Class 0 SMS to Class 1
This kills Flash SMS messages. Fuck you airtel
Change-Id: Ifb0c9e8bae5c12868d178fbdaeceb2cc72a0ffb6 Signed-off-by: Sageofd6path mail2anirban95@gmail.com
holy shit this is way to much lol if anythings fucked its from this
sched/core: Fix ttwu() race
Paul reported rcutorture occasionally hitting a NULL deref:
sched_ttwu_pending() ttwu_do_wakeup() check_preempt_curr() := check_preempt_wakeup() find_matching_se() is_same_group() if (se->cfs_rq == pse->cfs_rq) <-- BOOM
Debugging showed that this only appears to happen when we take the new code-path from commit:
2ebb17717550 ("sched/core: Offload wakee task activation if it the wakee is descheduling")
and only when @cpu == smp_processor_id(). Something which should not be possible, because p->on_cpu can only be true for remote tasks. Similarly, without the new code-path from commit:
c6e7bd7afaeb ("sched/core: Optimize ttwu() spinning on p->on_cpu")
this would've unconditionally hit:
smp_cond_load_acquire(&p->on_cpu, !VAL);
and if: 'cpu == smp_processor_id() && p->on_cpu' is possible, this would result in an instant live-lock (with IRQs disabled), something that hasn't been reported.
The NULL deref can be explained however if the task_cpu(p) load at the beginning of try_to_wake_up() returns an old value, and this old value happens to be smp_processor_id(). Further assume that the p->on_cpu load accurately returns 1, it really is still running, just not here.
Then, when we enqueue the task locally, we can crash in exactly the observed manner because p->se.cfs_rq != rq->cfs_rq, because p's cfs_rq is from the wrong CPU, therefore we'll iterate into the non-existant parents and NULL deref.
The closest semi-plausible scenario I've managed to contrive is somewhat elaborate (then again, actual reproduction takes many CPU hours of rcutorture, so it can't be anything obvious):
X->cpu = 1
rq(1)->curr = X
CPU0 CPU1 CPU2
// switch away from X
LOCK rq(1)->lock
smp_mb__after_spinlock
dequeue_task(X)
X->on_rq = 9
switch_to(Z)
X->on_cpu = 0
UNLOCK rq(1)->lock
// migrate X to cpu 0
LOCK rq(1)->lock
dequeue_task(X)
set_task_cpu(X, 0)
X->cpu = 0
UNLOCK rq(1)->lock
LOCK rq(0)->lock
enqueue_task(X)
X->on_rq = 1
UNLOCK rq(0)->lock
// switch to X
LOCK rq(0)->lock
smp_mb__after_spinlock
switch_to(X)
X->on_cpu = 1
UNLOCK rq(0)->lock
// X goes sleep
X->state = TASK_UNINTERRUPTIBLE
smp_mb(); // wake X
ttwu()
LOCK X->pi_lock
smp_mb__after_spinlock
if (p->state)
cpu = X->cpu; // =? 1
smp_rmb()
// X calls schedule()
LOCK rq(0)->lock
smp_mb__after_spinlock
dequeue_task(X)
X->on_rq = 0
if (p->on_rq)
smp_rmb();
if (p->on_cpu && ttwu_queue_wakelist(..)) [*]
smp_cond_load_acquire(&p->on_cpu, !VAL)
cpu = select_task_rq(X, X->wake_cpu, ...)
if (X->cpu != cpu)
switch_to(Y)
X->on_cpu = 0
UNLOCK rq(0)->lock
However I'm having trouble convincing myself that's actually possible on x86_64 -- after all, every LOCK implies an smp_mb() there, so if ttwu observes ->state != RUNNING, it must also observe ->cpu != 1.
(Most of the previous ttwu() races were found on very large PowerPC)
Nevertheless, this fully explains the observed failure case.
Fix it by ordering the task_cpu(p) load after the p->on_cpu load, which is easy since nothing actually uses @cpu before this.
Fixes: c6e7bd7afaeb ("sched/core: Optimize ttwu() spinning on p->on_cpu") Reported-by: Paul E. McKenney paulmck@kernel.org Tested-by: Paul E. McKenney paulmck@kernel.org Signed-off-by: Peter Zijlstra (Intel) peterz@infradead.org Signed-off-by: Ingo Molnar mingo@kernel.org Link: https://lkml.kernel.org/r/20200622125649.GC576871@hirez.programming.kicks-ass.net Change-Id: I40e0e01946eadb1701a4d06758e434591e5a5c92
Add snap-layouts support to the Terminal (#11680)
Adds snap layout support to the Terminal's maximize button. This PR is full of BODGY, so brace yourselves.
Big thanks to Chris Swan in #11134 for building the prototype. I don't believe this solves #8795, because XAML islands can't get nchittest messages
- The window procedure for the drag bar forwards clicks on its client area to its parent as non-client clicks.
- BODGY: It also manually handles the caption buttons. They exist in the titlebar, and work reasonably well with just XAML, if the drag bar isn't covering them.
- However, to get snap layout support, we need to actually return
HTMAXBUTTON
where the maximize button is. If the drag bar doesn't cover the caption buttons, then the core input site (which takes up the entirety of the XAML island) will steal theWM_NCHITTEST
before we get a chance to handle it. - So, the drag bar covers the caption buttons, and manually handles hovering and pressing them when needed. This gives the impression that they're getting input as they normally would, even if they're not really getting input via XAML.
- We also need to manually display the button tooltips now, because XAML
doesn't know when they've been hovered for long enough. Hence, the
_displayToolTip
ThrottledFuncTrailing
Minimized, maximized, restored down, hovered the buttons slowly, moved the mouse over them quickly, they feel the same as before. But now with snap layouts appearing.
- I'm working on getting the ToolTips on the caption buttons back. Alas, I needed a demo of this today, so I'll fix that tomorrow morning.
- mild concern: I should probably test Win 10 to make sure there wasn't weird changes to the message loop in win11 that means this is broken on win10.
- I think I used the wrong issue number for tons of my comments throughout this PR. Double check that. Should be #9443, not #9447.
Closes #9443
I thought this took care of #8587 as a bonus, because I was here, and the fix is now trivial, but looking at the latest commit that regressed.
Co-authored-by: Chris Swan chswan@microsoft.com
Fixes the wapproj fast-up-to-date check (#11806)
I'm working on making the FastUpToDate check in Vs work for the Terminal project. This is one of a few PRs in this area.
FastUpToDate lets vs check quickly determine that it doesn't need to do anything for a given project.
However, a few of our projects don't produce all the right artifacts, or check too many things, and this eventually causes the wapproj
to rebuild, EVERY TIME YOU F5 in VS.
This third PR deals with the Actual fast up to date check for the CascadiaPackage.wapproj. When #11804, #11805 and this PR are all merged, you should be able to just F5 the Terminal in VS, and then change NOTHING, and F5 it again, without doing a build at all.
The wapproj GetResolvedWinMD
target tries to get a winmd from every cppwinrt
executable we put in the package. But we DON'T produce a winmd. This makes the
FastUpToDate check fail every time, and leads to the whole wapproj build
running even if you're just f5'ing the package. EVEN AFTER A SUCCESSFUL BUILD.
Setting GenerateWindowsMetadata=false is enough to tell the build system that we don't produce one, and get it off our backs.
[3:38 PM] Dustin Howett however, that's not the only thing that "GetTargetPath" checks.
[3:38 PM] Dustin Howett oh yeah more info: wapproj calls GetTargetPath on all projects it references
[3:38 PM] Dustin Howett when it calls GTP on WindowsTerminal.vcxproj it is getting back a winmd (!)
[3:39 PM] Dustin Howett here's the magic
[3:39 PM] Dustin Howett it checks if any Link items specify GenerateWindowsMetadata
feat: persistent bind-mounts
This is an important change, where we get remove the previous --mount
option, and instead opt for persistent bind-mounts.
Persistent bind mounts have several advantages:
- They make it easier to remember which folders need to be bind-mounted.
- Code is much less clunky, as we no longer need to generate temporary docker-compose files.
- They allow us to bind-mount host directories at build time using the
buildx
--build-context
option. - The transition from development to production becomes much easier, as images will automatically be built using the host repo.
The only drawback is that persistent bind-mounts are slightly less portable: when a config.yml file is moved to a different folder, many things will break if the repo is not checked out in the same path.
For instance, this is how to start working on a local fork of edx-platform:
tutor config save --append MOUNTS=/path/to/edx-platform
And that's all there is to it. No, this fork will be used whenever we run:
tutor images build openedx
tutor local start
tutor dev start
This change is made possible by huge improvements in the build time performance. These improvements make it convenient to re-build Docker images often.
Related issues: openedx-unsupported/wg-developer-experience#71 openedx-unsupported/wg-developer-experience#66 https://github.com/openedx/wg-developer-experience/issues/166
updates for landing zone sign sprites (#3180)
Cleans up the palettes on the landing zone sign sprites and gives them a fresh coat of paint (or blood). Not something most people will notice I think but it's something I've been wanting to do.
gradients ugly
🆑 imageadd: new sprites for landing zone signs imagedel: deleted old landing zone signs /🆑
Before you start using social media, think about what you want to achieve.
I'm Tharaka Rajasekara, an undergraduate student at the University of Peradeniya with a strong passion for computer science. I specialize in web development, marketing, and technological systems, and I currently work as a designer in a zero-plastic society. My proficiency in programming languages such as Python, Java, and C has equipped me with knowledge in areas such as digital transformation, threat detection, privacy, data confidentiality, network vulnerabilities, and cyber best practices. I am committed to using my skills to drive innovation and make a positive impact in the technology industry.
last update of the night
added a center icon like obnoxious.club (completely stolen fuck you kid)
BACKPORT: signal: add pidfd_send_signal() syscall
The kill() syscall operates on process identifiers (pid). After a process has exited its pid can be reused by another process. If a caller sends a signal to a reused pid it will end up signaling the wrong process. This issue has often surfaced and there has been a push to address this problem [1].
This patch uses file descriptors (fd) from proc/ as stable handles on struct pid. Even if a pid is recycled the handle will not change. The fd can be used to send signals to the process it refers to. Thus, the new syscall pidfd_send_signal() is introduced to solve this problem. Instead of pids it operates on process fds (pidfd).
/* prototype and argument /* long pidfd_send_signal(int pidfd, int sig, siginfo_t *info, unsigned int flags);
/* syscall number 424 */ The syscall number was chosen to be 424 to align with Arnd's rework in his y2038 to minimize merge conflicts (cf. [25]).
In addition to the pidfd and signal argument it takes an additional siginfo_t and flags argument. If the siginfo_t argument is NULL then pidfd_send_signal() is equivalent to kill(, ). If it is not NULL pidfd_send_signal() is equivalent to rt_sigqueueinfo(). The flags argument is added to allow for future extensions of this syscall. It currently needs to be passed as 0. Failing to do so will cause EINVAL.
/* pidfd_send_signal() replaces multiple pid-based syscalls */ The pidfd_send_signal() syscall currently takes on the job of rt_sigqueueinfo(2) and parts of the functionality of kill(2), Namely, when a positive pid is passed to kill(2). It will however be possible to also replace tgkill(2) and rt_tgsigqueueinfo(2) if this syscall is extended.
/* sending signals to threads (tid) and process groups (pgid) */ Specifically, the pidfd_send_signal() syscall does currently not operate on process groups or threads. This is left for future extensions. In order to extend the syscall to allow sending signal to threads and process groups appropriately named flags (e.g. PIDFD_TYPE_PGID, and PIDFD_TYPE_TID) should be added. This implies that the flags argument will determine what is signaled and not the file descriptor itself. Put in other words, grouping in this api is a property of the flags argument not a property of the file descriptor (cf. [13]). Clarification for this has been requested by Eric (cf. [19]). When appropriate extensions through the flags argument are added then pidfd_send_signal() can additionally replace the part of kill(2) which operates on process groups as well as the tgkill(2) and rt_tgsigqueueinfo(2) syscalls. How such an extension could be implemented has been very roughly sketched in [14], [15], and [16]. However, this should not be taken as a commitment to a particular implementation. There might be better ways to do it. Right now this is intentionally left out to keep this patchset as simple as possible (cf. [4]).
/* naming */ The syscall had various names throughout iterations of this patchset:
- procfd_signal()
- procfd_send_signal()
- taskfd_send_signal() In the last round of reviews it was pointed out that given that if the flags argument decides the scope of the signal instead of different types of fds it might make sense to either settle for "procfd_" or "pidfd_" as prefix. The community was willing to accept either (cf. [17] and [18]). Given that one developer expressed strong preference for the "pidfd_" prefix (cf. [13]) and with other developers less opinionated about the name we should settle for "pidfd_" to avoid further bikeshedding.
The "_send_signal" suffix was chosen to reflect the fact that the syscall takes on the job of multiple syscalls. It is therefore intentional that the name is not reminiscent of neither kill(2) nor rt_sigqueueinfo(2). Not the fomer because it might imply that pidfd_send_signal() is a replacement for kill(2), and not the latter because it is a hassle to remember the correct spelling - especially for non-native speakers - and because it is not descriptive enough of what the syscall actually does. The name "pidfd_send_signal" makes it very clear that its job is to send signals.
/* zombies */ Zombies can be signaled just as any other process. No special error will be reported since a zombie state is an unreliable state (cf. [3]). However, this can be added as an extension through the @flags argument if the need ever arises.
/* cross-namespace signals */ The patch currently enforces that the signaler and signalee either are in the same pid namespace or that the signaler's pid namespace is an ancestor of the signalee's pid namespace. This is done for the sake of simplicity and because it is unclear to what values certain members of struct siginfo_t would need to be set to (cf. [5], [6]).
/* compat syscalls */ It became clear that we would like to avoid adding compat syscalls (cf. [7]). The compat syscall handling is now done in kernel/signal.c itself by adding __copy_siginfo_from_user_generic() which lets us avoid compat syscalls (cf. [8]). It should be noted that the addition of __copy_siginfo_from_user_any() is caused by a bug in the original implementation of rt_sigqueueinfo(2) (cf. 12). With upcoming rework for syscall handling things might improve significantly (cf. [11]) and __copy_siginfo_from_user_any() will not gain any additional callers.
/* testing */ This patch was tested on x64 and x86.
/* userspace usage */ An asciinema recording for the basic functionality can be found under [9]. With this patch a process can be killed via:
#define _GNU_SOURCE #include <errno.h> #include <fcntl.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <sys/syscall.h> #include <sys/types.h> #include <unistd.h>
static inline int do_pidfd_send_signal(int pidfd, int sig, siginfo_t *info, unsigned int flags) { #ifdef __NR_pidfd_send_signal return syscall(__NR_pidfd_send_signal, pidfd, sig, info, flags); #else return -ENOSYS; #endif }
int main(int argc, char *argv[]) { int fd, ret, saved_errno, sig;
if (argc < 3)
exit(EXIT_FAILURE);
fd = open(argv[1], O_DIRECTORY | O_CLOEXEC);
if (fd < 0) {
printf("%s - Failed to open \"%s\"\n", strerror(errno), argv[1]);
exit(EXIT_FAILURE);
}
sig = atoi(argv[2]);
printf("Sending signal %d to process %s\n", sig, argv[1]);
ret = do_pidfd_send_signal(fd, sig, NULL, 0);
saved_errno = errno;
close(fd);
errno = saved_errno;
if (ret < 0) {
printf("%s - Failed to send signal %d to process %s\n",
strerror(errno), sig, argv[1]);
exit(EXIT_FAILURE);
}
exit(EXIT_SUCCESS);
}
/* Q&A
- Given that it seems the same questions get asked again by people who are
- late to the party it makes sense to add a Q&A section to the commit
- message so it's hopefully easier to avoid duplicate threads.
- For the sake of progress please consider these arguments settled unless
- there is a new point that desperately needs to be addressed. Please make
- sure to check the links to the threads in this commit message whether
- this has not already been covered. */ Q-01: (Florian Weimer [20], Andrew Morton [21]) What happens when the target process has exited? A-01: Sending the signal will fail with ESRCH (cf. [22]).
Q-02: (Andrew Morton [21]) Is the task_struct pinned by the fd? A-02: No. A reference to struct pid is kept. struct pid - as far as I understand - was created exactly for the reason to not require to pin struct task_struct (cf. [22]).
Q-03: (Andrew Morton [21]) Does the entire procfs directory remain visible? Just one entry within it? A-03: The same thing that happens right now when you hold a file descriptor to /proc/ open (cf. [22]).
Q-04: (Andrew Morton [21]) Does the pid remain reserved? A-04: No. This patchset guarantees a stable handle not that pids are not recycled (cf. [22]).
Q-05: (Andrew Morton [21]) Do attempts to signal that fd return errors? A-05: See {Q,A}-01.
Q-06: (Andrew Morton [22]) Is there a cleaner way of obtaining the fd? Another syscall perhaps. A-06: Userspace can already trivially retrieve file descriptors from procfs so this is something that we will need to support anyway. Hence, there's no immediate need to add another syscalls just to make pidfd_send_signal() not dependent on the presence of procfs. However, adding a syscalls to get such file descriptors is planned for a future patchset (cf. [22]).
Q-07: (Andrew Morton [21] and others) This fd-for-a-process sounds like a handy thing and people may well think up other uses for it in the future, probably unrelated to signals. Are the code and the interface designed to permit such future applications? A-07: Yes (cf. [22]).
Q-08: (Andrew Morton [21] and others) Now I think about it, why a new syscall? This thing is looking rather like an ioctl? A-08: This has been extensively discussed. It was agreed that a syscall is preferred for a variety or reasons. Here are just a few taken from prior threads. Syscalls are safer than ioctl()s especially when signaling to fds. Processes are a core kernel concept so a syscall seems more appropriate. The layout of the syscall with its four arguments would require the addition of a custom struct for the ioctl() thereby causing at least the same amount or even more complexity for userspace than a simple syscall. The new syscall will replace multiple other pid-based syscalls (see description above). The file-descriptors-for-processes concept introduced with this syscall will be extended with other syscalls in the future. See also [22], [23] and various other threads already linked in here.
Q-09: (Florian Weimer [24]) What happens if you use the new interface with an O_PATH descriptor? A-09: pidfds opened as O_PATH fds cannot be used to send signals to a process (cf. [2]). Signaling processes through pidfds is the equivalent of writing to a file. Thus, this is not an operation that operates "purely at the file descriptor level" as required by the open(2) manpage. See also [4].
/* References */ [1]: https://lore.kernel.org/lkml/20181029221037.87724-1-dancol@google.com/ [2]: https://lore.kernel.org/lkml/874lbtjvtd.fsf@oldenburg2.str.redhat.com/ [3]: https://lore.kernel.org/lkml/20181204132604.aspfupwjgjx6fhva@brauner.io/ [4]: https://lore.kernel.org/lkml/20181203180224.fkvw4kajtbvru2ku@brauner.io/ [5]: https://lore.kernel.org/lkml/20181121213946.GA10795@mail.hallyn.com/ [6]: https://lore.kernel.org/lkml/20181120103111.etlqp7zop34v6nv4@brauner.io/ [7]: https://lore.kernel.org/lkml/36323361-90BD-41AF-AB5B-EE0D7BA02C21@amacapital.net/ [8]: https://lore.kernel.org/lkml/87tvjxp8pc.fsf@xmission.com/ [9]: https://asciinema.org/a/IQjuCHew6bnq1cr78yuMv16cy [11]: https://lore.kernel.org/lkml/F53D6D38-3521-4C20-9034-5AF447DF62FF@amacapital.net/ [12]: https://lore.kernel.org/lkml/87zhtjn8ck.fsf@xmission.com/ [13]: https://lore.kernel.org/lkml/871s6u9z6u.fsf@xmission.com/ [14]: https://lore.kernel.org/lkml/20181206231742.xxi4ghn24z4h2qki@brauner.io/ [15]: https://lore.kernel.org/lkml/20181207003124.GA11160@mail.hallyn.com/ [16]: https://lore.kernel.org/lkml/20181207015423.4miorx43l3qhppfz@brauner.io/ [17]: https://lore.kernel.org/lkml/CAGXu5jL8PciZAXvOvCeCU3wKUEB_dU-O3q0tDw4uB_ojMvDEew@mail.gmail.com/ [18]: https://lore.kernel.org/lkml/20181206222746.GB9224@mail.hallyn.com/ [19]: https://lore.kernel.org/lkml/20181208054059.19813-1-christian@brauner.io/ [20]: https://lore.kernel.org/lkml/8736rebl9s.fsf@oldenburg.str.redhat.com/ [21]: https://lore.kernel.org/lkml/20181228152012.dbf0508c2508138efc5f2bbe@linux-foundation.org/ [22]: https://lore.kernel.org/lkml/20181228233725.722tdfgijxcssg76@brauner.io/ [23]: https://lwn.net/Articles/773459/ [24]: https://lore.kernel.org/lkml/8736rebl9s.fsf@oldenburg.str.redhat.com/ [25]: https://lore.kernel.org/lkml/CAK8P3a0ej9NcJM8wXNPbcGUyOUZYX+VLoDFdbenW3s3114oQZw@mail.gmail.com/
Cc: "Eric W. Biederman" ebiederm@xmission.com Cc: Jann Horn jannh@google.com Cc: Andy Lutomirsky luto@kernel.org Cc: Andrew Morton akpm@linux-foundation.org Cc: Oleg Nesterov oleg@redhat.com Cc: Al Viro viro@zeniv.linux.org.uk Cc: Florian Weimer fweimer@redhat.com Signed-off-by: Christian Brauner christian@brauner.io Reviewed-by: Tycho Andersen tycho@tycho.ws Reviewed-by: Kees Cook keescook@chromium.org Reviewed-by: David Howells dhowells@redhat.com Acked-by: Arnd Bergmann arnd@arndb.de Acked-by: Thomas Gleixner tglx@linutronix.de Acked-by: Serge Hallyn serge@hallyn.com Acked-by: Aleksa Sarai cyphar@cyphar.com
(cherry picked from commit 3eb39f47934f9d5a3027fe00d906a45fe3a15fad)
Conflicts: arch/x86/entry/syscalls/syscall_32.tbl - trivial manual merge arch/x86/entry/syscalls/syscall_64.tbl - trivial manual merge include/linux/proc_fs.h - trivial manual merge include/linux/syscalls.h - trivial manual merge include/uapi/asm-generic/unistd.h - trivial manual merge kernel/signal.c - struct kernel_siginfo does not exist in 4.14 kernel/sys_ni.c - cond_syscall is used instead of COND_SYSCALL arch/x86/entry/syscalls/syscall_32.tbl arch/x86/entry/syscalls/syscall_64.tbl
(1. manual merges because of 4.14 differences 2. change prepare_kill_siginfo() to use struct siginfo instead of kernel_siginfo 3. use copy_from_user() instead of copy_siginfo_from_user() in copy_siginfo_from_user_any() 4. replaced COND_SYSCALL with cond_syscall 5. Removed __ia32_sys_pidfd_send_signal in arch/x86/entry/syscalls/syscall_32.tbl. 6. Replaced __x64_sys_pidfd_send_signal with sys_pidfd_send_signal in arch/x86/entry/syscalls/syscall_64.tbl.)
Bug: 135608568 Test: test program using syscall(__NR_pidfd_send_signal,..) to send SIGKILL Change-Id: I34da11c63ac8cafb0353d9af24c820cef519ec27 Signed-off-by: Suren Baghdasaryan surenb@google.com Signed-off-by: electimon electimon@gmail.com
Severity Prediction of Knee Osteoarthritis
Knee Osteoarthritis (OA) is a condition that affects the joints, including the knee joint, due to the significant weight-bearing of the body. The disease results in degeneration and rupture of the cartilage elements in the knee joint, which causes severe pain. Unfortunately, the prevalence of OA has been increasing globally, with a 113.25% increase in cases from 1990 to 2019. Currently, more than 350 million people globally suffer from arthritis, and it is estimated that by 2040, about 78 million US adults will have the condition. The diagnosis of OA is primarily carried out by evaluating symptoms and comparing plain radiographs, which can be subjective. However, deep learning techniques, such as Convolution Neural Networks (CNNs), have emerged as a promising solution to medical problems in recent years. Therefore, the goal of this study is to develop and implement a classification system that can aid doctors in reducing their workload and assist radiologists in assessing the severity of the pain accurately. Furthermore, this will enable them to make the best diagnosis and recommend the most appropriate treatment. One of the methods used in detecting knee OA is transfer learning with fine-tuning, which leverages deep learning techniques to improve the accuracy of diagnosis and classification. By using this method, doctors and radiologists can make informed decisions on the severity of the condition, which can lead to better treatment outcomes for patients.
The following are the goals of the study:
- The primary objective of this research is to analyze the degree of severity of knee x-ray images.
- To assist Rheumatologists, in identifying the severity of the disease after the medication, thus reducing the time taken and lengthy treatments.
- For monitoring and implementing early treatments to sustain good health in patients who pose a concern.
- To check how accurately, the degree of severity of knee x-ray photographs is estimated by the deep learning algorithm.
The following are the social causes of the study:
- To assist Rheumatologists, in identifying the severity of the disease after the medication, thus reducing the time taken and lengthy treatments.
- To reduce the medical and travelling expenses.
- To overcome the manual mistakes made by the doctor sometimes.
- If any person got medication before , so he can check his disease in our webpage rather than consulting any doctor.
windows: ignore empty PATH
elements
When looking up an executable via the _which
function, Git GUI
imitates the execlp()
strategy where the environment variable PATH
is interpreted as a list of paths in which to search.
For historical reasons, stemming from the olden times when it was uncommon to download a lot of files from the internet into the current directory, empty elements in this list are treated as if the current directory had been specified.
Nowadays, of course, this treatment is highly dangerous as the current
directory often contains files that have just been downloaded and not
yet been inspected by the user. Unix/Linux users are essentially
expected to be very, very careful to simply not add empty PATH
elements, i.e. not to make use of that feature.
On Windows, however, it is quite common for PATH
to contain empty
elements by mistake, e.g. as an unintended left-over entry when an
application was installed from the Windows Store and then uninstalled
manually.
While it would probably make most sense to safe-guard not only Windows
users, it seems to be common practice to ignore these empty PATH
elements only on Windows, but not on other platforms.
Sadly, this practice is followed inconsistently between different software projects, where projects with few, if any, Windows-based contributors tend to be less consistent or even "blissful" about it. Here is a non-exhaustive list:
Cygwin:
It specifically "eats" empty paths when converting path lists to
POSIX: https://github.com/cygwin/cygwin/commit/753702223c7d
I.e. it follows the common practice.
PowerShell:
It specifically ignores empty paths when searching the `PATH`.
The reason for this is apparently so self-evident that it is not
even mentioned here:
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_environment_variables#path-information
I.e. it follows the common practice.
CMD:
Oh my, CMD. Let's just forget about it, nobody in their right
(security) mind takes CMD as inspiration. It is so unsafe by
default that we even planned on dropping `Git CMD` from Git for
Windows altogether, and only walked back on that plan when we
found a super ugly hack, just to keep Git's users secure by
default:
https://github.com/git-for-windows/MINGW-packages/commit/82172388bb51
So CMD chooses to hide behind the battle cry "Works as
Designed!" that all too often leaves users vulnerable. CMD is
probably the most prominent project whose lead you want to avoid
following in matters of security.
Win32 API (CreateProcess()
)
Just like CMD, `CreateProcess()` adheres to the original design
of the path lookup in the name of backward compatibility (see
https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw
for details):
If the file name does not contain a directory path, the
system searches for the executable file in the following
sequence:
1. The directory from which the application loaded.
2. The current directory for the parent process.
[...]
I.e. the Win32 API itself chooses backwards compatibility over
users' safety.
Git LFS:
There have been not one, not two, but three security advisories
about Git LFS executing executables from the current directory by
mistake. As part of one of them, a change was introduced to stop
treating empty `PATH` elements as equivalent to `.`:
https://github.com/git-lfs/git-lfs/commit/7cd7bb0a1f0d
I.e. it follows the common practice.
Go:
Go does not follow the common practice, and you can think about
that what you want:
https://github.com/golang/go/blob/go1.19.3/src/os/exec/lp_windows.go#L114-L135
https://github.com/golang/go/blob/go1.19.3/src/path/filepath/path_windows.go#L108-L137
Git Credential Manager:
It tries to imitate Git LFS, but unfortunately misses the empty
`PATH` element handling. As of time of writing, this is in the
process of being fixed:
https://github.com/GitCredentialManager/git-credential-manager/pull/968
So now that we have established that it is a common practice to ignore
empty PATH
elements on Windows, let's assess this commit's change
using Schneier's Five-Step Process
(https://www.schneier.com/crypto-gram/archives/2002/0415.html#1):
Step 1: What problem does it solve?
It prevents an entire class of Remote Code Execution exploits via
Git GUI's `Clone` functionality.
Step 2: How well does it solve that problem?
Very well. It prevents the attack vector of luring an unsuspecting
victim into cloning an executable into the worktree root directory
that Git GUI immediately executes.
Step 3: What other security problems does it cause?
Maybe non-security problems: If a project (ab-)uses the unsafe
`PATH` lookup. That would not only be unsafe, though, but
fragile in the first place because it would break when running
in a subdirectory. Therefore I would consider this a scenario
not worth keeping working.
Step 4: What are the costs of this measure?
Almost nil, except for the time writing up this commit message
;-)
Step 5: Given the answers to steps two through four, is the security measure worth the costs?
Yes. Keeping Git's users Secure By Default is worth it. It's a
tiny price to pay compared to the damages even a single
successful exploit can cost.
So let's follow that common practice in Git GUI, too.
Signed-off-by: Johannes Schindelin johannes.schindelin@gmx.de
gpg-interface: set trust level of missing key to "undefined"
In check_signature(), we initialize the trust_level field to "-1", with the idea that if gpg does not return a trust level at all (if there is no signature, or if the signature is made by an unknown key), we'll use that value. But this has two problems:
-
Since the field is an enum, it's up to the compiler to decide what underlying storage to use, and it only has to fit the values we've declared. So we may not be able to store "-1" at all. And indeed, on my system (linux with gcc), the resulting enum is an unsigned 32-bit value, and -1 becomes 4294967295.
The difference may seem academic (and you even get "-1" if you pass it to printf("%d")), but it means that code like this:
status |= sigc->trust_level < configured_min_trust_level;
does not necessarily behave as expected. This turns out not to be a bug in practice, though, because we keep the "-1" only when gpg did not report a signature from a known key, in which case the line above:
status |= sigc->result != 'G';
would always set status to non-zero anyway. So only a 'G' signature with no parsed trust level would cause a problem, which doesn't seem likely to trigger (outside of unexpected gpg behavior).
-
When using the "%GT" format placeholder, we pass the value to gpg_trust_level_to_str(), which complains that the value is out of range with a BUG(). This behavior was introduced by 803978da49 (gpg-interface: add function for converting trust level to string, 2022-07-11). Before that, we just did a switch() on the enum, and anything that wasn't matched would end up as the empty string.
Curiously, solving this by naively doing:
if (level < 0) return "";
in that function isn't sufficient. Because of (1) above, the compiler can (and does in my case) actually remove that conditional as dead code!
We can solve both by representing this state as an enum value. We could do this by adding a new "unknown" value. But this really seems to match the existing "undefined" level well. GPG describes this as "Not enough information for calculation".
We have tests in t7510 that trigger this case (verifying a signature from a key that we don't have, and then checking various %G placeholders), but they didn't notice the BUG() because we didn't look at %GT for that case! Let's make sure we check all %G placeholders for each case in the formatting tests.
The interesting ones here are "show unknown signature with custom format" and "show lack of signature with custom format", both of which would BUG() before, and now turn %GT into "undefined". Prior to 803978da49 they would have turned it into the empty string, but I think saying "undefined" consistently is a reasonable outcome, and probably makes life easier for anyone parsing the output (and any such parser had to be ready to see "undefined" already).
The other modified tests produce the same output before and after this patch, but now we're consistently checking both %G? and %GT in all of them.
Signed-off-by: Jeff King peff@peff.net Reported-by: Rolf Eike Beer eb@emlix.com Signed-off-by: Junio C Hamano gitster@pobox.com
Rip it out
My type ascription Oh rip it out Ah If you think we live too much then You can sacrifice diagnostics Don't mix your garbage Into my syntax So many weird hacks keep diagnostics alive Yet I don't even step outside So many bad diagnostics keep tyasc alive Yet tyasc doesn't even bother to survive!
[ADD] website_cf_turnstile: add cloudflare turnstile support
This module allows to add secret key to add the turnstile captcha on each snippet website_form.
A friendly, free CAPTCHA replacement Turnstile delivers frustration-free, CAPTCHA-free web experiences to website visitors. Turnstile stops abuse and confirms visitors are real without the data privacy concerns or awful UX that CAPTCHAs thrust on users.
closes odoo/odoo#119246
X-original-commit: 4aca39a533e9d41f5f452f36a1ffc001f586b4f4 Signed-off-by: Jérémy Kersten jke@odoo.com
add alpaca gpt4 dataset (#2610)
The inputs can be quite a lot of different versions of no input
,
therefore don't use the input
column for that.
In some cases the text in input
is already in the instruction, in
these cases, we also don't use the input
column.
I am not quite sure how to concatenate the instruction
and the input
column. In most cases it seems fine to just replace last appearance of
.
, !
or ?
with a colon, e.g.:
Instruction: Identify the odd one out.
Input: Twitter, Instagram, Telegram
or
Instruction: How dense is a given material?
Input: Steel
But we also have some questions like:
Instruction: Given the following synopsis, what is the moral lesson of this story?
Input: Once upon a time, there was a poor young boy who wanted some candy. He begged his father for money to buy it, but his father said no and ordered him to go to bed. As he was going to bed, the boy saw a five-dollar bill on the counter, which he took and bought the candy.
Where this might not be the best case. Either way, I think the this one token will not make significant difference the model and therefore I just concatenate instruction and input with a space.
__('iro-Options','sakurairo_csf'), 'menu_slug' => 'iro_options', ) ); Sakurairo_CSF::createSection($prefix, array( 'title' => __('Hello!','sakurairo_csf'), 'icon' => 'fa fa-podcast', 'fields' => array( array( 'type' => 'heading', 'content' => __('News+','sakurairo_csf'), ), array( 'type' => 'content', 'content' => __('','sakurairo_csf'), ), ) ) ); Sakurairo_CSF::createSection( $prefix, array( 'id' => 'preliminary', 'title' => __('Preliminary Options','sakurairo_csf'), 'icon' => 'fa fa-sliders', 'fields' => array( array( 'type' => 'submessage', 'style' => 'info', 'content' => __('You can click here to learn how to set the options on this page','sakurairo_csf'), ), array( 'id' => 'site_name', 'type' => 'text', 'title' => __('Site Name','sakurairo_csf'), 'desc' => __('For example: Sakurairo Blog','sakurairo_csf'), ), array( 'id' => 'author_name', 'type' => 'text', 'title' => __('Author Name','sakurairo_csf'), 'desc' => __('For example: Fuukei','sakurairo_csf'), ), array( 'id' => 'personal_avatar', 'type' => 'upload', 'title' => __('Personal Avatar','sakurairo_csf'), 'desc' => __('The best length-width ratio of is 1:1','sakurairo_csf'), 'library' => 'image', ), array( 'id' => 'text_logo_options', 'type' => 'switcher', 'title' => __('Mashiro Special Effects Text','sakurairo_csf'), 'label' => __('After turned on, the personal avatar will be replaced by the text as the home page display content','sakurairo_csf'), 'default' => false ), array( 'id' => 'text_logo', 'type' => 'fieldset', 'title' => __('Mashiro Special Effects Text Options','sakurairo_csf'), 'dependency' => array( 'text_logo_options', '==', 'true' ), 'fields' => array( array( 'id' => 'text', 'type' => 'text', 'title' => __('Text','sakurairo_csf'), 'desc' => __('The text content should not be too long, and the recommended length is 16 bytes.','sakurairo_csf'), ), array( 'id' => 'font', 'type' => 'text', 'title' => __('Font','sakurairo_csf'), 'desc' => __('Fill in the font name. For example: Noto Serif SC','sakurairo_csf'), ), array( 'id' => 'size', 'type' => 'slider', 'title' => __('Size','sakurairo_csf'), 'desc' => __('Slide to adjust, the recommended value range is 70-90','sakurairo_csf'), 'unit' => 'px', 'min' => '40', 'max' => '140', ), array( 'id' => 'color', 'type' => 'color', 'title' => __('Color','sakurairo_csf'), 'desc' => __('Customize the colors, light colors are recommended','sakurairo_csf'), ), ), 'default' => array( 'text' => 'ひょうりゅ', 'size' => '80', 'color' => '#FFF', ), ), array( 'id' => 'iro_logo', 'type' => 'upload', 'title' => __('Navigation Menu Logo','sakurairo_csf'), 'desc' => __('The best size is 40px, and the nav menu text logo will not be displayed after filling in','sakurairo_csf'), 'library' => 'image', ), array( 'id' => 'favicon_link', 'type' => 'text', 'title' => __('Site Icon','sakurairo_csf'), 'desc' => __('Fill in the address, which decides the icon next to the title above the browser','sakurairo_csf'), 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/basic/favicon.ico' ), array( 'id' => 'iro_meta', 'type' => 'switcher', 'title' => __('Custom Site Keywords and Descriptions','sakurairo_csf'), 'label' => __('After turning on, you can customize the site keywords and descriptions','sakurairo_csf'), 'default' => false ), array( 'id' => 'iro_meta_keywords', 'type' => 'text', 'title' => __('Site Keywords','sakurairo_csf'), 'dependency' => array( 'iro_meta', '==', 'true' ), 'desc' => __('The keywords should be separated with half width comma "," and it\'s better to set within 5 keywords','sakurairo_csf'), ), array( 'id' => 'iro_meta_description', 'type' => 'text', 'title' => __('Site Descriptions','sakurairo_csf'), 'dependency' => array( 'iro_meta', '==', 'true' ), 'desc' => __('Use concise words to describe the site, it is recommended to write within 120 words','sakurairo_csf'), ), ) ) ); Sakurairo_CSF::createSection( $prefix, array( 'id' => 'global', 'title' => __('Global Options','sakurairo_csf'), 'icon' => 'fa fa-globe', ) ); Sakurairo_CSF::createSection( $prefix, array( 'parent' => 'global', 'title' => __('Appearance Options','sakurairo_csf'), 'icon' => 'fa fa-tree', 'fields' => array( array( 'type' => 'submessage', 'style' => 'info', 'content' => __('You can click here to learn how to set the options on this page','sakurairo_csf'), ), array( 'type' => 'subheading', 'content' => __('Color Schemes','sakurairo_csf'), ), array( 'id' => 'theme_skin', 'type' => 'color', 'title' => __('Theme Color','sakurairo_csf'), 'desc' => __('Customize the colors','sakurairo_csf'), 'default' => '#505050' ), array( 'id' => 'theme_skin_matching', 'type' => 'color', 'title' => __('Matching Color','sakurairo_csf'), 'desc' => __('Customize the colors','sakurairo_csf'), 'default' => '#F9D938' ), array( 'type' => 'subheading', 'content' => __('Dark Mode','sakurairo_csf'), ), array( 'id' => 'theme_skin_dark', 'type' => 'color', 'title' => __('Dark Mode Theme Color','sakurairo_csf'), 'desc' => __('Customize the colors','sakurairo_csf'), 'default' => '#FCCD00' ), array( 'id' => 'theme_darkmode_auto', 'type' => 'switcher', 'title' => __('Automatically Switch to Dark Mode','sakurairo_csf'), 'label' => __('Default on','sakurairo_csf'), 'default' => true ), array( 'type' => 'content', 'content' => __( '
Client local time:Dark mode will switch on automatically from 22:00 to 7:00
' .'Follow client settings:Follow client browser settings
' .'Always on:Always on, except being configured by the client
','sakurairo_csf'), 'dependency' => array( 'theme_darkmode_auto', '==', 'true' ), ), array( 'id' => 'theme_darkmode_strategy', 'type' => 'select', 'title' => __('Automatic Switch Strategy of Dark Mode','sakurairo_csf'), 'dependency' => array( 'theme_darkmode_auto', '==', 'true' ), 'options' => array( 'time' => __('Client local time','sakurairo_csf'), 'client' => __('Follow client settings','sakurairo_csf'), 'eien' => __('Always on','sakurairo_csf'), ), "default"=>"time" ), array( 'id' => 'theme_darkmode_img_bright', 'type' => 'slider', 'title' => __('Dark Mode Image Brightness','sakurairo_csf'), 'desc' => __('Slide to adjust, the recommended value range is 0.6-0.8','sakurairo_csf'), 'step' => '0.01', 'min' => '0.4', 'max' => '1', 'default' => '0.8' ), array( 'id' => 'theme_darkmode_widget_transparency', 'type' => 'slider', 'title' => __('Dark Mode Component Transparency','sakurairo_csf'), 'desc' => __('Slide to adjust, the recommended value range is 0.6-0.8','sakurairo_csf'), 'step' => '0.01', 'min' => '0.2', 'max' => '1', 'default' => '0.8' ), array( 'id' => 'theme_darkmode_background_transparency', 'type' => 'slider', 'title' => __('Dark mode Background Transparency','sakurairo_csf'), 'desc' => __('Slide to adjust, the recommended value range is 0.6-0.8. In order to ensure the best appearance, please keep the display of the frontend background image','sakurairo_csf'), 'step' => '0.01', 'min' => '0.2', 'max' => '1', 'default' => '0.8' ), array( 'type' => 'subheading', 'content' => __('Other Appearance Related','sakurairo_csf'), ), array( 'id' => 'theme_commemorate_mode', 'type' => 'switcher', 'title' => __('Commemorate Mode','sakurairo_csf'), 'label' => __('After turning on, a black and white filter will be added to the global theme','sakurairo_csf'), 'default' => false ), array( 'id' => 'load_out_svg', 'type' => 'text', 'title' => __('Occupying SVG while Loading Control Units','sakurairo_csf'), 'desc' => __('Fill in the address, which is the SVG displayed when loading control units','sakurairo_csf'), 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/load_svg/outload.svg' ), ) ) ); Sakurairo_CSF::createSection( $prefix, array( 'parent' => 'global', 'title' => __('Font Options','sakurairo_csf'), 'icon' => 'fa fa-font', 'fields' => array( array( 'type' => 'submessage', 'style' => 'info', 'content' => __('You can click here to learn how to set the options on this page','sakurairo_csf'), ), array( 'type' => 'subheading', 'content' => __('Global','sakurairo_csf'), ), array( 'id' => 'global_font_weight', 'type' => 'slider', 'title' => __('Non-Emphasis Text Weight','sakurairo_csf'), 'desc' => __('Slide to adjust, the recommended value range is 300-500','sakurairo_csf'), 'step' => '10', 'min' => '100', 'max' => '700', 'default' => '300' ), array( 'id' => 'global_font_size', 'type' => 'slider', 'title' => __('Text Font Size','sakurairo_csf'), 'desc' => __('Slide to adjust, the recommended value range is 15-18','sakurairo_csf'), 'step' => '1', 'unit' => 'px', 'min' => '10', 'max' => '20', 'default' => '15' ), array( 'type' => 'subheading', 'content' => __('External Fonts','sakurairo_csf'), ), array( 'id' => 'reference_exter_font', 'type' => 'switcher', 'title' => __('Reference External Fonts','sakurairo_csf'), 'label' => __('After turning on, you can use external fonts as the default font or other component fonts, but it may affect performance','sakurairo_csf'), 'default' => false ), array( 'id' => 'exter_font', 'type' => 'fieldset', 'title' => __('External Font Options','sakurairo_csf'), 'dependency' => array( 'reference_exter_font', '==', 'true' ), 'fields' => array( array( 'id' => 'font1', 'type' => 'text', 'title' => __('Font 1 Name','sakurairo_csf'), ), array( 'id' => 'link1', 'type' => 'text', 'title' => __('Font 1 Link','sakurairo_csf'), ), array( 'id' => 'font2', 'type' => 'text', 'title' => __('Font 2 Name','sakurairo_csf'), ), array( 'id' => 'link2', 'type' => 'text', 'title' => __('Font 2 Link','sakurairo_csf'), ), ), 'default' => array( 'font1' => '', 'link1' => '', 'font2' => '', 'link2' => '', ), ), array( 'id' => 'gfonts_api', 'type' => 'text', 'title' => __('Google Fonts Api Link','sakurairo_csf'), 'default' => 'fonts.geekzu.org' ), array( 'id' => 'gfonts_add_name', 'type' => 'text', 'title' => __('Google Fonts Name','sakurairo_csf'), 'desc' => __('Please make sure that the added fonts can be referenced in Google Fonts library. Fill in the font names. The added fonts must be preceded by "|". If multiple fonts are referenced, use "|" as the separator. If the font name has spaces, use a plus sign instead. For example: | zcool + xiaowei| Ma + Shan + Zheng','sakurairo_csf'), ), ) ) ); Sakurairo_CSF::createSection( $prefix, array( 'parent' => 'global', 'title' => __('Navigation Menu Options','sakurairo_csf'), 'icon' => 'fa fa-map-signs', 'fields' => array( array( 'type' => 'submessage', 'style' => 'info', 'content' => __('You can click here to learn how to set the options on this page','sakurairo_csf'), ), array( 'id' => 'nav_menu_style', 'type' => 'image_select', 'title' => __('Nav Menu Style','sakurairo_csf'), 'options' => array( 'sakurairo' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/nav_menu_style_iro.webp', 'sakura' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/nav_menu_style_sakura.webp', ), 'default' => 'sakurairo' ), array( 'id' => 'nav_menu_radius', 'type' => 'slider', 'title' => __('Nav Menu Radius','sakurairo_csf'), 'dependency' => array( 'nav_menu_style', '==', 'sakurairo' ), 'desc' => __('Slide to adjust, the recommended value is 15','sakurairo_csf'), 'unit' => 'px', 'max' => '50', 'default' => '15' ), array( 'id' => 'nav_menu_display', 'type' => 'radio', 'title' => __('Nav Menu Content Display Method','sakurairo_csf'), 'desc' => __('You can choose to unfold or fold the nav menu contents','sakurairo_csf'), 'options' => array( 'unfold' => __('Unfold','sakurairo_csf'), 'fold' => __('Fold','sakurairo_csf'), ), 'default' => 'unfold' ), array( 'id' => 'nav_menu_animation', 'type' => 'switcher', 'title' => __('Nav Menu Animation Effects','sakurairo_csf'), 'label' => __('It is on by default. If it is off, the nav menu content will be displayed directly without effects','sakurairo_csf'), 'default' => true ), array( 'id' => 'nav_menu_animation_time', 'type' => 'slider', 'title' => __('Nav Menu Animation Time','sakurairo_csf'), 'dependency' => array( 'nav_menu_animation', '==', 'true' ), 'desc' => __('Slide to adjust, the recommended value range is 1-2','sakurairo_csf'), 'step' => '0.01', 'unit' => 's', 'max' => '5', 'default' => '2' ), array( 'id' => 'nav_menu_font', 'type' => 'text', 'title' => __('Nav Menu Font','sakurairo_csf'), 'desc' => __('Fill in the font name. For example: Noto Serif SC','sakurairo_csf'), 'default' => 'Noto Serif SC' ), array( 'id' => 'nav_menu_search', 'type' => 'switcher', 'title' => __('Nav Menu Search','sakurairo_csf'), 'label' => __('It is on by default. Click to enter the search area','sakurairo_csf'), 'default' => true ), array( 'id' => 'search_area_background', 'type' => 'upload', 'title' => __('Search Area Background Image','sakurairo_csf'), 'desc' => __('Set the background image of your search area. Leave this option blank to display a white background','sakurairo_csf'), 'library' => 'image', 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/basic/iloli.gif' ), array( 'id' => 'nav_menu_user_avatar', 'type' => 'switcher', 'title' => __('Nav Menu User Avatar','sakurairo_csf'), 'label' => __('It is on by default. Click to enter the login interface','sakurairo_csf'), 'default' => true ), array( 'id' => 'unlisted_avatar', 'type' => 'upload', 'title' => __('Nav Menu Unlisted User Avatar','sakurairo_csf'), 'dependency' => array( 'nav_menu_user_avatar', '==', 'true' ), 'desc' => __('The best length-width ratio of is 1:1','sakurairo_csf'), 'library' => 'image', 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/basic/topavatar.png' ), array( 'id' => 'nav_menu_secondary_arrow', 'type' => 'switcher', 'title' => __('Secondary Menu Prompt Arrow','sakurairo_csf'), 'label' => __('After turning on, the menu prompt arrow will appear in the secondary menu of the navigation menu','sakurairo_csf'), 'dependency' => array( 'nav_menu_style', '==', 'sakura' ), 'default' => false ), array( 'id' => 'nav_menu_secondary_radius', 'type' => 'slider', 'title' => __('Secondary Menu Radius','sakurairo_csf'), 'dependency' => array( 'nav_menu_style', '==', 'sakurairo' ), 'desc' => __('Slide to adjust, the recommended value is 15','sakurairo_csf'), 'unit' => 'px', 'max' => '30', 'default' => '15' ), array( 'id' => 'mashiro_logo_option', 'type' => 'switcher', 'title' => __('Mashiro Logo Style','sakurairo_csf'), 'label' => __('After turning on, the Mashiro Logo will appear and replace the navigation menu logo position','sakurairo_csf'), 'default' => false ), array( 'id' => 'mashiro_logo', 'type' => 'fieldset', 'title' => __('Nav Menu Text Logo Options','sakurairo_csf'), 'fields' => array( array( 'id' => 'text_a', 'type' => 'text', 'title' => __('Text A','sakurairo_csf'), ), array( 'id' => 'text_b', 'type' => 'text', 'title' => __('Text B','sakurairo_csf'), ), array( 'id' => 'text_c', 'type' => 'text', 'title' => __('Text C','sakurairo_csf'), ), array( 'id' => 'text_secondary', 'type' => 'text', 'title' => __('Secondary Text','sakurairo_csf'), 'dependency' => array( 'text_b', '!=', '' ), ), array( 'id' => 'font_name', 'type' => 'text', 'title' => __('Font Name','sakurairo_csf'), ), ), 'default' => array( 'text_a' => '', 'text_b' => '', 'text_c' => '', 'text_secondary' => '', 'font_name' => 'Noto Serif SC', ), ), ) ) ); Sakurairo_CSF::createSection( $prefix, array( 'parent' => 'global', 'title' => __('Style Menu and Frontend Background Related Options','sakurairo_csf'), 'icon' => 'fa fa-th-large', 'fields' => array( array( 'type' => 'submessage', 'style' => 'info', 'content' => __('You can click here to learn how to set the options on this page','sakurairo_csf'), ), array( 'type' => 'subheading', 'content' => __('Style Menu','sakurairo_csf'), ), array( 'id' => 'style_menu_display', 'type' => 'image_select', 'title' => __('Style Menu Display','sakurairo_csf'), 'desc' => __('You can choose to display the style menu simply or in full. The full display will show the font toggle function and text hints','sakurairo_csf'), 'options' => array( 'full' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/style_menu_full.webp', 'mini' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/style_menu_mini.webp', ), 'default' => 'full' ), array( 'id' => 'style_menu_radius', 'type' => 'slider', 'title' => __('Style Menu Button Radius','sakurairo_csf'), 'desc' => __('Slide to adjust, the recommended value is 10','sakurairo_csf'), 'unit' => 'px', 'max' => '50', 'default' => '10' ), array( 'id' => 'style_menu_selection_radius', 'type' => 'slider', 'title' => __('Style Menu Options Interface Radius','sakurairo_csf'), 'desc' => __('Slide to adjust, the recommended value is 15','sakurairo_csf'), 'unit' => 'px', 'max' => '30', 'default' => '15' ), array( 'id' => 'style_menu_reception_text', 'type' => 'text', 'title' => __('Frontend Background Area Title','sakurairo_csf'), 'dependency' => array( 'style_menu_display', '==', 'full' ), 'desc' => __('Default is "Style", you can change it to anything else, but of course it CANNOT be used as an ad! Not allowed!!!' ,'sakurairo_csf'), 'default' => 'Style' ), array( 'id' => 'style_menu_font_area_text', 'type' => 'text', 'title' => __('Font Area Title','sakurairo_csf'), 'dependency' => array( 'style_menu_display', '==', 'full' ), 'desc' => __('Default is "Fonts", you can change it to anything else, but of course it CANNOT be used as an ad! Not allowed!!!' ,'sakurairo_csf'), 'default' => 'Fonts' ), array( 'id' => 'style_menu_font', 'type' => 'text', 'title' => __('Style Menu Font','sakurairo_csf'), 'dependency' => array( 'style_menu_display', '==', 'full' ), 'desc' => __('Fill in the font name. For example: Noto Serif SC','sakurairo_csf'), 'default' => 'Noto Serif SC' ), array( 'type' => 'subheading', 'content' => __('Frontend Background','sakurairo_csf'), ), array( 'id' => 'reception_background_size', 'type' => 'select', 'options' => array( 'cover' => __('Cover','sakurairo_csf'), 'contain' => __('Contain','sakurairo_csf'), 'auto' => __('Auto','sakurairo_csf'), ), 'title' => __('Frontend Background Scaling Method','sakurairo_csf'), 'desc' => __('You can choose two ways to scale the frontend background, the default is auto-scaling','sakurairo_csf'), 'default' => 'auto' ), array( 'id' => 'reception_background_blur', 'type' => 'switcher', 'title' => __('Background Transparency Blur','sakurairo_csf'), 'label' => __('After opening Background Transparency Blur','sakurairo_csf'), 'default' => false ), array( 'id' => 'reception_background', 'type' => 'tabbed', 'title' => __('Frontend Background Options','sakurairo_csf'), 'tabs' => array( array( 'title' => __('Default','sakurairo_csf'), 'icon' => 'fa fa-television', 'fields' => array( array( 'id' => 'img1', 'type' => 'upload', 'title' => __('Image','sakurairo_csf'), ), ) ), array( 'title' => __('Heart Shaped','sakurairo_csf'), 'icon' => 'fa fa-heart-o', 'fields' => array( array( 'id' => 'heart_shaped', 'type' => 'switcher', 'title' => __('Switch','sakurairo_csf'), ), array( 'id' => 'img2', 'type' => 'upload', 'title' => __('Image','sakurairo_csf'), ), ) ), array( 'title' => __('Star Shaped','sakurairo_csf'), 'icon' => 'fa fa-star-o', 'fields' => array( array( 'id' => 'star_shaped', 'type' => 'switcher', 'title' => __('Switch','sakurairo_csf'), ), array( 'id' => 'img3', 'type' => 'upload', 'title' => __('Image','sakurairo_csf'), ), ) ), array( 'title' => __('Square Shaped','sakurairo_csf'), 'icon' => 'fa fa-delicious', 'fields' => array( array( 'id' => 'square_shaped', 'type' => 'switcher', 'title' => __('Switch','sakurairo_csf'), ), array( 'id' => 'img4', 'type' => 'upload', 'title' => __('Image','sakurairo_csf'), ), ) ), array( 'title' => __('Lemon Shaped','sakurairo_csf'), 'icon' => 'fa fa-lemon-o', 'fields' => array( array( 'id' => 'lemon_shaped', 'type' => 'switcher', 'title' => __('Switch','sakurairo_csf'), ), array( 'id' => 'img5', 'type' => 'upload', 'title' => __('Image','sakurairo_csf'), ), ) ), ), 'default' => array( 'heart_shaped' => true, 'star_shaped' => true, 'square_shaped' => true, 'lemon_shaped' => true, 'img2' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/background/bg1.png', 'img3' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/background/bg2.png', 'img4' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/background/bg3.png', 'img5' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/background/bg4.png', ) ), array( 'id' => 'reception_background_transparency', 'type' => 'slider', 'title' => __('Background Transparency in the Frontend','sakurairo_csf'), 'desc' => __('Slide to adjust, the recommended sliding value range is 0.6-0.8','sakurairo_csf'), 'step' => '0.01', 'min' => '0.2', 'max' => '1', 'default' => '0.8' ), array( 'type' => 'subheading', 'content' => __('Font Area','sakurairo_csf'), ), array( 'id' => 'global_default_font', 'type' => 'text', 'title' => __('Global Default Font/Style Menu Font A','sakurairo_csf'), 'desc' => __('Fill in the font name. For example: Noto Serif SC','sakurairo_csf'), ), array( 'id' => 'global_font_2', 'type' => 'text', 'title' => __('Style Menu Font B','sakurairo_csf'), 'dependency' => array( 'style_menu_display', '==', 'full' ), 'desc' => __('Fill in the font name. For example: Noto Serif SC','sakurairo_csf'), ), ) ) ); Sakurairo_CSF::createSection( $prefix, array( 'parent' => 'global', 'title' => __('Footer Options','sakurairo_csf'), 'icon' => 'fa fa-caret-square-o-down', 'fields' => array( array( 'type' => 'submessage', 'style' => 'info', 'content' => __('You can click here to learn how to set the options on this page','sakurairo_csf'), ), array( 'id' => 'aplayer_server', 'type' => 'select', 'title' => __('Footer Online Music Player','sakurairo_csf'), 'desc' => __('A button will appear at the bottom left corner of the footer after turning on, click it and the footer online player will be displayed','sakurairo_csf'), 'options' => array( 'off' => __('Off','sakurairo_csf'), 'netease' => __('Netease Cloud Music','sakurairo_csf'), 'kugou' => __('Kugou Music(may not be available)','sakurairo_csf'), 'baidu' => __('Baidu Music(not available on servers overseas)','sakurairo_csf'), 'tencent' => __('QQ Music(may not be available)','sakurairo_csf'), ), 'default' => 'off' ), array( 'id' => 'aplayer_server_proxy', 'type' => 'text', 'title' => __('Footer Online Music Player Proxy','sakurairo_csf'), 'dependency' => array( 'aplayer_server', '!=', 'off' ), 'desc' => __('Ex. http://127.0.0.1:8080. Reference: https://curl.se/libcurl/c/CURLOPT_PROXY.html','sakurairo_csf'), 'default' => '' ), array( 'id' => 'aplayer_playlistid', 'type' => 'text', 'title' => __('Footer Online Music Player Songlist ID','sakurairo_csf'), 'dependency' => array( 'aplayer_server', '!=', 'off' ), 'desc' => __('Fill in the song ID, e.g. https://music.163.com/#/playlist?id=5380675133 SongID:5380675133','sakurairo_csf'), 'default' => '5380675133' ), array( 'id' => 'aplayer_order', 'type' => 'select', 'title' => __('Footer Online Music Player Mode','sakurairo_csf'), 'dependency' => array( 'aplayer_server', '!=', 'off' ), 'desc' => __('Select music player mode','sakurairo_csf'), 'options' => array( 'list' => __('List','sakurairo_csf'), 'random' => __('Random','sakurairo_csf'), ), 'default' => 'list' ), array( 'id' => 'aplayer_preload', 'type' => 'select', 'title' => __('Footer Online Music Player Preload','sakurairo_csf'), 'dependency' => array( 'aplayer_server', '!=', 'off' ), 'desc' => __('Whether to preload songs','sakurairo_csf'), 'options' => array( 'none' => __('Off','sakurairo_csf'), 'metadata' => __('Preload Metadata','sakurairo_csf'), 'auto' => __('Auto','sakurairo_csf'), ), 'default' => 'auto' ), array( 'id' => 'aplayer_volume', 'type' => 'slider', 'title' => __('Default Volume of Footer Online Music Player','sakurairo_csf'), 'dependency' => array( 'aplayer_server', '!=', 'off' ), 'desc' => __('Slide to adjust, the recommended sliding value range is 0.4-0.6','sakurairo_csf'), 'step' => '0.01', 'max' => '1', 'default' => '0.5' ), array( 'id' => 'aplayer_cookie', 'type' => 'textarea', 'title' => __('Netease Cloud Music Cookies','sakurairo_csf'), 'dependency' => array( 'aplayer_server', '==', 'netease' ), 'desc' => __('If you want to play VIP music on Netease Cloud Music Platform, please fill in your account cookies in this option.','sakurairo_csf'), ), array( 'id' => 'sakura_widget', 'type' => 'switcher', 'title' => __('Footer Widget Area','sakurairo_csf'), 'label' => __('After turning it on, a button will appear in the bottom of the left corner of the footer, when you click the button the footer widget area will be displayed, if you have the footer online player turned on it will be displayed together','sakurairo_csf'), 'default' => false ), array( 'id' => 'sakura_widget_background', 'type' => 'upload', 'title' => __('Footer Widget Area Background','sakurairo_csf'), 'dependency' => array( 'sakura_widget', '==', 'true' ), 'desc' => __('The best picture size is 400px × 460px','sakurairo_csf'), 'library' => 'image', ), array( 'id' => 'footer_info', 'type' => 'textarea', 'title' => __('Footer Info','sakurairo_csf'), 'desc' => __('Footer description text, supports HTML code','sakurairo_csf'), 'default' => 'Copyright © by FUUKEI All Rights Reserved.' ), array( 'id' => 'footer_text_font', 'type' => 'text', 'title' => __('Footer Text Font','sakurairo_csf'), 'desc' => __('Fill in the font name. For example: Noto Serif SC','sakurairo_csf'), 'default' => 'Noto Serif SC' ), array( 'id' => 'footer_load_occupancy', 'type' => 'switcher', 'title' => __('Footer Load Occupancy Query','sakurairo_csf'), 'label' => __('Load occupancy information will appear at the end of the page after turning it on. Not recommended in production environment.','sakurairo_csf'), 'default' => false ), array( 'id' => 'footer_upyun', 'type' => 'switcher', 'title' => __('Footer Upyun League Logo','sakurairo_csf'), 'label' => __('Upyun Logo will appear at the end of the page after turning it on','sakurairo_csf'), 'default' => false ), array( 'id'=>'footer_addition', 'type' => 'code_editor', 'sanitize' => false, 'title' => __('Footer Addition','sakurairo_csf'), 'desc' => __('Add HTML code at the end of the page. Useful for adding customize JavaScript.','sakurairo_csf'), ), array( 'type' => 'subheading', 'content' => __('Hitokoto','sakurairo_csf'), ), array( 'id' => 'footer_yiyan', 'type' => 'switcher', 'title' => __('Footer Hitokoto','sakurairo_csf'), 'label' => __('Hitokoto will appear at the end of the page after turning it on','sakurairo_csf'), 'default' => false ), array( 'type' => 'content', 'dependency' => array( 'footer_yiyan', '==', 'true' ), 'content' => __('' .'Fill in as the example: ["https://api.nmxc.ltd/yiyan/", "https://v1.hitokoto.cn/"]
, where the first API will be used first and the next ones will be the backup.
Official API: See the documentation for how to use it, and the parameter "return code" should not be anything except JSON. https://v1.hitokoto.cn/
' .'Maho API: An reverse proxy mirror of the official API. https://api.nmxc.ltd/yiyan/
','sakurairo_csf'), ), array( 'id' => 'yiyan_api', 'type' => 'textarea', 'title' => __('Hitokoto API address','sakurairo_csf'), 'dependency' => array( 'footer_yiyan', '==', 'true' ), 'desc' => __('Fill in the address in JavaScript array format','sakurairo_csf'), 'default' => '["https://v1.hitokoto.cn/","https://api.nmxc.ltd/yiyan/"]' ), ) ) ); Sakurairo_CSF::createSection( $prefix, array( 'parent' => 'global', 'title' => __('Cursor Options','sakurairo_csf'), 'icon' => 'fa fa-i-cursor', 'fields' => array( array( 'type' => 'submessage', 'style' => 'info', 'content' => __('You can click here to learn how to set the options on this page','sakurairo_csf'), ), array( 'id' => 'cursor_nor', 'type' => 'text', 'title' => __('Standard Cursor Style','sakurairo_csf'), 'desc' => __('Apply to global, fill in ".cur" mouse file link','sakurairo_csf'), 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/cursor/normal.cur' ), array( 'id' => 'cursor_no', 'type' => 'text', 'title' => __('Selected Cursor Style','sakurairo_csf'), 'desc' => __('Apply to multiple styles, fill in ".cur" file link','sakurairo_csf'), 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/cursor/No_Disponible.cur' ), array( 'id' => 'cursor_ayu', 'type' => 'text', 'title' => __('Selected Control Unit Cursor Style','sakurairo_csf'), 'desc' => __('Apply to selected control unit, fill in ".cur" file link','sakurairo_csf'), 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/cursor/ayuda.cur' ), array( 'id' => 'cursor_text', 'type' => 'text', 'title' => __('Selected Text Cursor Style','sakurairo_csf'), 'desc' => __('Apply to selected text, fill in ".cur" file link','sakurairo_csf'), 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/cursor/texto.cur' ), array( 'id' => 'cursor_work', 'type' => 'text', 'title' => __('Work Status Cursor Style','sakurairo_csf'), 'desc' => __('Apply to load control unit, fill in ".cur" file link','sakurairo_csf'), 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/cursor/work.cur' ), ) ) ); Sakurairo_CSF::createSection( $prefix, array( 'parent' => 'global', 'title' => __('Additional Options','sakurairo_csf'), 'icon' => 'fa fa-gift', 'fields' => array( array( 'type' => 'submessage', 'style' => 'info', 'content' => __('You can click here to learn how to set the options on this page','sakurairo_csf'), ), array( 'type' => 'subheading', 'content' => __('Effects&Animations','sakurairo_csf'), ), array( 'id' => 'preload_animation', 'type' => 'switcher', 'title' => __('Preload Animation','sakurairo_csf'), 'label' => __('Preload animation before new pages load; To enable this option, ensure your page resources can load properly.' ,'sakurairo_csf'), 'default' => false ), array( 'id' => 'preload_animation_color1', 'type' => 'color', 'title' => __('Preload Animation Color A','sakurairo_csf'), 'dependency' => array( 'preload_animation', '==', 'true' ), 'desc' => __('Customize the colors','sakurairo_csf'), 'default' => '#ffea99' ), array( 'id' => 'preload_animation_color2', 'type' => 'color', 'title' => __('Preload Animation Color B','sakurairo_csf'), 'dependency' => array( 'preload_animation', '==', 'true' ), 'desc' => __('Customize the colors','sakurairo_csf'), 'default' => '#FCCD00' ), array( 'id' => 'preload_blur', 'title' => __('Preload Animation Blur Transition Effect','sakurairo_csf'), 'dependency' => array( 'preload_animation', '==', 'true' ), 'desc' => __('Blur transition duration in milliseconds ms, off when set to 0.' ,'sakurairo_csf'), 'default' => '0', 'type' => 'slider', 'step' => '10', 'max' => '10000', ), array( 'id' => 'sakura_falling_effects', 'type' => 'select', 'title' => __('Sakura Falling Effects','sakurairo_csf'), 'options' => array( 'off' => __('Off','sakurairo_csf'), 'native' => __('Native Quantity','sakurairo_csf'), 'quarter' => __('Quarter Quantity','sakurairo_csf'), 'half' => __('Half Quantity','sakurairo_csf'), 'less' => __('Less Quantity','sakurairo_csf'), ), 'default' => 'off' ), array( 'id' => 'particles_effects', 'type' => 'switcher', 'title' => __('Particles Effects','sakurairo_csf'), 'dependency' => array( 'sakura_falling_effects', '==', 'off' ), 'label' => __('Particles effects will appear in the global background. Please open the Cover-and-Frontend-Background-Integration Options to get the best experience','sakurairo_csf'), 'default' => false ), array( 'id'=> 'particles_json', 'type' => 'code_editor', 'sanitize' => false, 'title' => __('Particles JSON','sakurairo_csf'), 'dependency' => array( 'particles_effects', '==', 'true' ), 'desc' => __('You can go to the Project Address to generate your unique Particles Effects','sakurairo_csf'), 'default' => ' { "particles": { "number": { "value": 200, "density": { "enable": true, "value_area": 800 } }, "color": { "value": "#fff" }, "shape": { "type": "circle", "stroke": { "width": 0, "color": "#000000" }, "polygon": { "nb_sides": 5 }, "image": { "src": "img/github.svg", "width": 100, "height": 100 } }, "opacity": { "value": 0.5, "random": true, "anim": { "enable": false, "speed": 1, "opacity_min": 0.1, "sync": false } }, "size": { "value": 10, "random": true, "anim": { "enable": false, "speed": 40, "size_min": 0.1, "sync": false } }, "line_linked": { "enable": false, "distance": 500, "color": "#ffffff", "opacity": 0.4, "width": 2 }, "move": { "enable": true, "speed": 2, "direction": "bottom", "random": false, "straight": false, "out_mode": "out", "bounce": false, "attract": { "enable": false, "rotateX": 600, "rotateY": 1200 } } }, "interactivity": { "detect_on": "canvas", "events": { "onhover": { "enable": true, "mode": "bubble" }, "onclick": { "enable": true, "mode": "repulse" }, "resize": true }, "modes": { "grab": { "distance": 400, "line_linked": { "opacity": 0.5 } }, "bubble": { "distance": 400, "size": 4, "duration": 0.3, "opacity": 1, "speed": 3 }, "repulse": { "distance": 200, "duration": 0.4 }, "push": { "particles_nb": 4 }, "remove": { "particles_nb": 2 } } }, "retina_detect": true }' ), array( 'id' => 'note_effects', 'type' => 'switcher', 'title' => __('Note Touch Effects','sakurairo_csf'), 'label' => __('After turning on, there will be a note sound alert when the back to top button and Mashiro style logo touch','sakurairo_csf'), 'default' => false ), array( 'type' => 'subheading', 'content' => __('Feature','sakurairo_csf'), ), array( 'id' => 'poi_pjax', 'type' => 'switcher', 'title' => __('PJAX Partial Refresh','sakurairo_csf'), 'label' => __('Enabled by default, clicking to a new page will not require reloading','sakurairo_csf'), 'default' => true ), array( 'id' => 'nprogress_on', 'type' => 'switcher', 'title' => __('NProgress Loading Progress Bar','sakurairo_csf'), 'label' => __('Enabled by default, when loading page there will be a progress bar alert','sakurairo_csf'), 'default' => true ), array( 'id' => 'smoothscroll_option', 'type' => 'switcher', 'title' => __('Global Smooth Scroll','sakurairo_csf'), 'label' => __('Enabled by default, page scrolling will be smoother','sakurairo_csf'), 'default' => true ), array( 'id' => 'captcha_select', 'type' => 'select', 'title' => __('Captcha Selection','sakurairo_csf'), 'options' => array( 'off' => __('Off','sakurairo_csf'), 'iro_captcha' => __('Theme Built in Captcha','sakurairo_csf'), 'vaptcha' => __('Vaptcha','sakurairo_csf') ), 'default' => 'off', ), array( 'id' => 'vaptcha_vid', 'type' => 'text', 'title' => __('Vaptcha VID','sakurairo_csf'), 'dependency' => array( 'captcha_select', '==', 'vaptcha' ), 'desc' => __('Fill in your Vaptcha VID','sakurairo_csf'), ), array( 'id' => 'vaptcha_key', 'type' => 'text', 'title' => __('Vaptcha KEY','sakurairo_csf'), 'dependency' => array( 'captcha_select', '==', 'vaptcha' ), 'desc' => __('Fill in your Vaptcha KEY','sakurairo_csf'), ), array( 'id' => 'vaptcha_scene', 'type' => 'select', 'title' => __('Vaptcha Scene','sakurairo_csf'), 'dependency' => array( 'captcha_select', '==', 'vaptcha' ), 'options' => array( '1' => __(1,'sakurairo_csf'), '2' => __(2,'sakurairo_csf'), '3' => __(3,'sakurairo_csf'), '4' => __(4,'sakurairo_csf'), '5' => __(5,'sakurairo_csf'), '6' => __(6,'sakurairo_csf'), ), 'default' => 1, ), array( 'id' => 'pagenav_style', 'type' => 'radio', 'title' => __('Pagination Mode','sakurairo_csf'), 'options' => array( 'ajax' => __('Ajax Load','sakurairo_csf'), 'np' => __('Page Up/Down','sakurairo_csf'), ), 'default' => 'ajax' ), array( 'id' => 'page_auto_load', 'type' => 'select', 'title' => __('Next Page Auto Load','sakurairo_csf'), 'dependency' => array( 'pagenav_style', '==', 'ajax' ), 'options' => array( '233' => __('do not autoload','sakurairo_csf'), '0' => __('0 Sec','sakurairo_csf'), '1' => __('1 Sec','sakurairo_csf'), '2' => __('2 Sec','sakurairo_csf'), '3' => __('3 Sec','sakurairo_csf'), '4' => __('4 Sec','sakurairo_csf'), '5' => __('5 Sec','sakurairo_csf'), '6' => __('6 Sec','sakurairo_csf'), '7' => __('7 Sec','sakurairo_csf'), '8' => __('8 Sec','sakurairo_csf'), '9' => __('9 Sec','sakurairo_csf'), '10' => __('10 Sec','sakurairo_csf'), ), 'default' => '233' ), array( 'id' => 'load_nextpage_svg', 'type' => 'text', 'title' => __('Placeholder SVG when loading the next page','sakurairo_csf'), 'desc' => __('Fill in the address, this is the SVG that will be displayed as a placeholder when the next page is loading','sakurairo_csf'), 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/load_svg/ball.svg' ), ) ) ); Sakurairo_CSF::createSection( $prefix, array( 'id' => 'homepage', 'title' => __('HomePage Options','sakurairo_csf'), 'icon' => 'fa fa-home', ) ); Sakurairo_CSF::createSection( $prefix, array( 'parent' => 'homepage', 'title' => __('Cover Options','sakurairo_csf'), 'icon' => 'fa fa-laptop', 'fields' => array( array( 'type' => 'submessage', 'style' => 'info', 'content' => __('You can click here to learn how to set the options on this page','sakurairo_csf'), ), array( 'id' => 'cover_switch', 'type' => 'switcher', 'title' => __('Cover Switch','sakurairo_csf'), 'label' => __('On by default, if off, all options below will be disabled','sakurairo_csf'), 'default' => true ), array( 'id' => 'cover_full_screen', 'type' => 'switcher', 'title' => __('Cover Full Screen','sakurairo_csf'), 'label' => __('Default on','sakurairo_csf'), 'default' => true ), array( 'id' => 'cover_half_screen_curve', 'type' => 'switcher', 'dependency' => array( 'cover_full_screen', '==', 'false' ), 'title' => __('Cover Arc Occlusion (Below)','sakurairo_csf'), 'label' => __('An arc occlusion will appear below the cover when turned on','sakurairo_csf'), 'default' => false ), array( 'id' => 'cover_radius', 'type' => 'slider', 'title' => __('Cover Radius','sakurairo_csf'), 'desc' => __('Slide to adjust, the recommended value range is 15-20','sakurairo_csf'), 'unit' => 'px', 'max' => '60', 'default' => '15' ), array( 'id' => 'cover_animation', 'type' => 'switcher', 'title' => __('Cover Animation','sakurairo_csf'), 'label' => __('On by default, if off, the cover will be displayed directly','sakurairo_csf'), 'default' => true ), array( 'id' => 'cover_animation_time', 'type' => 'slider', 'title' => __('Cover Animation Time','sakurairo_csf'), 'dependency' => array( 'cover_animation', '==', 'true' ), 'desc' => __('Slide to adjust, the recommended value range is 1-2','sakurairo_csf'), 'step' => '0.01', 'unit' => 's', 'max' => '5', 'default' => '2' ), array( 'id' => 'infor_bar', 'type' => 'switcher', 'title' => __('Cover Info Bar','sakurairo_csf'), 'label' => __('Enabled by default, show avatar, Mashiro effects text, signature bar, shuoshuo bar, social area','sakurairo_csf'), 'default' => true ), array( 'id' => 'infor_bar_style', 'type' => 'image_select', 'title' => __('Cover Info Bar Style','sakurairo_csf'), 'options' => array( 'v1' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/infor_bar_style_v1.webp', 'v2' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/infor_bar_style_v2.webp', ), 'default' => 'v1' ), array( 'id' => 'infor_bar_bgcolor', 'type' => 'color', 'title' => __('Cover Info Bar Background Color','sakurairo_csf'), 'desc' => __('Customize the colors, light colors are recommended','sakurairo_csf'), 'default' => 'rgba(255,255,255,0.6)' ), array( 'id' => 'avatar_radius', 'type' => 'slider', 'title' => __('Cover Info Bar Avatar Radius','sakurairo_csf'), 'desc' => __('Slide to adjust, the recommended value is 100','sakurairo_csf'), 'unit' => 'px', 'default' => '100' ), array( 'id' => 'signature_radius', 'type' => 'slider', 'title' => __('Cover Info Bar Rounded','sakurairo_csf'), 'desc' => __('Slide to adjust, the recommended value range 10-20','sakurairo_csf'), 'unit' => 'px', 'max' => '50', 'default' => '15' ), array( 'id' => 'signature_text', 'type' => 'text', 'title' => __('Cover Signature Field Text','sakurairo_csf'), 'desc' => __('A self-descriptive quote','sakurairo_csf'), 'default' => '届ける言葉を今は育ててる' ), array( 'id' => 'signature_font', 'type' => 'text', 'title' => __('Cover Signature Field Text Font','sakurairo_csf'), 'desc' => __('Fill in the font name. For example: Noto Serif SC','sakurairo_csf'), 'default' => 'Noto Serif SC' ), array( 'id' => 'signature_font_size', 'type' => 'slider', 'title' => __('Cover Signature Field Text Font Size','sakurairo_csf'), 'desc' => __('Slide to adjust, the recommended value range is 15-18','sakurairo_csf'), 'unit' => 'px', 'min' => '5', 'max' => '20', 'default' => '16' ), array( 'id' => 'signature_typing', 'type' => 'switcher', 'title' => __('Cover Signature Bar Typing Effects','sakurairo_csf'), 'label' => __('When turned on, the signature bar text will have an additional paragraph of text and will be rendered with typing effects','sakurairo_csf'), 'default' => false ), array( 'id' => 'signature_typing_marks', 'type' => 'switcher', 'title' => __('Cover Signature Field Typing Effects Double Quotes','sakurairo_csf'), 'dependency' => array( 'signature_typing', '==', 'true' ), 'label' => __('Typing effects will be appended with double quotes when turned on','sakurairo_csf'), 'default' => false ), array( 'id' => 'signature_typing_placeholder', 'type' => 'text', 'title' => __('Cover Signature Field Typing Effects Placeholder','sakurairo_csf'), 'dependency' => array( 'signature_typing', '==', 'true' ), 'default' => '疯狂造句中......' ), array( 'id' => 'signature_typing_json', 'type' => 'code_editor', 'sanitize' => false, 'title' => __('Typed.js initial option','sakurairo_csf'), 'dependency' => array( 'signature_typing', '==', 'true' ), 'default' => '{"strings":["给时光以生命,给岁月以文明"],"typeSpeed":140,"backSpeed":50,"loop":false,"showCursor":true}' ), array( 'id' => 'homepage_shuoshuo', 'type' => 'switcher', 'title' => __('Cover Shuoshuo Bar','sakurairo_csf'), 'label' => __('When turned on, the Latest Shuoshuo text will be Cyclic displayed with info bar ','sakurairo_csf'), 'default' => false ), array( 'id' => 'random_graphs_options', 'type' => 'select', 'title' => __('Cover Random Image Options','sakurairo_csf'), 'options' => array( 'external_api' => __('External API','sakurairo_csf'), 'webp_optimization' => __('Webp optimized','sakurairo_csf'), 'local' => __('Local','sakurairo_csf'), ), 'default' => 'external_api' ), array( 'id' => 'random_graphs_mts', 'type' => 'switcher', 'title' => __('Cover Random Image Multi-terminal Separation','sakurairo_csf'), 'label' => __('Enabled by default, desktop and mobile devices will use separate random image addresses','sakurairo_csf'), 'default' => true ), array( 'id' => 'random_graphs_link', 'type' => 'text', 'title' => __('Webp Optimization/External API Desktop Side Random Graphics Address','sakurairo_csf'), 'desc' => __('Fill in an URL','sakurairo_csf'), 'default' => 'https://api.maho.cc/random-img/pc.php', 'sanitize' => false, 'validate' => 'csf_validate_url', ), array( 'id' => 'random_graphs_link_mobile', 'type' => 'text', 'title' => __('External API Mobile Devices Random Image Address','sakurairo_csf'), 'dependency' => array( 'random_graphs_mts', '==', 'true' ), 'desc' => __('Fill in an URL','sakurairo_csf'), 'default' => 'https://api.maho.cc/random-img/mobile.php', 'sanitize' => false, 'validate' => 'csf_validate_url', ), array( 'id' => 'cache_cover', 'type' => 'switcher', 'title' => __('Cover Random Background Image Cache','sakurairo_csf'), 'label' => __('Enabled by default, this feature will cache a cover image locally, which can improve the loading speed of the first cover after entering the homepage. Note: This feature needs the cover APIs that accept cross-domain requests.' ,'sakurairo_csf'), 'default' => true ), array( 'id' => 'site_bg_as_cover', 'type' => 'switcher', 'title' => __('Cover and Frontend Background Integration','sakurairo_csf'), 'label' => __('When enabled, the background of the cover will be set to transparent, while the frontend background will use the cover\'s random image API','sakurairo_csf'), 'default' => false ), array( 'id' => 'random_graphs_filter', 'type' => 'select', 'title' => __('Cover Random Images Filter','sakurairo_csf'), 'options' => array( 'filter-nothing' => __('No filter','sakurairo_csf'), 'filter-undertint' => __('Light filter','sakurairo_csf'), 'filter-dim' => __('Dimmed filter','sakurairo_csf'), 'filter-grid' => __('Grid filter','sakurairo_csf'), 'filter-dot' => __('Dot filter','sakurairo_csf'), ), 'default' => 'filter-nothing' ), array( 'id' => 'wave_effects', 'type' => 'switcher', 'title' => __('Cover Wave Effects','sakurairo_csf'), 'label' => __('Wave effect will appear at the bottom of the cover of the home page after turning on, and it will be forced off in the dark mode','sakurairo_csf'), 'default' => false ), array( 'id' => 'drop_down_arrow', 'type' => 'switcher', 'title' => __('Cover Dropdown Arrow','sakurairo_csf'), 'label' => __('Enabled by default, show a dropdown arrow at bottom of home cover','sakurairo_csf'), 'default' => true ), array( 'id' => 'drop_down_arrow_mobile', 'type' => 'switcher', 'title' => __('Cover Dropdown Arrow Display on Mobile Devices','sakurairo_csf'), 'dependency' => array( 'drop_down_arrow', '==', 'true' ), 'label' => __('Drop down arrow will appear at the bottom of the mobile devices\' home cover after turning it on','sakurairo_csf'), 'default' => false ), array( 'id' => 'drop_down_arrow_color', 'type' => 'color', 'title' => __('Cover Dropdown Arrow Color','sakurairo_csf'), 'dependency' => array( 'drop_down_arrow', '==', 'true' ), 'desc' => __('Customize the colors, light colors are recommended','sakurairo_csf'), 'default' => 'rgba(255,255,255,0.8)' ), array( 'id' => 'drop_down_arrow_dark_color', 'type' => 'color', 'title' => __('Cover Dropdown Arrow Color (Dark Mode)','sakurairo_csf'), 'dependency' => array( 'drop_down_arrow', '==', 'true' ), 'desc' => __('Customize the colors, dark colors are recommended','sakurairo_csf'), 'default' => 'rgba(51,51,51,0.8)' ), array( 'id' => 'cover_video', 'type' => 'switcher', 'title' => __('Cover Video','sakurairo_csf'), 'label' => __('Use a video instead of the images as the cover','sakurairo_csf'), 'default' => false ), array( 'id' => 'cover_video_loop', 'type' => 'switcher', 'title' => __('Cover Video Loop','sakurairo_csf'), 'dependency' => array( 'cover_video', '==', 'true' ), 'label' => __('Video will loop automatically when enabled.','sakurairo_csf'), 'default' => false ), array( 'id' => 'cover_video_live', 'type' => 'switcher', 'title' => __('Cover Video Auto Resume','sakurairo_csf'), 'dependency' => array( 'cover_video', '==', 'true' ), 'label' => __('Cover Video will resume automatically when coming back to homepage while Pjax enabled.','sakurairo_csf'), 'default' => false ), array( 'id' => 'cover_video_link', 'type' => 'text', 'title' => __('Cover Video URL Base Path','sakurairo_csf'), 'dependency' => array( 'cover_video', '==', 'true' ), 'validate' => 'iro_validate_optional_url', 'desc' => __("Fill in the base path your video located at. For example: https://localhost. Your site's URL is used as default. Please pay attention to the protocol name of the URL.",'sakurairo_csf'), ), array( 'id' => 'cover_video_title', 'type' => 'text', 'title' => __('Cover Video File Name','sakurairo_csf'), 'dependency' => array( 'cover_video', '==', 'true' ), 'desc' => __('For example: abc.mp4. Multiple videos should be separated by English commas like "abc.mp4,efg.mp4," Random play is on by default.','sakurairo_csf'), ), ) ) ); Sakurairo_CSF::createSection( $prefix, array( 'parent' => 'homepage', 'title' => __('Cover Social Area Options','sakurairo_csf'), 'icon' => 'fa fa-share-square-o', 'fields' => array( array( 'type' => 'submessage', 'style' => 'info', 'content' => __('You can click here to learn how to set the options on this page','sakurairo_csf'), ), array( 'type' => 'subheading', 'content' => __('Related Options','sakurairo_csf'), ), array( 'id' => 'social_area', 'type' => 'switcher', 'title' => __('Cover Social Area','sakurairo_csf'), 'label' => __('Enabled by default, show cover random image toggle button and social network icons','sakurairo_csf'), 'default' => true ), array( 'id' => 'social_display_icon', 'type' => 'image_select', 'title' => __('Social Icon','sakurairo_csf'), 'desc' => __('Select your favorite icon pack. Icon pack references are detailed in the "About Theme" section','sakurairo_csf'), 'options' => array( 'display_icon/fluent_design' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_fd.gif', 'display_icon/muh2' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_h2.gif', 'display_icon/flat_colorful' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_fc.gif', 'display_icon/sakura' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_sa.gif', 'display_icon/macaronblue' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_mb.webp', 'display_icon/macarongreen' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_mg.webp', 'display_icon/macaronpurple' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_mp.webp', 'display_icon/pink' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_sp.webp', 'display_icon/orange' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_so.webp', 'display_icon/sangosyu' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_sg.webp', 'display_icon/sora' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_ts.webp', 'display_icon/nae' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_nn.webp', ), 'default' => 'display_icon/fluent_design' ), array( 'id' => 'social_area_radius', 'type' => 'slider', 'title' => __('Cover Social Area Rounded Corners','sakurairo_csf'), 'dependency' => array( 'social_area', '==', 'true' ), 'desc' => __('Slide to adjust, the recommended value range is 10-20','sakurairo_csf'), 'unit' => 'px', 'max' => '30', 'default' => '15' ), array( 'id' => 'cover_random_graphs_switch', 'type' => 'switcher', 'title'… --- ## [timothynn/awesome-datascience](https://github.com/timothynn/awesome-datascience)@[3b71f0bbc3...](https://github.com/timothynn/awesome-datascience/commit/3b71f0bbc3e4a68a4c431f59309c61eb96ae5912) #### Tuesday 2023-05-02 12:46:29 by Andrew Carr Update README.md I just published a book about using data science in your personal day-to-day life. I think this group might appreciate it. There are fun pictures, code, math, and jokes. I hope self promotion is ok, this seemed really relevant to the community. --- ## [mozilla-releng/staging-firefox-translations-training](https://github.com/mozilla-releng/staging-firefox-translations-training)@[1aaff8f00c...](https://github.com/mozilla-releng/staging-firefox-translations-training/commit/1aaff8f00c9a75574c45373c3893cd6530c19959) #### Tuesday 2023-05-02 13:03:27 by Ben Hearsum Add toolchain tasks for things that we depend on to train language models. Most of these are straight forward download and compiles, but there's a few callouts: - The CLI tools (marian, fast-align, etc.) already have build scripts used by the existing pipeline. For the most part, I'm just replacing them with my own version because they're just unpack/make/cmake. The exception is Marian, which has a little bit more going on with cmake definitions. Maybe I should just copy those in here though? - Some Python modules that don't have binary wheels available, which we ought to build to avoid needing to compile them at the start of training tasks. - CUDA (a NVIDIA Toolkit) is a huge pain. They don't have any real advertised way to just dump the files you want into a directory (they want you to run an installer). I _think_ I managed to get this work, but it's possible this will need a tweak in the future if a future task has trouble with the current toolchain. This also necessitated switching Docker images to Ubuntu, because some tools were not reasonably possible to make work on Alpine. --- ## [gonenoculer5/Gameserver](https://github.com/gonenoculer5/Gameserver)@[27d37cb0f4...](https://github.com/gonenoculer5/Gameserver/commit/27d37cb0f47d007d1159ad5af69ace39a50b003f) #### Tuesday 2023-05-02 13:04:17 by Gallyus Alternate Version Tests (#281) * AltVer Checks I think? Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> * 1603 target * support script * HOLY SHIT CAN I READ * e * HOLY FUCK CAN I READ * Disable shortkill version check --- ## [Offroaders123/Region-Types](https://github.com/Offroaders123/Region-Types)@[5cbf3cf478...](https://github.com/Offroaders123/Region-Types/commit/5cbf3cf4782bb41cd8d8ad61f72474d2a4a5e20e) #### Tuesday 2023-05-02 13:04:59 by Offroaders123 Further Archive (LCE) Trying to see how I can possibly discern the different world archive types from each other. Then the tool can just figure out whichever format it should use ahead of time :) ``` Zip Archive | "PK.." | 0x50 0x4B 0x03 0x04 ``` https://www.netspi.com/blog/technical/web-application-penetration-testing/magic-bytes-identifying-common-file-formats-at-a-glance/ Didn't get to it tonight, I do want to try next though, to use my SNBT implementation to be able to generate TypeScript types from existing NBT archives! That's a super awesome workaround to automating things. It will simply extract the type of the NBT tag themselves, and use that for the output instead of their own values. With a little tweaking to the SNBT handling, it could instead output something JSON-esque, but I could instead format to use as a good'ol TS interface declaration, for that same NBT structure. Then I don't have to make the types for anything fully by hand, I will only have to open the file to generate the types for it. Once the demo is working, I think it'll probably be fully capable for me to make a complete type declaration for the NBT, with formatting and all. It might take a little extra to get the string manipulation working to get there, but having SNBT made that much closer to being able to do. WOW that is a neat idea. I think that realization was partly what helped me start working on this project again, because I kind of started to see how I could hook everything all together. Speaking of that, while I remember it, I thought of how I could do the versioning for the NBT structures, too. It will be using interfaces instead of classes, and I think I want to make use of interface merging in order to get the type checking working. Each version of a specific platform will have a definite set of type definitions, and they will always be available. It's not like only the new types will be there. I will need to maintain the interfaces for each version alongside each other, and this will help find the differences between each version's format much sooner. You will simply get type checking errors for any differing properties that don't line up with the other version. This will be probably simple for the pre-Flattening versions, and the jump to Flattening will likely have the most to manually map between. I think the older versions will only have incremental additions and removals of any given features, so it will mostly just have to handle those cases where some things may not have equivalent counterparts in those versions. Thought of this setup again while on a night walkies :) I was early in thinking it through a while ago, I wasn't sure about how to merge type files or interfaces back then though, and now I have more stronger of feelings that it could be doable! Essentially the type files will work like how the merging does for the different ES versions, and TypeScript's definitions for them. There will probably be a base types file (say, likely an older version), and subsequent versions will only include the changes that they actually made there. Breaking changes between version formats (aka, Flattening) will have to be adjusted somehow in regards to types and merging, as I probably won't want to allow the pre-Flattening types to collide or mingle with the Flattening ones. Alright! Time for bed now. This morning.. --- ## [BlueMoon-Labs/SERP-BlueMoon-Station-13](https://github.com/BlueMoon-Labs/SERP-BlueMoon-Station-13)@[7a64573c8b...](https://github.com/BlueMoon-Labs/SERP-BlueMoon-Station-13/commit/7a64573c8bfa01bac0d690db68d4b6528d502579) #### Tuesday 2023-05-02 14:10:27 by SkyratBot [MIRROR] Atmos QOL + Small Sprite Fix [MDB IGNORE] (#20243) * Atmos QOL + Small Sprite Fix (#74251) ## About The Pull Request Added screentips and balloon alerts to many atmos machines/pipes Volume pump overclocking overlay is much slower and less seizure inducing RPD screentips for right clicking pipes to copy settings Removed (RPD) from the RPD's name since having an abbreviation in the name is ugly Crystallizer and electrolyzer use ctrl+click and alt-click to turn on On examine electrolyzer tells you about anchoring to drain from APC instead of cell ## Why It's Good For The Game QOL for atmos stuff, user friendliness and better experience ## Changelog :cl: fix: Volume pump overclocking animation is much slower, no more headaches qol: Added screentips to the RPD; screentips and balloon alerts to many atmos machines and devices :cl: * Atmos QOL + Small Sprite Fix --------- Co-authored-by: 13spacemen <46101244+13spacemen@users.noreply.github.com> --- ## [BlueMoon-Labs/SERP-BlueMoon-Station-13](https://github.com/BlueMoon-Labs/SERP-BlueMoon-Station-13)@[f3614ce53c...](https://github.com/BlueMoon-Labs/SERP-BlueMoon-Station-13/commit/f3614ce53c9f02d6c4e21b935b6231e98d3348af) #### Tuesday 2023-05-02 14:10:27 by SkyratBot [MIRROR] Thrown containers splashing on mobs spill some contents on the floor [MDB IGNORE] (#20252) * Thrown containers splashing on mobs spill some contents on the floor (#74345) ## About The Pull Request Spiritual continuation of tgstation/tgstation#74187. ![image](https://user-images.githubusercontent.com/31829017/228645705-5a32cc67-37e0-48d6-9e95-6006f455ed3c.png) Reagent containers that splash their contents on people also splash the floor - the amount that gets splashed on the floor is the amount that missed the target. ### Mapping March Ckey to receive rewards: N/A (it's not a mapping PR) ## Why It's Good For The Game Splashing people with a molotov filled with Random Shit now also splashes that Random Shit all around, making them slightly more spicy to play around with. Unfortunately, I couldn't figure out how to make fuel puddles ignite off of lit objects resting on top of them (there's no item-level proc for hotspot exposure or something). If anyone wants to advise me on how to make that happen, that'd be cool. ## Changelog :cl: add: Reagent containers that splash on people when thrown (e.g. molotovs) now spill their contents on both target and turf. (This means that throwing molotovs with enough fuel spills fuel puddles, throwing beakers with acid spills acid on the floor, etc. etc.) Unfortunately, molotovs still lack the ability to ignite their own spilled fuel, but we'll get there one day. /:cl: Co-authored-by: Hatterhat * Thrown containers splashing on mobs spill some contents on the floor --------- Co-authored-by: Hatterhat <31829017+Hatterhat@users.noreply.github.com> Co-authored-by: Hatterhat --- ## [tgstation/tgstation](https://github.com/tgstation/tgstation)@[912e843f53...](https://github.com/tgstation/tgstation/commit/912e843f53cf33b15148ec5a5ec66ce107314467) #### Tuesday 2023-05-02 15:22:46 by san7890 Allows Export of your Preferences JSON File (#75014) ## About The Pull Request Hey there, This was spoken about in #70492 (specifically tgstation/tgstation#70492 (comment)), and I have been waiting for this to be implemented for some time. It never got implemented, so I decided to code it myself. Basically, **if the server host doesn't disable it**, you are free to export your JSONs as a player, right from the stat-panel. It's a pretty JSON on 515 versions, too! It's right here: ![image](https://user-images.githubusercontent.com/34697715/235251447-1c977718-51fd-4025-8d89-c60bffc379ec.png) Here's what the prettified JSON looks like on 515. ![image](https://user-images.githubusercontent.com/34697715/235321061-4a217e26-c082-4bba-b54a-2c780defda0a.png) There's a cooldown (default to 10 seconds) between exporting your preferences. #### Why is this config? It's because in the past, a server host could always just file-share the .sav or .json or whatever to the player, but they would have to do the explicit option of actually bothering to make the files accessible to the player. In that same line of logic, the server operator will have to explicitly make the files accessible. This is mostly because I'm not sure how good `ftp()` is at being a player function and wanted to have some sort of cap/control somehow in case an exploit vector is detected or it's just plain spammed by bots, so we'll just leave it up to the direct providers of this data to elect if they wish to provide the data or not. ## Why It's Good For The Game Players don't have to log into Server A to remember what hairstyle they loved using when they want to swap to Server B! That's amazing actually. I always forget what ponytail my character has, and it'll be nice to have the hairstyle in a readily accessible place (after I prettify the JSON for myself). It's also more convenient for server hosts to make player data like this accessible if they really want to, too. If we ever add an _import_ feature in the future (which would have to be done with a LOT of care), this will also be useful. I wouldn't advise it though having taken a precursory look at how much goes into it while trying to ascertain the scope of this PR. ## Changelog :cl: qol: The game now supports export of your preferences into a JSON file! The verb (export-preferences) should now be available in the OOC tab of your stat-panel if enabled by server operators. server: Exporting player preferences is controlled by a configuration option, 'FORBID_PREFERENCES_EXPORT'. If you do not wish to let clients access the ftp() function to their own preferences file (probably for bandwidth reasons?) you should uncomment this or add it to your config somehow. config: Server operators are also able to set the cooldown between requests to download the JSON Preferences file via the 'SECONDS_COOLDOWN_FOR_PREFERENCES_EXPORT' config option. /:cl: --- ## [chelsymme/SQL_Games_Completed](https://github.com/chelsymme/SQL_Games_Completed)@[61842f2847...](https://github.com/chelsymme/SQL_Games_Completed/commit/61842f2847d1a3be3ac9543b4cb879eb89e8a839) #### Tuesday 2023-05-02 15:56:27 by Chel The SQL Murder Mystery Game by Knight Lab A crime has taken place and the detective needs your help. The detective gave you the crime scene report, but you somehow lost it. You vaguely remember that the crime was a murder that occurred sometime on Jan.15, 2018 and that it took place in SQL City. Start by retrieving the corresponding crime scene report from the police department’s database. --- ## [ServiceWeaver/weaver](https://github.com/ServiceWeaver/weaver)@[21156c9ebf...](https://github.com/ServiceWeaver/weaver/commit/21156c9ebfecae264986cf6e154b28e8329977d3) #### Tuesday 2023-05-02 16:31:42 by Michael Whittaker Changed deployers to persist data in one spot. Recall that deployers often have to persist various data to the file system. The "weaver multi" deployer, for example, persists logs, registrations, and traces to files. Before this PR, deployers would store logs in /tmp and everything else in ~/.local/share/serviceweaver. Different deployers would sometimes store their data in the same directory. A "multi_perfetto.db" file would be right next to a "single_perfetto.db" file, for example. This made purging data files annoying. It was like a scavenger hunt trying to track down the various places that data was stored. This PR changes deployers to store all their data in a single directly. For example, the "weaver multi" deployer now stores everything inside "~/.local/share/serviceweaver/multi". The single process deployer stores everything inside "~/.local/share/serviceweaver/single". This makes purging much simpler. It also makes it clearer which files are being used by which deployers. Note that this PR moves logs out of /tmp, which persists them longer. This means that logs won't be garbage collected automatically, but I think that's actually a good thing. We should implement a principled way of garbage collecting logs, rather than leaving it up to /tmp. I think it would be surprising and frustrating if an important log file was spuriously deleted by the OS. --- ## [swarm-game/swarm](https://github.com/swarm-game/swarm)@[a4c8057a28...](https://github.com/swarm-game/swarm/commit/a4c8057a28e043caed531e7d035efc2a41dc30a1) #### Tuesday 2023-05-02 17:00:07 by Brent Yorgey Records (#1148) Add record types to the language: record values are written like `[x = 3, y = "hi"]` and have types like `[x : int, y : text]`. Empty and singleton records are allowed. You can project a field out of a record using standard dot notation, like `r.x`. If things named e.g. `x` and `y` are in scope, you can also write e.g. `[x, y]` as a shorthand for `[x=x, y=y]`. Closes #1093 . #153 would make this even nicer to use. One reason this is significant is that record projection is our first language construct whose type cannot be inferred, because if we see something like `r.x` all we know about the type of `r` is that it is a record type with at least one field `x`, but we don't know how many other fields it might have. Without some complex stuff like row polymorphism we can't deal with that, so we just punt and throw an error saying that we can't infer the type of a projection. To make this usable we have to do a better job checking types, a la #99 . For example `def f : [x:int] -> int = \r. r.x end` would not have type checked before, since when checking the lambda we immediately switched into inference mode, and then encountered the record projection and threw up our hands. Now we work harder to push the given function type down into the lambda so that we are still in checking mode when we get to `r.x` which makes it work. But it is probably easy to write examples of other things where this doesn't work. Eventually we will want to fully implement #99 ; in the meantime one can always add a type annotation (#1164) on the record to get around this problem. Note, I was planning to add a `open e1 in e2` syntax, which would take a record expression `e1` and "open" it locally in `e2`, so all the fields would be in scope within `e2`. For example, if we had `r = [x = 3, y = 7]` then instead of writing `r.x + r.y` you could write `open r in x + y`. This would be especially useful for imports, as in `open import foo.sw in ...`. However, it turns out to be problematic: the only way to figure out the free variables in `open e1 in e2` is if you know the *type* of `e1`, so you know which names it binds in `e2`. (In all other cases, bound names can be determined statically from the *syntax*.) However, in our current codebase there is one place where we get the free variables of an untyped term: we decide at parse time whether definitions are recursive (and fill in a boolean to that effect) by checking whether the name of the thing being defined occurs free in its body. One idea might be to either fill in this boolean later, after typechecking, or simply compute it on the fly when it is needed; currently this is slightly problematic because we need the info about whether a definition is recursive when doing capability checking, which is currently independent of typechecking. I was also planning to add `export` keyword which creates a record with all names currently in scope --- this could be useful for creating modules. However, I realized that very often you don't really want *all* in-scope names, so it's not that useful to have `export`. Instead I added record punning so if you have several variables `x`, `y`, `z` in scope that you want to package into a record, you can just write `[x, y, z]` instead of `[x=x, y=y, z=z]`. Though it could still be rather annoying if you wanted to make a module with tons of useful functions and had to list them all in a record at the end... Originally I started adding records because I thought it would be a helpful way to organize modules and imports. However, that would require having records that contain fields with polymorphic types. I am not yet sure how that would play out. It would essentially allow encoding arbitrary higher-rank types, so it sounds kind of scary. In any case, I'm still glad I implemented records and I learned a lot, even if they can't be used for my original motivation. I can't think of a way to make a scenario that requires the use of records. Eventually once we have proper #94 we could make a scenario where you have to communicate with another robot and send it a value of some required type. That would be a cool way to test the use of other language features like lambdas, too. --- ## [ChungusGamer666/mojave-sun-13](https://github.com/ChungusGamer666/mojave-sun-13)@[bdc9c58586...](https://github.com/ChungusGamer666/mojave-sun-13/commit/bdc9c58586e0ab567e98b31054e8275d74990a58) #### Tuesday 2023-05-02 17:35:00 by Technobug14 Agriculture ('Technoculture') Farming: Fertilizer Edition :) (#2278) * Does Stuff Beginnings of agriculture code, stripped down TG botany a bunch, got rid of scar botany whilst replacing most of it. Also some map edits to change the paths on stuff and add a few spades for farming. * Some NPK system framework Removing more TG botany stuff and getting some framework down for NPK. Adds a "nutrient_type" variable to seeds and gives N, P or K as the type to every seed. * Removes Stuff, More NPK Framework Still WIP on NPK stuff, removes more basic bitch TG botany stuff, needs a lot more content but in an almost-working state * Nutrient drain Nutrients actually get drained properly now. Crop plots output their level of N, P and K when examined. Still need to make something to handle restoring nutrients and figure out a nutrient economy for plant consumption. * Mostly working, one major bug This is mostly working now. The NPK now drains according to the seed planted, it replenishes over time, you can now get water from water tiles and the soil will properly adjust the waterlevel variable with the new water types. HOWEVER, big bug. The way TG handled watering crops is ass. Doesn't delete, stays in the reagent_container of the soil, normally checks for if a reagent_container has water to bypass how full the soil's container is, bad system that sucks. Needs fixing. * oops oopsie!!! fucked something!!! forgot to undo a change I made to the code, it's just there to remind me it's not working correctly * Last minute fixes/bandaids I HATE TG BOTANY I HATE TG BOTANY I'M LOSING IT * Fertilizer groundwork Some stuff for fertilizer, need to add the attackby but cutting out a bunch of code to clean things up. Need to see if it breaks stuff. * Fertilizer attackby changes Adds code to the attackby for farm plots that checks if you're attacking it with fertilizer, doesn't work for some reason I can't tell. Also removes some vestigial TG botany stuff. * fixt fixes fertilizer, I forgot to specify something in a var, works now!!! YAY!!! --- ## [joey12725/BetterTigerPaws](https://github.com/joey12725/BetterTigerPaws)@[77acf120c0...](https://github.com/joey12725/BetterTigerPaws/commit/77acf120c03d6a3b1a8e4c4875b4090b1f4762fc) #### Tuesday 2023-05-02 17:57:36 by ashkaty Adding custom login in page Added functionality to the custom log in page and has it show log in page instead of the ugly ass shit it was before --- ## [Jackal-boop/tgstation](https://github.com/Jackal-boop/tgstation)@[d72ef99270...](https://github.com/Jackal-boop/tgstation/commit/d72ef99270f2697064681b3214f0569dcf38d526) #### Tuesday 2023-05-02 18:04:28 by necromanceranne Goliath-Infused Tendril Hammer uses an internal cooldown for the its special attack instead of a universal click cooldown (#74159) ## About The Pull Request Rather than using a click cooldown, the tendril hammer instead can make its special heavy attack every 2 seconds. ## Why It's Good For The Game In my newfound quest to try and eliminate universal click cooldowns or weird non-interactivity timers as balancing factors, this definitely is one of the biggest standout offenders. Lemme make an argument for universal click cooldowns increases being an ineffective limitation. I'll use the problems presented by the tendril hammer to highlight some of those problems, as well as unique problems to the tendril hammer itself.