|
The 1541 was a full 6502-based computer running its own DOS. It communicated over a (slow af) serial link with the computer. You told the drive to read a file and it did so. It was only capable of using the Commodore GCR format. It cost $400 on release in 1982. The Disk II was a Woz controller board and a Shugart disk mechanism in a metal box. It’s dumb as hell and almost entirely software controlled. The read/write head and motor are manually controlled by hitting memory-mapped IO registers. DOS is present on floppies. Depending on the DOS and revision of the disk hardware, the disk format could be inefficient 4-and-4 GCR, slightly more efficient 5-and-3 GCR, or efficient 6-and-2 GCR. The difference between them being how many data bits you can fit into a byte on disk and reliably read it. 6-and-2 means there are 6 data bits per byte. The trademark grinding you hear when you turn on an Apple II is the controller card seeking track 0. To save money, there’s no track 0 sensor in the disk mechanism. The controller just cycles the stepper motor in the drive to move the head toward the outside of the drive over and over. The noise is the head hitting a stopper that physically blocks it from going any further. To find a specific sector, DOS tells the drive to go to the track it’s on, then spins the motor until the sector is under the read head. Each sector starts with some metadata that tells the software the current track and sector number. When the software detects the right sector, it’s read in and converted to 8-bit words using a lookup table. An advantage of this is that it’s flexible: Apple drives could read and write any format as long as the head could physically do it. The Microsoft CP/M card included a controller that let the drive read MFM-formatted disks. This also let people come up with weird encoding schemes for copy protection, since you could override DOS’ built-in read/write routines with custom ones. Now if I could just get my emulator booting a dang DOS 3.3 Master Disk
|
# ? Aug 4, 2017 23:30 |
|
|
# ? May 23, 2024 14:08 |
|
something different on sorting, https://www.youtube.com/watch?v=sYd_-pAfbBw&t=179s
|
# ? Aug 4, 2017 23:58 |
|
CPColin posted:I have discovered a truly marvelous solution to CSS, which this margin-right is too narrow to contain.
|
# ? Aug 5, 2017 00:25 |
|
HoboMan posted:also re logging: lol, what framework? At my last job, we couldn't figure out why our web servers tended to time out right after logging an error. It turned out that somebody, long ago, had made the Java code run a process that added the error message to the system log. When you tell Java to run a process on certain operating systems, the JVM does a fork() call. When the server had been running for a while, that fork caused a long pause as the 8GB of process memory was dealt with. The load balancer, at the time, killed servers that didn't respond immediately to the heartbeat check. This hadn't previously been noticed because the code logged errors often enough that the first error tended to happen while the memory footprint was still small. Once we actually put some effort into cleaning up the constant nagging, servers started to have a chance of running for hours before logging their first error. The solution was to fork the process while the server was starting up, so the memory footprint was still small and the load balancer's restart logic wasn't enabled yet. Eventually, somebody thankfully got rid of that code. When I left, there still wasn't a logging framework in place.
|
# ? Aug 5, 2017 00:55 |
|
I thought "psh, I’ve already seen all the cool sorting visualizations" I was wrong
|
# ? Aug 5, 2017 01:37 |
|
I've just recently found out about code using ligatures to do fancy operator representation without requiring unicode in code and I'm loving that poo poo
|
# ? Aug 5, 2017 02:00 |
|
MrMoo posted:something different on sorting, this is white hot i yelled holy poo poo when it did in place radix sort DONT THREAD ON ME fucked around with this message at 02:22 on Aug 5, 2017 |
# ? Aug 5, 2017 02:04 |
MrMoo posted:something different on sorting, this is extremely my jam
|
|
# ? Aug 5, 2017 03:18 |
|
MrMoo posted:something different on sorting, soothes the tism
|
# ? Aug 5, 2017 03:21 |
|
MrMoo posted:something different on sorting, usually i just lurk but i have to say that this owns
|
# ? Aug 5, 2017 04:45 |
|
Luigi Thirty posted:This also let people come up with weird encoding schemes for copy protection, since you could override DOS’ built-in read/write routines with custom ones. one cool thing about all that copy protection built around having its own RWTS (read/write track/sector) is that it winds up easy to replace, once cracked, with code that’ll work under a real OS, on a hard disk, etc.
|
# ? Aug 5, 2017 04:45 |
|
MrMoo posted:something different on sorting, ho hum, yet another sorting visualizaHOLY poo poo
|
# ? Aug 5, 2017 05:50 |
|
MononcQc posted:I've just recently found out about code using ligatures to do fancy operator representation without requiring unicode in code and I'm loving that poo poo it's extremely good yeah. i have it in my terminal and all my editors
|
# ? Aug 5, 2017 07:11 |
Foo Diddley posted:usually i just lurk but
|
|
# ? Aug 5, 2017 07:27 |
|
MononcQc posted:I've just recently found out about code using ligatures to do fancy operator representation without requiring unicode in code and I'm loving that poo poo i actually had to stop using fira code because of ligatures. there was no way to turn them off in Eclipse and my brains just too used to parsing != as is in java. sad cuz i lived fira code in my mumps editor.
|
# ? Aug 5, 2017 07:33 |
|
MrMoo posted:something different on sorting, Radix LSD to people who haven't clicked, this also visualizes the relative displacement of elements sort separately from it's value/position in list
|
# ? Aug 5, 2017 07:36 |
|
the only reason to ever have a null is if you need to initialize a variable without actually providing a value. you don't need to do this, even if you think you do, but you know, arrays and poo poo. still not necessary, but you're a micro-optimizing rear end in a top hat, aren't you? fine, have your null and eat it too option types (as one of the most basic uses of algebraic datatypes) were introduced to general purpose programming languages in the nineteen-loving-seventies. there is no loving excuse for a null pointer exception ever
|
# ? Aug 5, 2017 08:09 |
|
JewKiller 3000 posted:the only reason to ever have a null is if you need to initialize a variable without actually providing a value. you don't need to do this, even if you think you do, but you know, arrays and poo poo. still not necessary, but you're a micro-optimizing rear end in a top hat, aren't you? fine, have your null and eat it too what if i want to crash immediately on a null without having to explicitly null check everywhere?
|
# ? Aug 5, 2017 08:31 |
|
nullability inference in ides is extremely good and cool if you're using a language with endemic nulls if you write a java and you return null from a method without annotating it as @Nullable then you are a terrible person and I hope you choke on a null
|
# ? Aug 5, 2017 09:00 |
|
Soricidus posted:if you write a java and you return null from a method without annotating it as @Nullable then you are a terrible person and I hope you choke on a null yeah, but which @Nullabe?
|
# ? Aug 5, 2017 09:16 |
|
cis autodrag posted:what if i want to crash immediately on a null without having to explicitly null check everywhere? practically every option type implementation has a "get if exists, crash otherwise" if that's what you really really want to do
|
# ? Aug 5, 2017 12:55 |
|
Wheany posted:yeah, but which @Nullabe? I don't think it matters does it? pretty sure ides recognise all the common ones now
|
# ? Aug 5, 2017 14:47 |
|
CPColin posted:At my last job, we couldn't figure out why our web servers tended to time out right after logging an error. It turned out that somebody, long ago, had made the Java code run a process that added the error message to the system log. When you tell Java to run a process on certain operating systems, the JVM does a fork() call. When the server had been running for a while, that fork caused a long pause as the 8GB of process memory was dealt with. The load balancer, at the time, killed servers that didn't respond immediately to the heartbeat check. fork is copy-on-write, so normally, forking an 8gb process is nbd and everything is fine but, java's garbage collector, being a generational gc, is gonna write a shitload of memory any time it promotes things between generations. so you fork, everything is fine for 100ms, and then it all goes to hell copying pages the moment the gc runs
|
# ? Aug 5, 2017 15:52 |
|
Notorious b.s.d. posted:fork is copy-on-write, so normally, forking an 8gb process is nbd and everything is fine even with copy-on-write, even with vfork(), there's still a lot of overhead to forking a process when you're just going to throw away almost all its context that's why posix_spawn() exists, as flawed as it is (and boy is it flawed: you need to use nonportable extensions to choose which file descriptors to preserve/close, the per-thread working directory is used to set the working directory for the new process, etc.) using posix_spawn() vs fork() can make a significant difference in performance when you have a heavyweight process that needs to start tons of processes that inherit almost nothing (such as an IDE starting compilers)
|
# ? Aug 5, 2017 16:42 |
|
I'm lost are you guys saying that forking any process will copy the originals memory? so an 8GB JVM gets copied each time you fork?
|
# ? Aug 5, 2017 19:23 |
|
Soricidus posted:ask me about trying to convince a co-worker that it is a bad idea for your code to check whether it is about to return an empty collection, and deliberately return null instead Java code:
|
# ? Aug 5, 2017 21:07 |
|
Janitor Prime posted:I'm lost are you guys saying that forking any process will copy the originals memory? so an 8GB JVM gets copied each time you fork? Forking shouldn't copy anything right away, but if the JVM does a garbage collection right after the fork happens, a bunch of pages will be copied-on-write and the system will bog down. I think this was on FreeBSD at the time and that OS had some weird interaction with the JVM that was making things worse.
|
# ? Aug 5, 2017 21:30 |
|
i've solved lots of dumb java bugs just by changing functions that return null and getting them to return some kind of empty structure that you'd expect. throwing works too. never return null, there's no reason to ever do it.
|
# ? Aug 5, 2017 21:44 |
|
Foo Diddley posted:usually i just lurk you must post
|
# ? Aug 5, 2017 21:47 |
|
I have no ram and I must fork
|
# ? Aug 5, 2017 22:06 |
|
eschaton posted:even with copy-on-write, even with vfork(), there's still a lot of overhead to forking a process when you're just going to throw away almost all its context Isnt the Linux implementation of posix_spawn literally just a fork then an exec? Also, fork () without subsequent exec and Posix multithreading (like in a modern JVM) Do Not Mix, for what it's worth, though I guess we aren't talking about that here. feedmegin fucked around with this message at 23:30 on Aug 5, 2017 |
# ? Aug 5, 2017 23:24 |
|
java status: tried to run our javafx app in the latest java 9 preview, got an instant crash because apparently you now need to ask specially for certain parts of the standard library using magic command-line incantations, or the jvm will just pretend it can't find them even though they're right fuckign there. added a few magic incantations copied from snack overflow, got another instant crash because apparently they've moved some classes around too. gently caress it i'll just pray it's someone else's problem by the time customers are demanding we support java 9 oh well, it's not like violently breaking backwards compatibility has ever hurt uptake of a new version of a programming language!!!
|
# ? Aug 5, 2017 23:30 |
|
Soricidus posted:java status: tried to run our javafx app in the latest java 9 preview, got an instant crash because apparently you now need to ask specially for certain parts of the standard library using magic command-line incantations, or the jvm will just pretend it can't find them even though they're right fuckign there. added a few magic incantations copied from snack overflow, got another instant crash because apparently they've moved some classes around too. gently caress it i'll just pray it's someone else's problem by the time customers are demanding we support java 9
|
# ? Aug 6, 2017 01:29 |
|
NihilCredo posted:dude it's literally the first goooooooooooogle result for ".net file_append_data" google is hard yo but yes I looked back at my logging code and it's not p/invoke; I think all the win32-ish flags gave it that aura in my memory
|
# ? Aug 6, 2017 03:07 |
|
holy poo poo i got my apple 2 emulator to boot a DOS 3.3 master disk i am a goddamn wizard "i kinda feel like god" --cereal killer, the hackers movie
|
# ? Aug 6, 2017 08:23 |
|
suffix posted:
code:
|
# ? Aug 6, 2017 08:40 |
So I have some C++ code that I'd like some feedback on, if someone has time to look at it. It's a class which handles concurrent memoization of the results of a function for various inputs, so that the function is only called once for each set of arguments. Here's what I've got:C++ code:
|
|
# ? Aug 6, 2017 09:20 |
|
Luigi Thirty posted:holy poo poo i got my apple 2 emulator to boot a DOS 3.3 master disk i am a goddamn wizard what did it take?
|
# ? Aug 6, 2017 09:34 |
|
mystes posted:All that stuff didn't end up being opt in or something after the argument about Jigsaw or whatever it's called? not all of it, no so by default it will allow some reflective access of certain parts of the standard library now. that's all. and it dumps pages of warning messages to stderr telling users that the program is broken. they have still pressed on with modularisation, and some modules are no longer available by default that used to be, so learn to love those command line flags! and they have still (at least within javafx) happily made sweeping changes to things everyone was using even though they were technically private. some of these changes have been to make those things public -- but since this involved changing their names or packages, there is basically literally no way to have a non-trivial javafx program that runs on java 8 and java 9 without maintaining two versions of the code
|
# ? Aug 6, 2017 11:34 |
|
|
# ? May 23, 2024 14:08 |
|
eschaton posted:what did it take? the sector nibblizer math was screwed up and offset $100 and nothing else was being miscalculated, causing the read’s checksum to fail I fixed that and now it boots DOS and runs programs from disk just fine now i need to hook up writing out to the disk image instead of pretending all disks are write protected
|
# ? Aug 6, 2017 12:55 |