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.
 
  • Locked thread
MononcQc
May 29, 2007

also on april 1st I decided to do awful macro things with Erlang to work with the runtime equivalent of option types and whatnot https://github.com/ferd/fancyflow

Adbot
ADBOT LOVES YOU

MononcQc
May 29, 2007

E: dumb cache ate messages

akadajet
Sep 14, 2003

MononcQc posted:

E: dumb cache ate messages

for a period back in the day posts would end in "cache hit!" or "cache miss!", which was funny

LinYutang
Oct 12, 2016

NEOLIBERAL SHITPOSTER

:siren:
VOTE BLUE NO MATTER WHO!!!
:siren:
TIL about a guy who has been employed at the same job for 40 years, he works on an encrypted COBOL application core that can only work in an outdated RHEL, which is wrapped in a bunch of firewalls in the hopes nobody will kick the stone that brings down the temple

Only he understands the magical PERL scripts to unlock and update the code. Life goals

Luigi Thirty
Apr 30, 2006

Emergency confection port.

i was depressed from not getting my latest job i interviewed for today

i found this description of pac-man's hardware and dug up a Z80 assembler off the google

half an hour later

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Luigi Thirty posted:

i was depressed from not getting my latest job i interviewed for today

i found this description of pac-man's hardware and dug up a Z80 assembler off the google

half an hour later



goddamn

stop creating things for every system :( + <3

redleader
Aug 18, 2005

Engage according to operational parameters
luigi you are a champion

crap nerd
May 24, 2008
can someone please pay luigi to spend his time making dumb bullshit for obsolete hardware, tia

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Technically I could set up a patreon I guess

Luigi thirty is making dumb bullshit for obsolete hardware

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
well there's your niche. now just make a tumblr or a youtube channel where you post that.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Luigi Thirty posted:

Technically I could set up a patreon I guess

Luigi thirty is making dumb bullshit for obsolete hardware

i have no money but its worth a try

AWWNAW
Dec 30, 2008

start the fund Luigi

AggressivelyStupid
Jan 9, 2012

Luigi make stuff for TempleOS

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



oh poo poo

i can def afford like 5-10 bucks a month if it means luigi has to make weirdly intense games about crying

Ator
Oct 1, 2005

trying out vim mode in sublime text today

wish me luck

edit: running uncap.exe to remap caps lock to esc

Ator fucked around with this message at 15:01 on Apr 8, 2017

raminasi
Jan 25, 2005

a last drink with no ice

gonadic io posted:

The main problem that I have with scala futures is they're so easy to accidentally drop because everything coerces to unit.

am I misunderstanding because that sounds like a really odd language decision

Ator
Oct 1, 2005

code:
/**
Output love.
*/
void qtpi(void)
{
    const int show[] = {'.', '@', ' ', '\n'};
    const int love[] = {
        252, 7, 252, 7, 72, 6, 29, 6, 36, 6, 29,
        6,  72, 7, 60, 6,  17, 22, 17, 6, 12, 6,

              17, 22,           17,  6,
           60, 7, 52, 6,     13,  46,  13,
         6, 13, 46, 13, 6, 52, 7, 48, 6, 13,
        62, 5, 62, 13,  6, 48,  7, 48, 6, 13,
        18, 1, 70, 13,  6, 48,  7, 48, 6, 13,
        126, 13, 6, 48, 7, 52, 6, 13,  38, 2,
         38, 13, 6,  52, 7,  60, 6,  17, 94,
           17, 6,  60, 7,  72, 6,  17, 22,
              3, 18,  17, 6, 72, 7, 84,
                 6, 17,  46,  17, 6,
                    84, 7, 96, 6,
                       17, 22,
                         17,

        6, 96, 7, 108, 6,  13, 6, 13, 6, 108, 7,
        120,  6, 5,  6, 120, 7,  252, 7, 252, 7,
    };
    const char *say[] = {"", "Cutie Pai,", "I love you!", "-- Susam"};
    size_t i;
    int j;
    for (i = 0; i < sizeof love / sizeof *love; i++) {
        if (love[i] < 4)
            printf(say[love[i]]);
        else
            for (j = 0; j < love[i] / 4; j++)
                putchar(show[love[i] % 4]);
    }
}

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

hackbunny posted:

oh noooo today is tomorrow and I got drunk with coworkers instead and the effortpost will have to wait 😱

who was it who asked about windows driver development again?

I don't even know where to start! but very broadly speaking, windows drivers are dlls, not exes, with all that it entails. you're running on borrowed time, in a process that isn't yours, at the highest possible level of privilege! not the highest possible really, due to the many management modes supported by modern cpus, but you know unless your driver is one of those drivers that can run in user mode - but the general rule under windows is that kernel mode code doesn't call user mode code (with very very very few exceptions), so drivers like storage devices (kernel mode client example: filesystems; memory manager) and network cards (kernel mode client example: tcp/ip) are restricted to kernel mode only. but I digress

anyway. the things are written in C, in a vaguely object oriented way. two huge red flags, i know, but that's how it works! every driver has a sort of vtable, that provides implementations of each of the I/O functions - all kernels I know about, in fact, implement drivers in a very similar way! all device functions are implemented as I/O operations of some kind, and on windows all I/O is asynchronous by default (with optional synchronous shortcuts for the most common operations, like read and write): when you want to call a device, you allocate a request packet (IRP), set the request parameters, send it and wait for a completion notification. windows has a concept of filter devices, where devices can stack on top of one another, each layer adding some functionality (or just sniffing traffic!), and the IRP has a variable sized tail with enough slots to let each device in the stack transform a I/O operation into a different I/O operation, or maybe just add hooks like completion callbacks, to get notified before the originator of the request is. it's all extremely complicated and quite fragile IME! and the fact that C is the only supported language doesn't help at all. what helps is that some driver classes are already implemented by the OS and what you write is not a full fledged driver, but a "minidriver" that only personalizes the behavior of the os-provided driver. some other driver classes are supported by the windows driver framework, which implements all of the tedious, repetitive boilerplate required. did I mention the boilerplate? OH GOD the boilerplate

development now requires visual studio, other than the driver SDK (which used to be called the DDK but I believe it's the WDK now). thank the stars for it, because before it was a godawful makefile-based system, the same godawful makefile-based system that was used to build windows itself, in fact. you need a second machine for debugging, and some sort of cable. in the bad old days, it was a slow AF serial cable, I wonder if USB is supported now? you can use a VM too, of course, if your driver doesn't require some specific hardware

this very bad explanation is as succinct an overview I can give you on windows driver development, whoever it was who asked about it in the first place. even more succinctly: it's bad, don't do it

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



dunno who asked but i know i love your effort posts

Asshole Masonanie
Oct 27, 2009

by vyelkin

Luigi Thirty posted:

i was depressed from not getting my latest job i interviewed for today

i found this description of pac-man's hardware and dug up a Z80 assembler off the google

half an hour later



what is the main language you write in? i'm basicaly a non-programmer webapp interface loser and i want to do some actual programming. i started messing with C++ but what you're doing seems more fun. please start a blag or somethin cos i want to learn!!

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

https://microsoft.github.io/reactxp/

vae victis

jony neuemonic
Nov 13, 2009

Powaqoatse posted:

dunno who asked but i know i love your effort posts

same.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

schranz kafka posted:

what is the main language you write in? i'm basicaly a non-programmer webapp interface loser and i want to do some actual programming. i started messing with C++ but what you're doing seems more fun. please start a blag or somethin cos i want to learn!!

a lot of these systems support C more or less. this is in Z80 assembly though

gonadic io
Feb 16, 2011

>>=

raminasi posted:

am I misunderstanding because that sounds like a really odd language decision

def startFuture(): Future[Butt] = ...
def doThing(): Unit = startFuture()

when you call doThing you have now leaked the future - it's still running but you can't get its result or interact with it in any way. it might succeed, it might fail, nobody knows.

it's an optional compiler warning

fritz
Jul 26, 2003

Luigi Thirty posted:

a lot of these systems support C more or less. this is in Z80 assembly though

luigi write the blog

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?

Luigi Thirty posted:

Technically I could set up a patreon I guess

Luigi thirty is making dumb bullshit for obsolete hardware

that's worth a few bucks a month to me

hell, I've considered paying people directly to add features I want to MAME…

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?

Wheany posted:

well there's your niche. now just make a tumblr or a youtube channel where you post that.

does twitch work with Visual Studio?

or that IDE you were using on Amiga?

Luigi Thirty make the stream

eschaton fucked around with this message at 23:46 on Apr 8, 2017

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?

hackbunny posted:

anyway. the things are written in C, in a vaguely object oriented way. two huge red flags, i know, but that's how it works! every driver has a sort of vtable, that provides implementations of each of the I/O functions - all kernels I know about, in fact, implement drivers in a very similar way!

I'd love to hear your thoughts on Darwin's IOKit if you take a look at it, given that we made it actually object-oriented (instead of vaguely) and use Embedded C++ for the API/ABI

one plus is that I was able to knock out a virtual frame buffer driver in a couple hours, with most of that time spent learning about the IOKit abstractions

Luigi Thirty
Apr 30, 2006

Emergency confection port.

eschaton posted:

does twitch work with Visual Studio?

or that IDE you were using on Amiga?

Luigi Thirty make the stream

i'm doing amiga stuff in visual studio code using GCC 6.3 and pointing WinUAE to the root of the git repo as a virtual hard drive. the amiga can also mount that folder over the network with SMB.

anyway i found a Z80 C compiler and wrote some headers and string routines. i need to write a ROM graphics editor because turaco doesn't support the roms mame uses anymore

i set up a page but idk about rewards

Luigi Thirty
Apr 30, 2006

Emergency confection port.

figuring out how to detect VBLANKs that come in over the CPU's interrupt line

Z80 Interrupt Mode 2 posted:

An interrupt occurs
The CPU will then form a 16-bit address where the I Register is the Most Significant byte and the Least Significant Byte is a number received from the data bus.
A 256 byte vector table must be created in the range of $xx00 to $xxff, where xx is the I register. The 256 bytes cover all possible combinations that can occur by the random value received from the data bus.
Once the 16-bit address is formed, a jump will occur to this vector table. It jumps to an even address and uses two bytes to form another 16-bit address.
Then it performs a jump to this newly created 16-bit address.
Since the jump is basically random in this 256 byte region, all the bytes in the table values will be filled with the same value, for example, $8f. That way a when it jumps to the table it will form a 16-bit address of $8f8f, no matter where it jumps to in this table (which is always an even address), a jump to $8f8f

what

the

gently caress

e: turns out mode 2 isn't needed here and mode 1 works just fine - a VBLANK interrupt comes in each frame and the system automatically jumps to... $0038? okay then, have an ISR

Luigi Thirty fucked around with this message at 06:24 on Apr 9, 2017

Gul Banana
Nov 28, 2003

how well does redux work with typescript? i'd like to try redux, but there's no way i'm giving up typechecking + tooling that doesn't require npm

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Luigi Thirty posted:

figuring out how to detect VBLANKs that come in over the CPU's interrupt line


what

the

gently caress

e: turns out mode 2 isn't needed here and mode 1 works just fine - a VBLANK interrupt comes in each frame and the system automatically jumps to... $0038? okay then, have an ISR

the device actually triggering the interrupt is supposed to write a particular value. so you can set up an interrupt table and then jump to the handler corresponding to that peripheral.

are you using a particular machine that has badly-behaved peripherals?

Flat Daddy
Dec 3, 2014

by Nyc_Tattoo

Gul Banana posted:

how well does redux work with typescript? i'd like to try redux, but there's no way i'm giving up typechecking + tooling that doesn't require npm

it works great. there's a lot of newish features in typescript that make redux really nice. like with type guards i can sort of pattern match off of actions in my reducer. for example:
code:
function actionIsType<PayloadT>(type: string, action: IAction<any>): action is IAction<PayloadT> {
  return action.type === type;
}

function reducer(state: IState = {}, action: IAction<any>): IState {
  if (actionIsType<AnusPayload>("RECEIVED_ASS", action)) {
    // in this block the typechecker knows that `action` is of type `IAction<AnusPayload>`
    return mergeState(state, { sphincter: action.payload.hole }); 
  }
  return state;
}
also because of partial types i can write my utility mergeState with the type: `function mergeState(state: IState, updates: Partial<IState>): IState` so it ensures that the 2nd argument is a subset of my state

the only place i lose type information is in react-redux's connect() function, in the mapDispatchToProps object you pass in. i can probably use one of the alternatives, like the version where mapDispatchToProps is a function, but i havent bothered to look into it

surprisingly, in the majority of the 3rd party libraries i use with redux they include typescript definition files. or there are typescript definitions available in separate packages at least

Flat Daddy fucked around with this message at 08:52 on Apr 9, 2017

Sweevo
Nov 8, 2007

i sometimes throw cables away

i mean straight into the bin without spending 10+ years in the box of might-come-in-handy-someday first

im a fucking monster

Jabor posted:

the device actually triggering the interrupt is supposed to write a particular value. so you can set up an interrupt table and then jump to the handler corresponding to that peripheral.

are you using a particular machine that has badly-behaved peripherals?

that mechanism only works if you use 100% compatible peripherals like the zilog PIO/SIO/etc instead of the much more common intel-compatible chips. letting the data bus float and using a 256 byte table to trap every possible value was a common trick on most z80 computers. IM0 was rarely used because it also needs hardware support, and IM1 usually jumped somewhere in ROM meaning the programmer couldn't change it to point to their own routine. So IM2 with the table trick was the only option available.

Sweevo fucked around with this message at 11:39 on Apr 9, 2017

Gul Banana
Nov 28, 2003

Flat Daddy posted:

it works great. there's a lot of newish features in typescript that make redux really nice. like with type guards i can sort of pattern match off of actions in my reducer

promising! i'll try and make time to check it out

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Sweevo posted:

that mechanism only works if you use 100% compatible peripherals like the zilog PIO/SIO/etc instead of the much more common intel-compatible chips. letting the data bus float and using a 256 byte table to trap every possible value was a common trick on most z80 computers. IM0 was rarely used because it also needs hardware support, and IM1 usually jumped somewhere in ROM meaning the programmer couldn't change it to point to their own routine. So IM2 with the table trick was the only option available.

fortunately i am writing the rom here so i can just have $38 jump to an ISR :getin:

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

eschaton posted:

I'd love to hear your thoughts on Darwin's IOKit if you take a look at it, given that we made it actually object-oriented (instead of vaguely) and use Embedded C++ for the API/ABI

one plus is that I was able to knock out a virtual frame buffer driver in a couple hours, with most of that time spent learning about the IOKit abstractions

oooh I didn't know iokit was C++. if I can find the time and will, I'll have a look into it

god I wish I had the strength to say more about windows drivers. they're the most microsoft thing ever

ullerrm
Dec 31, 2012

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

Luigi Thirty posted:

i'm doing amiga stuff in visual studio code using GCC 6.3 and pointing WinUAE to the root of the git repo as a virtual hard drive. the amiga can also mount that folder over the network with SMB.

anyway i found a Z80 C compiler and wrote some headers and string routines. i need to write a ROM graphics editor because turaco doesn't support the roms mame uses anymore

i set up a page but idk about rewards

You might like NES hacking. The separate address/data busses for CPU/PPU and the resulting restrictions on rendering make it a neat platform to work on.

MrMoo
Sep 14, 2000

I just finished implemented a std::promise for an overly complex protocol above Beast WebSockets. drat amazing hiding tonnes of async poo poo behind a single call. That's like the most spiffy thing I've ever done in C++. The docs for Boost and Beast ASIO suck balls.

async_resolve >> async_connect >> async_handshake >> async_read, async_write >> login >> success, failure

MrMoo fucked around with this message at 21:49 on Apr 9, 2017

Adbot
ADBOT LOVES YOU

VikingofRock
Aug 24, 2008




MrMoo posted:

async_resolve >> async_connect >> async_handshake >> async_read, async_write >> login >> success, failure

Oh no, did they overload operator,()?

  • Locked thread