code logs -> 2018 -> Thu, 13 Dec 2018< code.20181212.log - code.20181214.log >
--- Log opened Thu Dec 13 00:00:02 2018
00:03 * TheWatcher readsup
00:05
<@TheWatcher>
ErikMesoy: is that ISO weeks, or US weeks? or US Broadcast weeks?
00:19 himi [sjjf@Nightstar-1drtbs.anu.edu.au] has joined #code
00:19 mode/#code [+o himi] by ChanServ
00:24
<&[R]>
<ErikMesoy> We drew large grids and diagrams on the whiteboard to track the possible cases. <-- all 14 of them?
00:50 celmin|sleep is now known as celticminstrel
01:10 Degi [Degi@Nightstar-2ipjfb.dyn.telefonica.de] has quit [Connection closed]
01:12 Derakon[AFK] is now known as Derakon
01:12 mode/#code [+ao Derakon Derakon] by ChanServ
01:34 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
01:46 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
01:46 mode/#code [+qo Vornicus Vornicus] by ChanServ
01:49 Kindamoody is now known as Kindamoody[zZz]
01:57
<&ToxicFrog>
McMartin: semi-recently I read an article about a project that involved putting a small computer (rpi?) inside a cartridge for some vintage console, but hooking up all the IO to the actual cart pins so you could plug it into the actual console and it would pretend to be a game (with the actual "game" code actually copying framebuffer data from "ROM" or similar)
01:57
<&ToxicFrog>
However, I can't remember what console it was, who did it, or where it was written up, and it's impossible to google for because of all the projects that involve using vintage carts as computer cases
01:57
<&ToxicFrog>
Do you have any idea what I'm talking about here or where to find it?
01:59
<&[R]>
FCC wants to kill innovation on the internet: https://news.slashdot.org/story/18/12/12/2355242/fcc-panel-wants-to-tax-internet-using-businesses-give-the-money-to-isps
02:02 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
02:19
<&McMartin>
ToxicFrog: What you describe is something that is done with the "Melody Cartridge" for the Atari 2600, but it is far from alone
02:19
<&McMartin>
In fact, you can make a reasonable case that most mid- to late-era SNES games did this with their on-cart coprocessors
02:20
<&McMartin>
(Most flashcarts for systems old enough to not have onboard operating systems boil down to doing this as well)
02:21
<&ToxicFrog>
McMartin: not quite the same thing
02:21
<&ToxicFrog>
This was not a reprogrammable cart, it was a complete computer system that used the console as, basically, an IO hub and video passthrough
02:21
<&McMartin>
Right, that's what Melody-cart based games essentially do, with a generous interpretation of 'video passthrough'.
02:21
<&ToxicFrog>
And it was a recent, hobbyist, non-commercial project
02:22
<&McMartin>
Well
02:22
<&ToxicFrog>
here by "video passthrough" I mean "the system inside the cart writes raw frame data to the ROM data pins and the code running on the console proper translates that into electron gun instructions"
02:22
<&McMartin>
I guess this was commercial after all
02:22
<&McMartin>
https://atariage.com/store/index.php?l=product_detail&p=1107
02:22
<&ToxicFrog>
And ISTR quite a lot of time and oscilloscope wrangling devoted to actually getting that part right
02:26
<&McMartin>
Yeah, what you describe sounds a lot like "register stuffing" where the on-console code is just COPY (CONSTANT) (CHIP CONTROL REGISTER) over and over and over and over because it's being synthesized by the CPU.
02:27
<&McMartin>
So I don't know what particular thing that would be because it could be all kinds of things.
02:29
<&ToxicFrog>
Right.
02:35 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code
02:41 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Ping timeout: 121 seconds]
04:06 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
04:06 mode/#code [+qo Vornicus Vornicus] by ChanServ
04:56 himi [sjjf@Nightstar-1drtbs.anu.edu.au] has quit [Ping timeout: 121 seconds]
05:02 celticminstrel is now known as celmin|sleep
05:07 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
05:08 Derakon is now known as Derakon[AFK]
05:26 Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has joined #code
05:26 mode/#code [+qo Vorntastic Vorntastic] by ChanServ
07:11 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
07:11 mode/#code [+o himi] by ChanServ
07:18
<@ErikMesoy>
TheWatcher: that's the problem :P they're supposed to be ISO weeks
07:35
<&Reiver>
McMartin: That was incredibly wonderful and heartening
07:35
<&Reiver>
And then I read the update on the next page and am full of The Sad.
07:50 Netsplit Deepthought.Nightstar.Net <-> Krikkit.Nightstar.Net quits: PinkFreud
07:57 Netsplit over, joins: PinkFreud
09:53 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code
10:00 Kindamoody[zZz] is now known as Kindamoody
10:51 Kindamoody is now known as Kindamoody|afk
11:34 gnolam_ [lenin@Nightstar-jf2er2.cust.bahnhof.se] has joined #code
11:34 ErikMesoy [Bruker@Nightstar-hq72t5.customer.cdi.no] has quit [Connection closed]
11:35 ErikMesoy [Bruker@Nightstar-hq72t5.customer.cdi.no] has joined #code
11:37 simon_ [simon@Nightstar-e7dcnn.com] has quit [Ping timeout: 121 seconds]
11:38 gnolam [lenin@Nightstar-jf2er2.cust.bahnhof.se] has quit [Ping timeout: 121 seconds]
11:42 simon_ [simon@Nightstar-e7dcnn.com] has joined #code
11:46 ricer [ricer@Nightstar-52ic2g.wechall.net] has quit [Ping timeout: 121 seconds]
12:42 gnolam_ is now known as gnolam
12:42 mode/#code [+o gnolam] by ChanServ
12:44
<&[R]>
Sanity check: If I wanted to store all 32bit numbers in their binary representation (IE: they take up 4 bytes), it would take up 2^32 * 2^2 bytes? Then a kilobyte is 1/2^10th of that, one megabyte is 1/2^10th of a kilobyte, one gigabyte is 1/2^10th of a megabyte. So it would be (2^32 * 2^2)/(2^10 * 2^10 * 2^10) gigabytes which is (2^34)/(2^30) or 2^4 gigabytes?
13:49
<~Vorntastic>
16 gigs yes
13:53
<&ToxicFrog>
Your middle sentence is backwards (1GB is 2^10 MB, not 1/2^10ths of one) but the conclusion is correct.
13:53
<&[R]>
Right yeah
13:54
<&[R]>
I just woke up when I was working that out, thanks
13:56 celmin|sleep is now known as celmin|away
15:02 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
15:02 mode/#code [+qo Vornicus Vornicus] by ChanServ
15:44 * ToxicFrog stares at this function for a moment
15:44
<&ToxicFrog>
I think for this to actually work, I would need to port (defmacro) to zsh.
15:44
<&ToxicFrog>
I'm not 100% sure that this is a good idea.
15:45 Degi [Degi@Nightstar-laorit.dyn.telefonica.de] has joined #code
15:46
<&[R]>
How different is zsh scripting from bash scripting?
15:46
<&[R]>
Does it have better string operations?
15:47
<&ToxicFrog>
It's very similar. It has more string/array/map operations and variable expansion operations built in (but the syntax is just as awful and opaque as in bash). It makes it slightly harder to shoot yourself in the foot, e.g. $foo and "$foo" are equivalent and you have to explicitly ask for what in bash would be the unquoted behaviour.
15:49
<&[R]>
Ohh
15:49
<&[R]>
That sounds nice at least
15:50
<&ToxicFrog>
In general, I would describe it as an overall better version of bash scripting, with more conveniences and fewer land mines, but still fundamentally the same concepts. So if you're looking for Like Bash But Better this is exactly what you're looking for, and if the idea of bash repulses you and you want Shell Scripting But Not Bash it is definitely not what you want.
15:50
<&ToxicFrog>
(this also means that the vast majority of bash scripts will run in zsh without modification)
15:52
<&ToxicFrog>
Sadly it still doesn't have closures or macros~
15:53
<&[R]>
Yeah, I'm finding myself doing a ton of bash scripting lately, I could use another language, but I do have to shell-out a ton, and really shell scripts are the only languages that don't make that painfully tedius
15:53
<&[R]>
I've actually been tempted to write my own shell scripting language
15:53
<&[R]>
D:
15:55
<@TheWatcher>
I believe that's one of the signs of madness~
15:55
<&[R]>
Actually, no
15:56
<&[R]>
There is another language that doesn't make shelling-out painful
15:56
<&[R]>
It's called make
15:56
<&[R]>
... actually one of my script-sets would be better as a makefile
15:57
<&ToxicFrog>
perl also makes it pretty easy
15:58
<&[R]>
I've tried to learn perl a few times
15:58
<&[R]>
I have a rather intense loathing of its documentation
15:59
<&[R]>
Like *super* basic thing, probably even its core functionality, all I wanted to know was what the variables a regex operation touches are.
16:00
<&[R]>
They had the operators defined, they mentioned the side-effect of filling those variables, but they didn't say what variables specifically they were
16:04 * ToxicFrog solves the original problem using ${funcstack[1]}
16:05
<&ToxicFrog>
I've generally been pretty happy with zsh's documentation; it's more split up than bash's, but in practice this usually makes it *easier* to use because I don't have to flip through hundreds of irrelevancies every time I want to look up what `setopt` does, for example./
16:05
<&[R]>
Bash's manpage is both awesome and intensely frustrating, yeah
16:05
<&ToxicFrog>
(and if you really crave the bash experience you can enjoy all 22,000 lines of `man zshall`)
16:07
<&ToxicFrog>
Also, if you're using it interactively and not just for scripting, typing a command and pressing alt-H brings up the man page for it while leaving the rest of the command line intact.
16:07
<&[R]>
zshall or zshell?
16:07
<&[R]>
Coolio
16:08
<&ToxicFrog>
"zshall", i.e. "zsh all", all the zsh man pages concatenated.
16:08
<&ToxicFrog>
All the man pages are named "zsh$TOPIC", with "man zsh" giving you the table of contents and invokation instructions.
16:09
<&ToxicFrog>
E.g. zshbuiltins, zshoptions, zshtcpsys
16:09
<&[R]>
Nice, yeah, I do prefer "all one page" by default, but sometimes it's nice to just be able to jump to a topic
16:10
<&[R]>
info is absolutely infuriating in that regard. Since scroll is both scroll and "next page" so if I'm not attentive I'll randomly be on another page entirely which is absolutely confusing. And AFAICT the only way to actually configure info permenantly is via an alias.
16:11
<&ToxicFrog>
Yeah, I have a very low opinion of info.
16:14
<&[R]>
Unfortunately there aren't other options than the various implimentations of man and GNU info :/
16:15
<&[R]>
And having to whatis before man is annoying
16:18
<&ToxicFrog>
Why do you need to whatis first?
16:18
<&[R]>
TCL
16:18
<&[R]>
It has man pages for everything, and they come up first
16:19
<&[R]>
(TCL isn't the only one that does this)
16:19
<&[R]>
I `man fopen` or something, get TCL's documentation, when I wanted C
16:20
<&[R]>
Or sometimes I want a specific manpage, but I don't want to guess the number
16:20 * [R] has also been tempted to write a new man
16:21
<&ToxicFrog>
`man 3 fopen` should get you the C version in preference to the TCL version
16:22
<&ToxicFrog>
That said, at least some versions of man have a disambiguator built in
16:22
<&[R]>
Yeah, but sometimes it's 2 instead of 3
16:22
<&[R]>
I don't really want to think to hard when I'm trying to look up a reference
16:22
<&ToxicFrog>
As in, you do `man printf` and it goes "did you mean printf(1) -- shell builtin, printf(3) -- C standard library, printf(3p) -- POSIX standard, or printf(3tcl) -- TCL standard library?"
16:23
<&[R]>
That'd actually be nice
16:24
<&ToxicFrog>
The one on SUSE does this out of the box, I'm not sure how to enable it for other distros
16:24
<&[R]>
`man --version` tell you what that is?
16:25
<&[R]>
Hmm, mandb just says "man"
16:25
<&ToxicFrog>
man 2.7.6
16:26
<&ToxicFrog>
But on my work machine it's man 2.7.6.1 and it doesn't do this, so this may be a SUSE-specific patch rather than something in man proper
16:26
<&ToxicFrog>
It shouldn't be hard to replicate with a shell function, though.
16:26 * ToxicFrog tinkers
16:26
<&[R]>
Yeah
16:26
<&[R]>
Just whatis first, then if the result is only 1, go to man directly, if more, prompt for choice, if zero error out
16:30
<&ToxicFrog>
Yeah
16:33
<&ToxicFrog>
[R]: https://gist.github.com/ToxicFrog/23fb9db135f90c0892b80b6d765cd31b
16:33
<&[R]>
I was about to ask why you didn't use `select`
16:34
<&[R]>
Then I tried to figgure out how that'd be cleaner
16:34
<&[R]>
You'd have to muck with IFS I guess
16:35
<&[R]>
Eitherway, that's cool, thank you
16:35
<&ToxicFrog>
Yeah, and also select automatically numbers its entries
16:35
<&ToxicFrog>
So in that example, printf(1) would be 1 and printf(3) would be 2
16:36
<&ToxicFrog>
Which is not great, I'd rather type the actual section number (especially since that will stay the same even if new man pages are added/removed)
16:36
<&ToxicFrog>
You're welcome!
16:36
<&ToxicFrog>
And it probably could be cleaned up at least a bit, but I just quickly hammered this together.
16:37
<&ToxicFrog>
(and now I'm adding it to ~/.zsh.d/ so that I get this feature on non-SUSE machines)
16:37
<&[R]>
Heh
16:39
<&ToxicFrog>
(I'm looking at "man man" now and I don't think I've ever seen sections 0 or 9 used in practice)
16:39
<&[R]>
Nor have I
16:39
<&[R]>
$ ls /usr/share/man/man0/ | wc -l
16:39
<&[R]>
82
16:39
<&[R]>
Hmm
16:40
<&[R]>
$ ls /usr/share/man/man9/ | wc -l
16:40
<&[R]>
ls: cannot access '/usr/share/man/man9/': No such file or directory
16:40
<&[R]>
0
16:40
<&ToxicFrog>
section 9 is kernal API documentation, and it looks like on Debian at least these have their own package (since they're quite large and also kernel-version-specific)
16:41
<&[R]>
Hmm
16:41 dump-trump-2020 [dump@Nightstar-5ejmfe.us.northamericancoax.com] has joined #code
16:41
< dump-trump-2020>
https://youtu.be/1gfDwEDPb6U
16:41
< dump-trump-2020>
How Trump got Trolled into a Televised Tantrum over a border wall
16:41
< dump-trump-2020>
poxifide Vornicus simon_ macdjord|slep himi crystalclaw Mahal Emmy tripflag abudhabi Vorntastic iospace Pi JustBob TheWatcher ErikMesoy Derakon[AFK] Reiv McMartin Degi ToxicFrog Syloq VirusJTG Kizor [R] PinkFreud Reiver Carstol-Reg jerith Attilla Tamber celmin|away jeroud Alek Kindamoody|afk gnolam
16:41 dump-trump-2020 [dump@Nightstar-5ejmfe.us.northamericancoax.com] has quit [Z-Lined: Killbot has judged you to be a spammer. Begone. (ID: 91FXTC7R53)]
16:41
<&[R]>
Fucking hell
16:41
<&ToxicFrog>
Aah, on my SUSE machine man0 does contain header pages
16:42
<~Vornicus>
I guess that's the first one that looks like an actual bot said it
16:42
<&[R]>
So my `man man` explains section 9, but not 0... yet I have pages in 0 but not 9...
16:42 Degi [Degi@Nightstar-laorit.dyn.telefonica.de] has quit [Ping timeout: 121 seconds]
16:42
<&ToxicFrog>
specifically, stdio(3) contains the table of contents for <stdio.h> as implemented in glibc, and stdio(0p) is what POSIX says about <stdio.h>
16:42
<&ToxicFrog>
I would have expected those to be 0 and 0p, but...
16:43
<&ToxicFrog>
[R]: "man man" for me says that man0 is header files.
16:43
<&ToxicFrog>
In practice header file documentation mostly seems to end up in 3 alongside the individual function documentation.
16:43
<&[R]>
OMFG section 0 is amazing
16:44 Kindamoody|afk is now known as Kindamoody
16:44
<&[R]>
Is there a manpage that explains the base C-types? The preprocessor directives?
16:49
<&ToxicFrog>
If there was I'd expect it to be c(7) or similar, but at least on my system there's no such page.
16:52
<&[R]>
Nor mine
16:54 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
16:56 Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity]
17:00
<&ToxicFrog>
What are you finding in 0 that's not in 3?
17:07
<&[R]>
Stuff that isn't functions
17:08
<&[R]>
Also a good answer to "why did this program include this header?"
17:12
<&ToxicFrog>
Aah, I see, like stdint.h
17:13
<&[R]>
size_t Unsigned integer type of the result of the sizeof operator.
17:13
<&[R]>
That... was less helpful than I had hoped
17:14
<&[R]>
size_t Used for sizes of objects.
17:14
<&[R]>
ssize_t Used for a count of bytes or an error indication.
17:14
<&[R]>
Consistiency!
17:20
<&ToxicFrog>
Yeah, that's not great
17:21
<&ToxicFrog>
size_t is "the size of something", i.e. the sort of things sizeof() returns (but also file sizes and the like)
17:21
<&ToxicFrog>
ssize_t is "signed size_t" and is basically used where you want a size_t but you also want to be able to return -1 to indicate error
17:23
<&[R]>
Yeah, I remember someone arguing about using size_t instead of int or something similar and I didn't have the ability to find out what size_t was meant for at the time :/
19:21
<&McMartin>
ssize_t in days of yore would also be handy because ptr_diff_t was, I think, a later addition.
20:13 Degi [Degi@Nightstar-laorit.dyn.telefonica.de] has joined #code
20:34 himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
22:39 himi [sjjf@Nightstar-1drtbs.anu.edu.au] has joined #code
22:39 mode/#code [+o himi] by ChanServ
22:45
<&McMartin>
https://prog21.dadgum.com/116.html "Things that Turbo Pascal is Smaller Than"
23:16 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Ping timeout: 121 seconds]
--- Log closed Fri Dec 14 00:00:04 2018
code logs -> 2018 -> Thu, 13 Dec 2018< code.20181212.log - code.20181214.log >

[ Latest log file ]