Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

toiletbrush posted:

yeah that's a really nice pattern, the enum shorthand means you get a really nice 'dsl' for writing asm for test etc as well. drat that's a lot of instructions though, writing a CHIP-8 emulator was about my limit.

thanks! It’s particularly a lot of instruction when you realize that there’s no built-in support for a stack, if you want one you need to say dedicate an index register and zero page address to it (or something like that) and even handle function calls yourself

on the other hand, it’s a derivative of HP’s very first CPU architecture, the 2116 which was developed for lab instrumentation and control

their second CPU architecture, for the HP 3000 mainframe & (eventually) minicomputer, is explicitly stack-oriented

quote:

have you tried breaking your decode Word into bytes/nibbles so you can do your decode as a switch?

I break it down by instruction type since there are straightforward patterns per type and it’s pretty easy to implement the individual instructions of each type, lost of commonality in the helper functions needed

(also you’d break it down by octal digits for an architecture of this vintage…)

the key to keeping it simple has been to have each instruction type decode a word into an individual instruction of its type that carries only the data present in the word, and to have the decoder fail gracefully (returning nil) so the next instruction type can be attempted

it doesn’t really need to be more optimized; the full decoder only needs to run during initialization since it’s just used to build a 65536-entry table of all possible instruction words in a ready-to-execute state, so execution is just a table lookup and a jump and virtually all of the other lookups can be optimized out (at least theoretically)

Adbot
ADBOT LOVES YOU

TheGoonspiracist
Jul 24, 2002

The terrible secret of space... :stonk: the Mods, they knew!

echinopsis posted:

I always loved those sit down tablet cabinet games

a lost art
The custom mister fpga cocktail I made has been getting lots of use. I like to just let it run old arcade cores or random neo geo stuff. The Asus pro art monitor makes it over the top though. Everything just looks so good under the smoked glass.

Woolwich Bagnet
Apr 27, 2003



TheGoonspiracist posted:

The custom mister fpga cocktail I made has been getting lots of use. I like to just let it run old arcade cores or random neo geo stuff. The Asus pro art monitor makes it over the top though. Everything just looks so good under the smoked glass.


badass

also lmao at richters face.

echinopsis
Apr 13, 2004

by Fluffdaddy

TheGoonspiracist posted:

The custom mister fpga cocktail I made has been getting lots of use. I like to just let it run old arcade cores or random neo geo stuff. The Asus pro art monitor makes it over the top though. Everything just looks so good under the smoked glass.


very sweet indeed

echinopsis
Apr 13, 2004

by Fluffdaddy
continuing to chug away on crime committer. don't want to poo poo up this thread so much but

css is very close to good. still don't get why it does some things but I am pretty happy with it
cookies work. the 7 day crime I started 5 days ago still comes up when I open the page so it's good.
shame I can't work out how to test cookies locally, have to commit and push to crimecommitter.com just to test them BUT I got some part of it working first try so I am pretty stoked.

currently in process of adding player stats: strength luck intelligence and charm

and adding inventory framework, so some crimes will net you a thing, for example a bag of scorpions, and then another crime might be irridiating them with some enriched uranium you previously stole. idk what you might do with radioactive scorpions but I think I can figure it out.

but a simpler version using the same framework will be stealing watches, and base rate might be 5 but luck might increase that to 6, and then you commit the crime of selling a stolen watch, and the base rate of return might be $20 each time you do it (until you run out of watches) but higher charm might make you more money. that kind of thing.

I really enjoy building up a framework. I think after that, I don't really have any aspirational goals for more or deeper game mechanism, but always more scope for more crimes and combination of crimes, and also showing what's going on better etc.

I also made a discord. two people have joined. lol

https://twitter.com/_crimecommitter/status/1538073042303459328?s=20&t=rOVGfXyqEw_2jmoULA52QA

PokeJoe
Aug 24, 2004

hail cgatan


Jason is just for sending poo poo it should be just obvious how it works without comments. it's fine to store your crimes there but it's "supposed" to be human readable

echinopsis
Apr 13, 2004

by Fluffdaddy
oh I wanted to add comments as a reminder to myself that the data should follow a framework

ultimately it makes more sense to maintain the data in a spreadsheet so I don’t miss out anything, which is what I have done, and use a hacky python script to convert it to code later. or use a csv library and import it that way, coz it’s the only way to make sure every crime data entry has all the necessary bits

or i suppose fill in the blanks at runtime with 0s but idk. for now i’ve kinda bypassed working on that and focusing on adding features lol

Zamujasa
Oct 27, 2010



Bread Liar
set the language to jsonc (json... with comments!) and you can do that. i have no idea why the official json spec prohibits comments other than json is stupid.

not as stupid as xml, but still stupid.

PokeJoe
Aug 24, 2004

hail cgatan


you can still use it, you probably aren't gonna have so many crimes that it's unmanageable and adding more layers and conversions is more room for error. just come up with a key value schema that fits most of what you need. you can add optional params later if you need more data

Zamujasa posted:

set the language to jsonc (json... with comments!) and you can do that. i have no idea why the official json spec prohibits comments other than json is stupid.

not as stupid as xml, but still stupid.

i mostly agree and everything should allow comments on the other hand if your JSON needs comments to be understood it's probably bad

PokeJoe fucked around with this message at 06:37 on Jun 22, 2022

Zamujasa
Oct 27, 2010



Bread Liar
comments are still extremely useful unless you're naming your json keys "qualityOfYourPosts" since the only valid value there is "bad"

doubly so when they're used as config files or something or other

echinopsis
Apr 13, 2004

by Fluffdaddy

PokeJoe posted:

on the other hand if your JSON needs comments to be understood it's probably bad

so comments it is

Zamujasa posted:

set the language to jsonc (json... with comments!) and you can do that. i have no idea why the official json spec prohibits comments other than json is stupid.

not as stupid as xml, but still stupid.

this is interesting


i’m still not convinced tbh that it’s the best way for
me to store data. and never mind I can’t get it to work as I want anyway, like I couldn’t figure out how to access anything I put in the file, so I just gave up lol. it got dull so I moved into more interesting things like how to incorporate scorpions

Zamujasa
Oct 27, 2010



Bread Liar
json, jsoff

outhole surfer
Mar 18, 2003

if you need comments, yaml is a much more fun footgun

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
plist

Zamujasa
Oct 27, 2010



Bread Liar
of all the various markup languages yaml has to be one of the worst

echinopsis
Apr 13, 2004

by Fluffdaddy
yamlups wit chu

PokeJoe
Aug 24, 2004

hail cgatan


yaml ain't my language

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
yaml ate my ligma

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
just shove a "comments" field in whatever json object you want to comment and put your comment there. you're already using json so who gives a gently caress

GWBBQ
Jan 2, 2005


I'm an hour and 17 minutes from completing my first unlicensed walrus transport :neckbeard:

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp

GWBBQ posted:

I'm an hour and 17 minutes from completing my first unlicensed walrus transport :neckbeard:

tell my mom i said hi!

echinopsis
Apr 13, 2004

by Fluffdaddy

GWBBQ posted:

I'm an hour and 17 minutes from completing my first unlicensed walrus transport :neckbeard:

I defo need to work on making successful crimes
more “exciting”, because I suspect you’ll be underwhelmed lol.

echinopsis
Apr 13, 2004

by Fluffdaddy
I am close to v1 i reckon.

I've gotten inventory working, and the way I've incorporated is:

crimes get unlocked with enough notoriety
once unlocked:
they can have a cost
they can have (potentially multiple) inventory requirements (it always uses 1 of each)
can have an inventory reward
as well as money or noto rewards

and this lets me make crimes that are just paying for a thing. or selling a thing. or one instance you pay money and use up a scorpion and some mascara and have an enhanced scorpion

clearly if I have any skill here it's NOT in the ideas about the crimes themselves lol.

and it seems to successfully read all of this in and out of cookies as it goes so returning two days later to your crime should work. BUT need to test more permutations before I feel comfortable with it, because I KNOW the way I coded the inventory system is very inefficient.

STILL need to put some time into fleshing out the content. why is this part so hard????????

GWBBQ
Jan 2, 2005


bug notes:

-despite committing the crime of "Stealing Walrus" several times, I only have one walrus in my inventory (which I am currently transporting without a license)
-after enhancing a scorpion, I have one enhanced scorpion in my inventory and no apparent way to obtain additional unenhanced scorpions
-"scorpion" is misspelled as "sporpion" in several places

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp

GWBBQ posted:

-"scorpion" is misspelled as "sporpion" in several places

feature

echinopsis
Apr 13, 2004

by Fluffdaddy

GWBBQ posted:

bug notes:

-despite committing the crime of "Stealing Walrus" several times, I only have one walrus in my inventory (which I am currently transporting without a license)
-after enhancing a scorpion, I have one enhanced scorpion in my inventory and no apparent way to obtain additional unenhanced scorpions
-"scorpion" is misspelled as "sporpion" in several places

hmm well yes stealing a walrus is poorly named, because it doesn’t actually net you a walrus. BUT hopefully the game is accurate because when you click on a crime it’ll tell you what it takes from you and what it gives you

please do forgive the lack of crimes that net you regular sporpions

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
enhanced sporpion

Selklubber
Jul 11, 2010
I got an ipad, but then got annoyed I need to watch pre-video ads and sponsored content on youtube. So I made an ios shortcut to send the video link to an API I set up on my raspberry pi. The API puts it in a file, another script starts when the file changes and downloads the video to my plex server and cuts out the sponsored parts. I'm using systemd units to run the python programs and detect the file change.
First time I've set up an API, it was surprinsingly easy.

code:

from plexapi.server import PlexServer
import subprocess
import re
import configparser

def check_youtube_link(link: str) -> bool:
    if(re.search("youtu", link)):
        return True
    else:
        return False

def download_video(cmd: list) -> bool:
    process = subprocess.Popen(
        cmd,
        stdout=subprocess.PIPE, 
        stderr=subprocess.PIPE)
    stdout, stderr = process.communicate()
    print(stdout.decode('utf-8'))
    print(stderr.decode('utf-8'))

    return True

config = configparser.ConfigParser()
config.read('/home/pi/youtuber/config.ini')
baseurl = config['PLEX_SERVER']['plex_url']
token = config['PLEX_SERVER']['plex_token']
plex = PlexServer(baseurl, token)

library_contents = plex.library.section('Internett').all()
plex_videos = []
for video in library_contents:
    plex_videos.append(video.title)

with open("/home/pi/youtuber/videos.txt") as video_file:
    videos = video_file.readlines()

for url in videos:
    downloader_name = 'yt-dlp'
    output_location = '/srv/media/internet/'
    output_format = '%(channel)s_%(upload_date)s_%(title)s.%(ext)s'
    video_format = 'b[height<=720]'

    if check_youtube_link(url):
        cmd = [downloader_name, 
            '-P', output_location, 
            '-o', output_format, 
            '-f', video_format,
            "--sponsorblock-remove", "all,-filler",
            "--restrict-filenames",
            "--verbose",
            url]
        download_video(cmd)


plex.library.section('Internett').update()
I can finally watch my videos on the toilet without having ads!

Selklubber
Jul 11, 2010

CommieGIR posted:

Just moved all my carnivorous plants into a tent to help keep their humidity higher and controlled



that’s a nice tent. how do you control the humidity?

CommieGIR
Aug 22, 2006

The blue glow is a feature, not a bug


Pillbug

Selklubber posted:

that’s a nice tent. how do you control the humidity?

Just monitor and spritz in more water when necessary. Eventually gonna add an arduino controlled sprayer

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal

Selklubber posted:

I got an ipad, but then got annoyed I need to watch pre-video ads and sponsored content on youtube. So I made an ios shortcut to send the video link to an API I set up on my raspberry pi. The API puts it in a file, another script starts when the file changes and downloads the video to my plex server and cuts out the sponsored parts. I'm using systemd units to run the python programs and detect the file change.
First time I've set up an API, it was surprinsingly easy.


I can finally watch my videos on the toilet without having ads!

i admire your dedication to not having to see ads for whatever scam is currently being promoted by The Algorithm

r u ready to WALK
Sep 29, 2001

The youtube ads got so agonizingly bad that I gave in to googles extortion racket and paid them for youtube premium (lite)
I should copy this solution and cancel my premium trial

ullerrm
Dec 31, 2012

Oh, the network slogan is true -- "watch FOX and be damned for all eternity!"


I’ve got some ptsd here. I may have told this story before, but the .c3d format used by Apple’s SceneKit for models is:

* Start with a Collada DAE file, which is XML internally
* Translate all XML nodes to plist
* Serialize that plist to binary format
* gzip it
* base64 encode it
* Stick that base64 string in another plist
* Serialize it again

And it didn’t save them from having an RCE in their Collada parser, either.

spankmeister
Jun 15, 2008






Selklubber posted:

I got an ipad, but then got annoyed I need to watch pre-video ads and sponsored content on youtube. So I made an ios shortcut to send the video link to an API I set up on my raspberry pi. The API puts it in a file, another script starts when the file changes and downloads the video to my plex server and cuts out the sponsored parts. I'm using systemd units to run the python programs and detect the file change.
First time I've set up an API, it was surprinsingly easy.


I can finally watch my videos on the toilet without having ads!

that's really neat, i need something like that for webos because i like to watch youtube on my TV and the ads have been driving me nuts lately. they've really turned up the frequency of the ads and made them non skippable way more often

i would consider paying a couple bucks for youtube without ads but youtube premium lite is 9 euro a month and that's just ridiculous.

spankmeister fucked around with this message at 06:37 on Jun 26, 2022

go play outside Skyler
Nov 7, 2005


spankmeister posted:

that's really neat, i need something like that for webos because i like to watch youtube on my TV and the ads have been driving me nuts lately. they've really turned up the frequency of the ads and made them non skippable way more often

i would consider paying a couple bucks for youtube without ads but youtube premium lite is 9 euro a month and that's just ridiculous.

lmao, try 20€ a month here in switzerland. more expensive than netflix. ain't no way i'm buying that poo poo

spankmeister
Jun 15, 2008






go play outside Skyler posted:

lmao, try 20€ a month here in switzerland. more expensive than netflix. ain't no way i'm buying that poo poo

That's what I'd call the Eidgenossenschaftssteuer.

echinopsis
Apr 13, 2004

by Fluffdaddy


looking tight

Endless Mike
Aug 13, 2003



i need some fan art of a guy in all brown leather clothing plus a thief kit

HamAdams
Jun 29, 2018

yospos

echinopsis posted:



looking tight

dang that's lookin slick now

Adbot
ADBOT LOVES YOU

echinopsis
Apr 13, 2004

by Fluffdaddy
thanks mate. on the fence about the chrome gradient lol

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply