🍷 - 2024 DAY 3 SOLUTIONS -🍷
ystael @ ystael @beehaw.org Posts 0Comments 55Joined 2 yr. ago
J, because I've wanted to learn it for a long time. It scratches kind of the same itch as my old HP 48 calculator, actually, although that was much closer to Forth than APL. Both of them are mind-bendingly terse and not great at expressing things other than raw mathematics.
J
There is probably a way to write this more point-free. You can definitely see here the friction involved in the way J wants to regard lists as arrays: short rows of the input matrix are zero padded, so you have to snip off the padding before you process each row, and that means you can't lift some of the operations back up to the parent matrix because it will re-introduce the padding as it reshapes the result; this accounts for a lot of the "1
everywhere (you can interpret v"1
as "force the verb v
to operate on rank 1 subarrays of the argument").
data_file_name =: '2.data' data =: > 0 ". each cutopen toJ fread data_file_name NB. {. take, i. index of; this removes trailing zeros remove_padding =: {.~ i.&0 NB. }. behead, }: curtail; this computes successive differences diff =: }. - }: NB. a b in_range y == a <: y <: b in_range =: 4 : '(((0 { x) & <:) * (<: & (1 { x))) y' NB. a row is safe if either all successive differences are in [1..3] or all in [_3.._1] NB. +. or ranges =: 2 2 $ 1 3 _3 _1 row_safe =: (+./"1) @: (*/"1) @: (ranges & (in_range"1 _)) @: diff @: remove_padding result1 =: +/ safe"1 data NB. x delete y is y without the xth element delete =: 4 : '(x {. y) , ((>: x) }. y)'"0 _ modified_row =: 3 : 'y , (i.#y) delete y' modified_row_safe =: 3 : '+./"1 row_safe"1 modified_row"1 y' result2 =: +/ modified_row_safe data
J
NB. file handling from https://www.jsoftware.com/help/primer/files.htm data =: > 0 ". each cutopen toJ fread '1.data' result1 =: +/ | -/"1 |: ({~ /:)"1 |: data NB. Lemmy insists on mangling the ampersand, the & is _just_ an ampersand result2 =: +/ , ((0&{) * (="0 1)/) |: data
The equation shown is a type of decomposition of a Lie algebra g that was introduced by Élie Cartan in his doctoral thesis. h is called a Cartan subalgebra of g.
To answer what a Lie algebra is, an extremely hand-wavy description might be: a Lie group is a continuous group of symmetries of some geometric object (for example, the group SO(3) of rotations of three-dimensional space), and the corresponding Lie algebra is the "tangent space" to the group, that is, the space of tiny changes you can make that lie "along" the group.
A lot of things in Lie theory and differential geometry are named after Élie Cartan, or sometimes after his son Henri.
There's Knights in the Nightmare, released on the DS in 2008. (By Sting, whose Dept. Heaven series contains a few other mechanically weird JRPGs also.)
... did they really put dodonpachi dai-ou-jou on a general audience top 100 list?! in the top 20??!! mind blown
Isobritannia? Is that regular Britannia with the hydroxyl group attached in the middle instead of the end?
Elementary school ystael spent a lot of time on Pinball Construction Set on the C64. I think I always turned the physics up to max speed minimum friction, so scoring on my tables was more about flailing and blind luck.
My favorite C64 game, though, was one I didn't get to play often because I had to borrow it from a friend. (Didn't know about cracking yet.) That was Ultimate Wizard. The platform physics were kind of terrible compared to Mario, but I loved the way each level was a tiny puzzle-maze, with different treasures moving different blocks when you grabbed them, and one magic spell - just one on each level, out of ten or so - to help you deal with the enemies. And my favorite thing in every game: a level editor! No, my levels weren't good, they were awful. But I loved laying out the little bricks and skulls and fires anyway.
Put a shocking amount of time into Unicorn Overlord last week.
I think they executed the cross between Fire Emblem and Ogre Battle very well. Squad composition makes up for the lack of individual customization that is typical of the FE lineage of strategy RPGs (as opposed to the FFT/Tactics Ogre line). The overworld management is a fun exploration side activity that isn't as time-consuming as Three Houses's social stuff. Basiscape brought its usual excellent soundtrack, and Vanillaware their usual impressively detailed art. Plot is whatever, I don't play these games for the plot, I play them to make anime sprites stab each other so numbers go up. So, yeah, it's fun.
(No, I don't actually like Disgaea that much, mostly because "figuring out how to break the game is the game" doesn't appeal to me.)
If the head needs to be empty, I find that droney Japanese noise is the best way to get that. Example: Aube - Flare
Lots of great sf/fantasy authors mentioned already, including some I'd argue for as great writers regardless of genre (Ursula K. Le Guin, Gene Wolfe, N. K. Jemisin).
I have three more to suggest in this genre and from this period:
- C. J. Cherryh (Cyteen, Foreigner series, lots more) uses the lens of alien societies -- just different enough from ours -- to make us look critically at the structure of our own;
- Sheri S. Tepper (Grass, Raising the Stones, The Gate to Women's Country) carries one or another of the dark currents underlying our culture to its horrifying conclusion, and shows us what we get;
- Lois McMaster Bujold (Vorkosigan saga) gives us a hilarious and improbable hero who utterly transcends his disabilities, in the end perfectly embodying what it seems he could never hope to be.
Was hoping someone would mention Shadow Hearts and Wild Arms! The PS2 truly was the janky AA JRPG console of all time. Also don't forget
- Shin Megami Tensei: Nocturne
- Digital Devil Saga 1-2
- Breath of Fire: Dragon Quarter
- Stella Deus
Magna Carta: Tears of BloodOn second thought do forget this one
There are a few different issues interacting here.
- The "family mode" users that require PIN are a child protection measure, and are not connected to Family Sharing. Remove the PIN from all adult accounts. Now you will see your whole library and be able to go to the store, and when you switch to your son's user, he will not be able to go to the store and will only see the games you have done "Add to Family Games" on. This is how my library is set up: sharing to my partner and child, only child's account has PIN.
- I don't know the cause of your experience with the keyboard, but if you remove the PIN from your own account, that should make it less painful.
- This is just the way the Steam client works, not a Deck-specific feature: you are logged into one account until you change it. The PS5 is the same way.
- In my experience, failure to separate game state between users is a game-by-game problem. Most Windows-native games running in Proton separate their saves by user correctly. (I do not know whether this happens because the Deck generates a completely clean Proton environment for each Steam user, or whether the Proton environment is shared and the game is just doing what it would do on a Windows PC to separate saves.) The games where I have seen saves wrongly shared, ironically, are all games with native Linux ports.
- If you haven't already, switch to your son's account, unlock the PIN, and go through all the Steam multiplayer/chat settings. We have all that turned off for our child. As far as I know, a game family-shared to a user should behave exactly as if the user owned the game, from a functional point of view.
Have you tried the Ys series of action RPGs? Ys VIII is a lot of grindy monster whacking fun and runs great on Deck.
Baba Is You is fantastic, and I think its difficulty curve is much, much more reasonable in the beginning than Stephen's Sausage Roll. I haven't finished it, but I didn't utterly bounce off it either.
Stephen's Sausage Roll.
I play a lot of puzzle games. Some of them are pretty hard (the later levels of Tametsi take quite a while to crack).
But this one is on a completely different level. If there is a more brutally punishing sokoban-family game on existence, I have no idea what it might be.
Stephen, if he exists, is most likely condemned to roll sausages eternally in hell, for the sin of making this game.
Another vote for Cherryh - pretty much anything by Cherryh. And in the "journey" department, perhaps also look at John Varley's Gaia trilogy (Titan, Wizard, Demon)? (Probably falls into your "excessive violence and some smut" category)
You might also try the "far future/dying Earth" genre as a way of getting the exploration without necessarily being tied to the space/hard sf milieu. I think the most awarded member of this subgenre (and I liked it quite a bit) is Gene Wolfe's three Sun series (Book of the New Sun, Book of the Long Sun, Book of the Short Sun).
Old, but I think at least inspired or adjacent: Apparat Organ Quartet - Romantika
Swans - Song for Dead Time
So bury your trust beneath the ground with me, dear
And lay your loneliness down for the sun to burn
To sand...
J
We can take advantage of the manageable size of the input to avoid explicit looping and mutable state; instead, construct vectors which give, for each character position in the input, the position of the most recent
do()
and most recentdon't()
; for part 2 a multiplication is enabled if the position of the most recentdo()
(counting start of input as 0) is greater than that of the most recentdon't()
(counting start of input as minus infinity).