00:02:58 -!- Phantom_Hoover has quit (Ping timeout: 245 seconds).
01:33:34 -!- FreeFull has quit.
02:35:16 -!- oerjan has joined.
03:06:18 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=64500&oldid=64476 * A * (+1446) /* Talk page */
03:08:42 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=64501&oldid=64500 * A * (+282)
03:10:32 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=64502&oldid=64501 * A * (+156) /* Computational class */
03:14:31 <esowiki> [[Varnand]] N https://esolangs.org/w/index.php?oldid=64503 * DoggyDogWhirl * (+2387)
03:14:34 <esowiki> [[Varnand/Python Implementation]] N https://esolangs.org/w/index.php?oldid=64504 * DoggyDogWhirl * (+1583)
03:19:26 <esowiki> [[User:DoggyDogWhirl]] M https://esolangs.org/w/index.php?diff=64505&oldid=64272 * DoggyDogWhirl * (+15)
03:22:12 <esowiki> [[Language list]] M https://esolangs.org/w/index.php?diff=64506&oldid=64498 * DoggyDogWhirl * (+14)
03:27:45 <esowiki> [[Esolang:Introduce yourself]] https://esolangs.org/w/index.php?diff=64507&oldid=64382 * FlyHamsterPaul * (+229)
03:28:05 <esowiki> [[BWTFN]] N https://esolangs.org/w/index.php?oldid=64508 * FlyHamsterPaul * (+1473) Created page with "'''BWTFN''', or '''Because Why The Fuck Not''', is an esolang inspired off of the [[CopyPasta_Language|CopyPasta]] language created in 2019. BWTFN is only used for printing te..."
03:31:58 <esowiki> [[User talk:A]] https://esolangs.org/w/index.php?diff=64509&oldid=64502 * Areallycoolusername * (+205)
03:36:49 <esowiki> [[Esoteric algorithm]] https://esolangs.org/w/index.php?diff=64510&oldid=64482 * Areallycoolusername * (+4) /* Example */
03:40:43 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=64511&oldid=64509 * A * (+322) /* Char language */ I have changed my signature.
04:01:42 -!- adu has left.
04:16:29 <oerjan> <ais523> where's the repository? <-- fizzie might want to change the link at the end of `help
04:16:36 <HackEso> Runs arbitrary code in GNU/Linux. Type "`<command>", or "`run <command>" for full shell commands. "`fetch [<output-file>] <URL>" downloads files. Files saved to $PWD are persistent, and $PWD/bin is in $PATH. $PWD is a mercurial repository, "`revert <rev>" can be used to revert to a revision. See http://codu.org/projects/hackbot/fshg/
04:16:49 <HackEso> https://hack.esolangs.org/repo/
04:23:54 <oerjan> `! brachylog "test"w⊥82{~{Ṫ{.∧ℕA+₁×↙A~×₂}ᵐ+}w!⊥}
04:32:39 -!- mniip has quit (Quit: This page is intentionally left blank.).
04:33:14 <oerjan> `` interp 'brachylog "test"w⊥82{~{Ṫ{.∧ℕA+₁×↙A~×₂}ᵐ+}w!⊥}' </dev/null
04:33:40 <oerjan> although where is that % from
04:34:04 <oerjan> `` interp 'brachylog "test"w⊥82{~{Ṫ{.∧ℕA+₁×↙A~×₂}ᵐ+}w!⊥}'
04:35:03 <oerjan> @tell ais523 your slow brachylog program was simply hitting the HackEso "feature" where it waits for a timeout if you attempt to read from its stdin
04:59:57 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=64512&oldid=64511 * A * (-1083) /* Talk page */
07:07:05 -!- user24 has joined.
07:17:13 -!- Lord_of_Life has quit (Ping timeout: 246 seconds).
07:20:11 -!- Lord_of_Life has joined.
07:26:55 -!- AnotherTest has joined.
07:36:16 -!- user24 has quit (Quit: Leaving).
07:45:35 -!- Sgeo_ has joined.
07:48:37 -!- Sgeo__ has quit (Ping timeout: 258 seconds).
07:55:28 -!- Phantom_Hoover has joined.
07:56:01 -!- Phantom_Hoover has quit (Client Quit).
09:01:53 -!- atslash has joined.
09:02:20 -!- sftp has quit (Ping timeout: 272 seconds).
09:37:49 -!- wob_jonas has joined.
09:38:40 <wob_jonas> oerjan: interesting. though I don't know why it would read stdin when it doesn't in the simple case of the program that just prints a constant string. is it waiting for a more prompt?
09:52:24 <oerjan> wob_jonas: since ais523 said brachylog is supposedly interactive, i suspect it is, and that's what gives the % halt when it gets /dev/null instead.
09:53:15 <oerjan> not that i know brachylog
09:59:32 <wob_jonas> How do I make an URL that refers to a PDF with a fragment part pointing to a specific page? I thought I just had to add a hash mark and the page number in decimal, but that doesn't seem to work.
09:59:44 <wob_jonas> I want to give a link to page 17 of an article for convenience
10:09:09 -!- oerjan has quit (Quit: Later).
10:37:50 <Taneb> wob_jonas: does #page=17 work?
10:38:33 <Taneb> Works for me in Firefox and Chrome
10:39:25 <wob_jonas> hmm, should I add that to a wisdom? I won't remember that syntax otherwise
10:39:38 <HackEso> PDF stands for Pretty Depressing Format.
10:39:40 <HackEso> PDF stands for Pretty Depressing Format.
10:39:43 <HackEso> Nicely formatted classical wisdoms and quotes book at https://www.dropbox.com/s/fyhqyvy3i8oh25m/wisdom.pdf
10:40:27 <HackEso> wisdom/pdf:PDF stands for Pretty Depressing Format. \ wisdom/wisdomme:wisdomme is a PDF that may be in the topic. boily is the one who compiles it. See `? wisdom.pdf \ wisdom/wisdom.pdf:Nicely formatted classical wisdoms and quotes book at https://www.dropbox.com/s/fyhqyvy3i8oh25m/wisdom.pdf
11:04:00 <esowiki> [[Blue Tomato]] N https://esolangs.org/w/index.php?oldid=64513 * Jabutosama * (+3519) Created page with "Blue tomato (BT) is an art programming language concepted by [[user:Jabutosama]]. The language is based around around giving more or less surreal art to very specifically teac..."
11:22:01 <wob_jonas> Ah ah ah is one of the rare customary american units of measurement that happens to fit SI units exactly. One ah ah ah is equal to 1.
11:43:52 -!- shotover has quit (Remote host closed the connection).
11:48:32 -!- howlands has joined.
12:04:32 -!- mniip has joined.
12:17:56 -!- arseniiv has joined.
12:24:35 <esowiki> [[Arch]] https://esolangs.org/w/index.php?diff=64514&oldid=64493 * Areallycoolusername * (+178) /* Cells & Split */
12:29:59 <esowiki> [[User talk:A]] https://esolangs.org/w/index.php?diff=64515&oldid=64512 * Areallycoolusername * (+786) /* Char language */
12:30:26 <esowiki> [[User talk:A]] https://esolangs.org/w/index.php?diff=64516&oldid=64515 * Areallycoolusername * (+9) /* Char language */
12:30:54 <esowiki> [[User talk:A]] https://esolangs.org/w/index.php?diff=64517&oldid=64516 * Areallycoolusername * (-2) /* Char language */
12:31:10 <esowiki> [[User talk:A]] https://esolangs.org/w/index.php?diff=64518&oldid=64517 * Areallycoolusername * (+3) /* Char language */
12:32:11 <esowiki> [[User talk:A]] https://esolangs.org/w/index.php?diff=64519&oldid=64518 * Areallycoolusername * (-8) /* Char language */
12:32:39 <esowiki> [[User talk:A]] https://esolangs.org/w/index.php?diff=64520&oldid=64519 * Areallycoolusername * (+118) /* Char language */
12:44:56 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=64521&oldid=64520 * A * (+34) /* Char language */ Thank you, and a memory fix first
12:47:39 -!- sftp has joined.
12:48:46 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=64522&oldid=64521 * A * (+387) /* Char language */
12:54:23 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=64523&oldid=64522 * A * (+640) /* Char language */
12:56:55 -!- howlands has quit (Quit: sort of).
12:58:24 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=64524&oldid=64523 * A * (+190) /* Commands */
13:00:45 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=64525&oldid=64524 * A * (+75) /* Commands */
13:08:08 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=64526&oldid=64525 * A * (+132) /* Char language */ More verbose! MWHAHAHA
13:13:57 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=64527&oldid=64526 * A * (+15) /* Char language */ not TC of course
13:18:37 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=64528&oldid=64527 * A * (+232) /* Char language */
13:24:19 -!- wob_jonas has quit (Remote host closed the connection).
13:24:25 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=64529&oldid=64528 * A * (+217) /* Char language */
13:39:00 -!- xkapastel has joined.
14:02:09 <esowiki> [[User talk:A]] M https://esolangs.org/w/index.php?diff=64530&oldid=64529 * A * (-145)
14:30:03 <esowiki> [[Char]] N https://esolangs.org/w/index.php?oldid=64531 * Areallycoolusername * (+4040) Created page with "'''Char''' is an [[esoteric programming language]] made by [[User: A]]. It's made to be the first [[Arch]]-based programming language. == Specifics == Char utilizes an arch t..."
14:31:37 <esowiki> [[Char]] https://esolangs.org/w/index.php?diff=64532&oldid=64531 * Areallycoolusername * (+47)
14:31:52 -!- wob_jonas has joined.
14:32:31 -!- wob_jonas has set topic: IOCCC winners are announced; source code release planned in the past | Welcome to the international center for esoteric programming language design, development, and deployment! | https://esolangs.org | logs: https://esolangs.org/logs/ http://codu.org/logs/_esoteric/ http://tunes.org/~nef/logs/esoteric/?C=M;O=D.
14:32:47 <wob_jonas> hmm no, that's not the right way to phrase it
14:34:22 <esowiki> [[Arch]] https://esolangs.org/w/index.php?diff=64533&oldid=64514 * Areallycoolusername * (-19) /* Languages */
14:35:05 <esowiki> [[Arch]] https://esolangs.org/w/index.php?diff=64534&oldid=64533 * Areallycoolusername * (+74) /* Languages */
14:35:51 <esowiki> [[Language list]] https://esolangs.org/w/index.php?diff=64535&oldid=64506 * Areallycoolusername * (+11) /* C */
14:36:23 -!- wob_jonas has set topic: IOCCC winners are announced; source code release planned by now | Welcome to the international center for esoteric programming language design, development, and deployment! | https://esolangs.org | logs: https://esolangs.org/logs/ http://codu.org/logs/_esoteric/ http://tunes.org/~nef/logs/esoteric/?C=M;O=D.
14:39:38 -!- Sgeo__ has joined.
14:43:04 -!- Sgeo_ has quit (Ping timeout: 272 seconds).
14:51:12 <esowiki> [[Varnand]] M https://esolangs.org/w/index.php?diff=64536&oldid=64503 * DoggyDogWhirl * (+19)
15:07:14 -!- heroux has quit (Read error: Connection reset by peer).
15:07:24 -!- heroux has joined.
15:13:10 -!- atslash has quit (Read error: Connection reset by peer).
15:14:03 -!- atslash has joined.
15:14:42 <esowiki> [[Special:Log/newusers]] create * Sec-iiiso * New user account
15:26:28 -!- wob_jonas has quit (Remote host closed the connection).
15:55:08 -!- Sgeo__ has quit (Read error: Connection reset by peer).
15:55:34 -!- Sgeo__ has joined.
16:05:04 -!- Sgeo_ has joined.
16:08:10 -!- Sgeo__ has quit (Ping timeout: 246 seconds).
16:47:24 -!- b_jonas has joined.
17:07:07 -!- heroux has quit (Read error: Connection reset by peer).
17:07:41 -!- heroux has joined.
17:18:34 -!- Sgeo__ has joined.
17:20:59 -!- heroux has quit (Read error: Connection reset by peer).
17:21:28 -!- Sgeo_ has quit (Ping timeout: 244 seconds).
17:26:03 -!- heroux has joined.
17:32:07 -!- mniip has quit (Quit: This page is intentionally left blank.).
17:34:55 -!- heroux has quit (Read error: Connection reset by peer).
17:39:57 -!- heroux has joined.
17:40:37 -!- Phantom_Hoover has joined.
18:29:28 <b_jonas> "early July 2019" has definitely ended, right?
18:29:46 <shachaf> I think it only ends in mid-August.
18:31:20 <kmc> shachaf: which USB-C laptop charger do you use?
18:31:32 <int-e> b_jonas: I would not say "definitely".
18:31:38 <kmc> I'm considering getting a single charger for my backpack for both laptop and phone, but I want one that's compact
18:32:14 <kmc> laptop refuses to charge on 50W
18:32:19 <kmc> I think I want 65
18:32:50 <b_jonas> USB-C laptop charger? what the... don't we still live in a world where laptop charger plugs are coaxial, with incompatible random geometries, voltages, polarities, and voltage tolerances, so you can never be sure that an off-brand charger won't fry your laptop motherboard and lose the warranty, even if it mechanically fits in the socket?
18:33:10 <b_jonas> effectively random that is. there are standards, but there are too many of them.
18:33:43 <int-e> b_jonas: But I would usually understand it to mean the first 10 days of a month; after that point, the notion becomes increasingly less applicable.
18:34:34 <b_jonas> int-e: I assumed it would mean the first half of July, but gave them a day of doubt just in case they're on the -1200 timezone pacific islands
18:34:57 <kmc> b_jonas: mostly yes :(
18:35:03 <kmc> b_jonas: but some laptops can charge from USB-C
18:35:18 <kmc> my X270 can do either USB-C or the usual square thinkpad charger port
18:35:24 <int-e> (But of course it's July 4th today. ;-) )
18:35:27 <b_jonas> and July has 31 days, so the first half can be about 16 days long
18:35:42 <kmc> but it's picky about USB-C, you can't just plug it into any random wall charger
18:35:43 <int-e> https://www.timeanddate.com/calendar/?country=23 <-- lovely.
18:35:45 <kmc> it may require the 20V mode
18:36:32 <kmc> not sure if you know how USB-PD works
18:37:31 <b_jonas> int-e: no way. they're the IO*C*CC, they insist on accepting only C programs, not programs in other languages, and the C standard library has only the localtime/timelocal functions which work only with the gregorian calendar
18:37:53 <b_jonas> yeah, we can take that as an excuse:
18:38:13 <shachaf> kmc: I first bought a cheap USB-PD charger and it was bad.
18:38:19 <shachaf> Then I bought the one from Apple and it was fine.
18:38:21 <b_jonas> the localtime function allows you to carry stuff from out of range lower fields to higher fields, to make it easy to do date arithmetic with,
18:38:29 <b_jonas> and the IOCCC rules have in fact used that in the past:
18:38:38 <shachaf> Some time later I bought anther cheap one and it was also fine.
18:38:56 <HackEso> Gregor took forty cakes. He took 40 cakes. That's as many as four tens. And that's terrible.
18:39:06 <int-e> No mention of a calendar.
18:39:32 <shachaf> kmc: Apparently this is the one I'm using that works OK: https://www.amazon.com/Genius-Charger-Extension-Overheating-Warranty/dp/B07KCTKKFR
18:39:53 <b_jonas> or haven't they? I seem to remember they have, but now I can't find the reference
18:39:56 <shachaf> kmc: Keep in mind there are several hundred kinds of type-C cables and only one of them is compatible with your charger and laptop.
18:40:01 <kmc> is that so
18:41:03 <int-e> So Elon Musk has a new company, "Neuralink", for brain implants. Too bad "The Boring Company" was already taken...
18:41:12 <kmc> b_jonas: the charger and device negotiate a voltage up to 20V and a current up to 5A
18:41:18 <kmc> I think they also sense what the cable is capable of
18:41:44 <kmc> but yeah the brick I have right now only goes up to 9V which is probably why the laptop won't charge
18:42:06 <shachaf> one scow fact is that my laptop refuses to bios-update on usb power
18:42:15 <shachaf> because it's not 130W or whatever
18:43:15 <kmc> shachaf: I do have a brick that can charge my laptop from 12V power
18:43:17 <kmc> it's exciting
18:43:21 <b_jonas> maybe I'm just bad at datetime calculations and assumed that some date I read somewhere had an out of range field without checking it
18:43:24 <shachaf> anyway the point is that cables make a difference with type-c, and also they all look identical, so you gotta look it up or something
18:43:45 <shachaf> kmc: bricks are also good for charging cats
18:43:57 <int-e> What kind of voltage do flash roms need to be programmed? 5V? More?
18:44:31 <kmc> int-e: modern ones don't require more than the operating Vcc, I think
18:45:45 <shachaf> Obviously the answer to that question is irrelevant.
18:45:55 <shachaf> It's just Dell being scow for Dell reasons.
18:46:22 <kmc> shachaf: I think USB-D should be hermaphroditic, like Powerpole
18:49:18 <b_jonas> shachaf: Dell in the infamous sense where if you order replacement screws from them, they send you six tiny screws each individually packaged in six huge boxes respectively?
19:04:16 -!- MDead_ has quit (Quit: Going offline, see ya! (www.adiirc.com)).
19:19:22 -!- Lord_of_Life_ has joined.
19:19:47 -!- Lord_of_Life has quit (Ping timeout: 244 seconds).
19:20:35 -!- Lord_of_Life_ has changed nick to Lord_of_Life.
19:22:07 <b_jonas> I was trying to think of a certain sci-fi astronomical arrangement between a planet and a double sun moving in a strange pattern, but it seems it's gravitationally impossible.
19:22:57 <b_jonas> What I wanted is a double sun orbiting each other very quickly, and a planet that orbits the two of them slowly, but at the same the planet isn't much father away from them than the two suns from each other.
19:23:39 <b_jonas> If the arrangement exists, it needs a more magical reason, such as for Discworld.
19:23:54 <kmc> what is the computational complexity of orbital mechanics
19:24:10 <kmc> or not complexity, but rather computability class
19:24:14 <kmc> meaning, what kinds of algorithms can you implement as a n-body gravitational system
19:24:31 <kmc> the fact that it's continuous will place limits
19:25:06 <b_jonas> kmc: I won't try to answer that. I just totally confused myself with a different computational complexity question.
19:32:08 <j4cbo> kmc; my MacBook Pro will happily charge (v slowly) from 5v
19:34:10 <kmc> the X270 won't
19:34:12 <kmc> because it's a butt
19:34:22 <kmc> I also bought a USB-C power anal-yzer
19:34:28 <kmc> so I can see what my devices are actually using
20:00:58 <b_jonas> kmc: is that a passive thing that only measures power, or an active thing that interacts with the USB negotiation to tell you the voltage used too?
20:01:17 <kmc> I don't think the cables contain any electronics; I think it probably senses the voltage drop of the cable
20:01:21 <kmc> but also I'm not sure that's a thing at all
20:02:11 <kmc> wait, sorry
20:02:20 <kmc> I thought you were back to talking about the cable quality
20:02:25 <kmc> the meter is a man in the middle
20:02:31 <kmc> I think it does not interfere with the negotiation
20:02:35 <kmc> it probably just measuers the voltage
20:02:50 <kmc> but I'm sure you can buy more advanced (read: expensive) devices that also allow you to mess with the negotiation
20:03:04 <kmc> and also programmable loads and power supplies that you can configure for any set of capabilities
20:03:07 <kmc> it might be fun to own such things
20:03:37 <kmc> and then there are those "USB condoms"
20:03:40 <kmc> which disconnect the data lines
20:03:46 <kmc> I'm not sure if that interferes with USB-PD negotiation
20:04:41 <kmc> I think there are power only cables you can get
20:05:42 <b_jonas> I guess it could be passive and yet measure everything. It just needs to put an ideal infinite resistance voltage meter between the wires of the cable, and an ideal zero impedance current meter interrupting the wires, and some magical zero resistance gold coated sockets with superconducting wires.
20:06:42 <b_jonas> It just needs a separate power source so it doesn't leach the USB itself for power.
20:08:17 -!- FreeFull has joined.
20:08:22 <kmc> yes but of course it has none of those things
20:08:29 <kmc> and is Good Enough ™
20:08:40 <kmc> it's probably like a standard multimeter
20:09:11 <kmc> voltmeter 10 Mohm resistance in parallel to the load, ammeter ~1 mohm resistance in series to the load
20:09:22 <kmc> I do have some Powerpole voltage-current meters that can use an external supply
20:09:32 <kmc> in addition to being more accurate, this allows them to measure a wider range of voltages
20:09:38 <kmc> those things are very useful
20:10:36 <kmc> I'm not sure, but probably on that order
20:12:23 <kmc> I just measured the shunt resistor inside one of my meters as 0.1 ohms
20:12:27 <kmc> but that's the lowest the other meter can read
20:12:30 <kmc> and it's probably lower than that
20:12:56 <kmc> for high current shunts a common size is to drop 75 mV at full current
20:13:05 <b_jonas> kmc: sure, but isn't that only the ohmic resistance? can the capacitance bother the autodetection mechanism or signaling between the laptop and charger?
20:13:08 <kmc> so a 100A max shunt would have a resistance of 0.75 mohm
20:13:32 <b_jonas> I don't really know, I don't understand electric engineering
20:13:39 <b_jonas> we have other people at this company who understand it though
20:13:57 <kmc> b_jonas: if it violates the USB spec for the data lines then yes
20:13:59 <kmc> otherwise no
20:14:03 <kmc> because the negotiation is digital
20:14:20 <kmc> if the meter is poorly made it may prevent USB 3 speeds from working
20:14:26 <kmc> I don't know if the port will automatically downgrade to 2
20:14:37 <b_jonas> I don't mean the signals for negotiation, but for autodetecting the cable quality
20:15:21 <b_jonas> oh, USB3 is a good point, does its extra wires help transmit more current?
20:16:13 <b_jonas> I don't know how USB works, it's magic
20:16:25 <kmc> I am not certain that autodetecting cable quality is even a thing
20:16:29 <kmc> I'm not sure where I got that idea
20:16:56 <kmc> I don't think USB-C has any additional power wires
20:17:09 <kmc> but a cable designed for 5A had better have some reasonably thick wires
20:17:28 <kmc> as for capacitance, USB3 is so fast that it's essentially a microwave-frequency transmission line
20:17:33 <b_jonas> better wires in general, they're not restricted to power.
20:17:33 <kmc> so it does need precisely controlled impedance
20:18:00 <kmc> similarly, the twist in ethernet cables matters more at higher speeds
20:18:19 <b_jonas> and yes, USB3 is so fast you can basically transmit digital video signals to your monitor through it
20:18:21 <kmc> Cat7 has very tight tolerances on the twist geometry
20:19:00 <kmc> b_jonas: yeah
20:19:06 <kmc> b_jonas: you can have an external video card connected by USB3
20:19:09 <b_jonas> there are laptop dockers that use just two USB connectors plus two thick power connectors, and you can transmit data to two external monitors plus high speed network plus external solid state disks through them
20:19:34 <kmc> you can configure a USB-C port to carry HDMI or DisplayPort signals from an internal graphics card
20:19:37 <kmc> https://en.wikipedia.org/wiki/USB-C#Alternate_Mode_partner_specifications
20:19:41 <kmc> it is pretty fancy
20:20:06 <kmc> fun fact: USB3 cables have a tight enough tolerance that you can run PCIe signals through them, at least on short distances
20:20:22 <kmc> this is not in any way supported by the spec, it is just a repurposing of the cables
20:20:33 <b_jonas> the laptop I use at work is like that, although I only transmit laptop power plus data for one monitor plus not too fast network through it, no disk
20:20:35 <kmc> but it's popular with crypto miners
20:20:48 <kmc> as a way to get lots of video cards plugged into one motherbord
20:21:29 <kmc> at fry's I saw a mobo with 19 PCIe x1 slots on it
20:21:51 <kmc> obviously you cannot physically fit that many cards on the board without risers
20:22:18 <b_jonas> huh? why do you need a fast connection for that? don't they put separate built-in RAM onto each video card, so for crypto mining (as opposed to, say, gaming) you don't need much data throughput or latency between the motherboard and video card?
20:22:26 <kmc> and it has *three* ATX motherboard connectors
20:22:32 <kmc> https://www.asus.com/us/Motherboards/B250-MINING-EXPERT/
20:22:53 <b_jonas> also can't you put all that stuff into a single big video card that fits into two adjacent pcie sockets?
20:22:56 <kmc> and the best part? this thing was on blowout sale for $35.
20:23:12 <kmc> shovels and pickaxes 90% off!
20:23:22 <kmc> b_jonas: we are takling 19 big video cards
20:23:36 <kmc> have you ever seen a GPU mining rig
20:23:48 <kmc> here's a small one https://cryptosrus.com/wp-content/uploads/2017/06/mining-rig-1280x640.jpg
20:24:15 <kmc> those little boards plugged into the mobo with USB cables coming out vertically are the PCIe risers
20:24:46 <kmc> mining does not require much bandwidth, so PCIe x1 is fine
20:24:58 <b_jonas> the big card can have separate power cables, going to it directly without the motherboard involved, and as much cooling as you can physically manage
20:25:05 <b_jonas> I don't see why it needs much motherboard connection
20:25:11 <kmc> I've heard of people cutting a notch out of the back of an x1 slot so they can fit an x16 card in it
20:25:20 <kmc> or cutting off most of the GPU's PCIe connector
20:25:21 <kmc> and this works, apparently
20:25:27 <b_jonas> do you need low latency connection to the motherboard?
20:25:35 <kmc> b_jonas: I think it is still allowed to draw a fair amount of current from the PCIe slot itself
20:25:38 <kmc> b_jonas: no
20:25:58 <kmc> the cards basically operate on their own until they discover a solution for a particular block
20:26:13 <kmc> which does not happen very often
20:26:32 <b_jonas> kmc: looks nice, it's sort of like those servers with lots of high capacity hard disks connected to them, only you need more air gaps for heating
20:26:41 <b_jonas> the heating comes from the power cables
20:26:48 <kmc> for heating the environment
20:27:17 <b_jonas> and you need a powerful air conditioner to get the heat out of the room itself
20:27:23 <kmc> my friend has a painting at her apartment, not sure who made it, of a melting glacier with a huge (skyscraper-size) mining rig in front of it
20:28:11 <b_jonas> I mean, I'm paranoid and put air gaps between my disk drives, but I only have three in my computer right now, plus a dvd drive
20:28:34 <kmc> if you have good case airflow then you shouldn't need big gaps
20:28:38 <b_jonas> I use one of these little metal extenders to be able to put a HDD to a 5 inch wide space
20:28:43 <kmc> those are good
20:28:49 <b_jonas> I don't need big gaps, but there's enough space in the box to have it, so why not
20:28:53 <b_jonas> I don't lose anything by it
20:29:08 <b_jonas> it's not like I have a big video card taking up the space
20:29:22 <b_jonas> also, this box is ancient and I should buy lots of new hardware
20:29:57 <b_jonas> and start looking for a new camera too, because the warranty of the current one expires in a week and I'm getting more and more certain that it *knows* and deliberately times its death to right after that
20:30:26 <b_jonas> so that if I took it to repairs within the warranty, I couldn't prove that there's anything wrong, but the motor for the lens will give up right after
20:30:59 <b_jonas> but this compact camera has served me really well for three years, I enjoy it, so I might stick to the Panasonic brand
20:39:31 <b_jonas> Also I have to process and upload some photos that I made with it.
20:59:48 <b_jonas> has oren disappeared? it seems like he hasn't been in the channel (under this name or the backslash one) for a while
21:02:31 <kmc> I need to get a bunch of stuff fixed on my laptop before the warranty runs out
21:02:37 <kmc> I have on site accidental damage coverage
21:02:46 <kmc> I am not that happy with the build quality on this ThinkPad X270
21:03:13 <kmc> it's disappointing even by the standard of the post-IBM standards
21:03:21 <kmc> I broke the keyboard twice with tiny amounts of water, broke the screen once
21:03:29 <kmc> broke the internal speaker *and* the headphone jack, separately
21:04:06 <b_jonas> I broke my non-laptop keyboard with colored water too. I bought a new identical one. I'm more careful about letting drinks close to it now.
21:04:22 <kmc> this was like residual water on my hands after washing them
21:04:33 <kmc> every other thinkpad i've owned, it would not be a problem to get a few drops othe keyobard
21:04:50 <kmc> with this one it messed things up even after letting it dry
21:04:57 <b_jonas> Mind wasn't, I actually spilled a significant amount in it, like perhaps 50 grams or something.
21:05:08 <int-e> Yeah at the very least it should recover after drying out :/
21:05:18 <kmc> cathy spilled a whole cup of tea into her X201i
21:05:22 <kmc> and it was fine in the end
21:05:25 <kmc> let it dry for like a week
21:05:43 <b_jonas> I use a cheaper keyboard at work. That one claims to be waterproof.
21:05:44 <int-e> The best keyboard killer I know is Coca Cola (ideally with sugar).
21:05:54 <kmc> I don't think I've ever had that misfortune
21:06:10 <kmc> the speakers are sort of my fault
21:06:27 <kmc> i dropped the laptop off the side of the bed in a fit of passion
21:06:29 <int-e> I've destroyed 2 keyboards that way. But that was ages ago.
21:06:49 <kmc> I got coffee in one of my external keyboards and fucked it up
21:06:58 <kmc> but I was able to open it up, clean the board with isopropyl alcohol
21:07:01 <kmc> and now it works again \o/
21:08:31 <b_jonas> int-e: I see. I haven't tried spilling that into keyboard yet.
21:10:22 <b_jonas> kmc: what additives did the coffee have?
21:10:51 <b_jonas> I'm asking because int-e says the sugar might matter
21:11:00 <kmc> I like coffee as black as my existential despair
21:11:08 <kmc> it might, yeah
21:11:16 <kmc> ithink it was espresso actually
21:12:30 <b_jonas> I don't drink coffee. In the office, lots of people drink coffee of course. The entire IT industry can grind into a halt when the coffee machine doesn't work or when we run out of sugar or milk.
21:12:48 <kmc> I think maybe I should try quitting caffeine just to see what it's like
21:12:54 <kmc> cause I've consumed a lot of caffeine for a very long time
21:13:16 <b_jonas> oh, I don't say that I don't drink caffeine. I drink coke actually.
21:13:24 <b_jonas> With sweeteners rather than sugar these days.
21:13:50 <kmc> I drink coffee and diet soda and energy drinks
21:13:58 <kmc> I have a sort of compulsion to eat/drink things
21:14:01 <kmc> these things have no calories
21:14:45 <kmc> water's pretyt good too
21:14:52 <kmc> I have also been drinking diluted orange juice
21:14:56 <kmc> it's tastier than it sounds
21:14:59 <kmc> and pretty low calorie
21:16:30 <int-e> b_jonas: sugar matters because in addition to the electrical problem (cola has acid, plenty of electrolytes there...) you get a mechanical one (stickiness).
21:16:58 <b_jonas> int-e: yep, the plain water evaporates completely, but the sugar doesn't, and it keeps the water there more
21:17:25 <b_jonas> but coke with sweeteners is still somewhat sticky, even if not as much as the one with sugar
21:18:34 <int-e> I haven't tried that yet :)
21:19:19 <b_jonas> I haven't spilled it to a computer either
21:19:30 <b_jonas> I destroyed my phone with plain water too
21:31:01 <b_jonas> kmc: https://www.perlmonks.com/?node_id=1225327 has the story of my phone
21:31:28 <b_jonas> oh, I should edit that to add that the bluetooth of the Cat is broken too
21:36:00 -!- AnotherTest has quit (Ping timeout: 272 seconds).
22:03:05 -!- ais523 has joined.
22:04:08 <b_jonas> hi ais523. oerjan figured out what took time.
22:04:10 <ais523> ooh, I guess what was happening is that the Brachylog compiler was falling through into the interactive swipl interpreter after running the code
22:04:17 <HackEso> #!/bin/sh \ echo "$1" > tmp/input.brachylog \ (cd interps/brachylog/brachylog/Brachylog-master/src; swipl -g 'run_from_file("../../../../../tmp/input.brachylog", _, _), halt' brachylog.pl)
22:04:34 <b_jonas> but I don't understand why that happens for your triangular number program but not for the hello world program
22:04:37 <ais523> …but only if it returns false, rather than returning true
22:04:50 <ais523> the hello world program where I "commented out" the rest of the code with a return false returns false :-)
22:06:10 <b_jonas> `! brachylog "QUeRHCOQ9j7V"w
22:06:17 <b_jonas> ^ doesn't that return true?
22:06:25 <ais523> yes, and it ran quickly
22:06:37 <b_jonas> so it's slow if it returns false?
22:06:57 <b_jonas> so in that case, do you have a good way to fix this in your wrapper script?
22:07:09 <ais523> `` sed -i 's/halt/write("\ntrue."), !, halt; write("\nfalse."), !, halt' -e ibin/brachylog
22:07:10 <HackEso> /bin/sed: can't read s/halt/write("\ntrue."), !, halt; write("\nfalse."), !, halt: No such file or directory
22:07:20 <ais523> `` sed -i -e 's/halt/write("\ntrue."), !, halt; write("\nfalse."), !, halt' ibin/brachylog
22:07:20 <HackEso> /bin/sed: -e expression #1, char 60: unterminated `s' command
22:07:25 <ais523> `` sed -i -e 's/halt/write("\ntrue."), !, halt; write("\nfalse."), !, halt/' ibin/brachylog
22:08:06 <ais523> I made it print the program's return boolean, too
22:08:17 <ais523> err, exit code boolean
22:08:33 <ais523> brachylog doesn't have any way to write programs, only functions
22:08:46 <ais523> so you need a wrapper to make a brachylog function into an entire program and there's more than one way to do it
22:09:22 <ais523> the wrapper on TIO prints exit code as true/false by default, but has an option to print return value or even input instead (input is useful if you didn't specify it)
22:09:41 <b_jonas> does halt quit the interpreter?
22:09:55 <ais523> `! brachylog 63{~{Ṫ{.∧ℕA+₁×↙A~×₂}ᵐ+}w⊥}
22:09:56 <HackEso> [3,15,45][3,45,15][6,21,36][6,36,21][15,3,45][15,45,3][21,6,36][21,21,21][21,36,6][36,6,21][36,21,6][45,3,15][45,15,3] \ false.
22:10:12 <ais523> the "false" here is because there are no more solutions
22:10:36 <ais523> `! brachylog 81>ℕ≜{~{Ṫ{.∧ℕA+₁×↙A~×₂}ᵐ+}w⊥}
22:10:47 <HackEso> [0,0,0][0,0,1][0,1,0][1,0,0][0,1,1][1,0,1][1,1,0][0,0,3][0,3,0][1,1,1][3,0,0][0,1,3][0,3,1][1,0,3][1,3,0][3,0,1][3,1,0][1,1,3][1,3,1][3,1,1][0,0,6][0,3,3][0,6,0][3,0,3][3,3,0][6,0,0][0,1,6][0,6,1][1,0,6][1,3,3][1,6,0][3,1,3][3,3,1][6,0,1][6,1,0][1,1,6][1,6,1][6,1,1][0,3,6][0,6,3][3,0,6][3,3,3][3,6,0][6,0,3][6,3,0][0,0,10][0,10,0][1,3,6][1,6,3][3,1,6][3,6,1][6,1,3][6,3,1][10,0,0][0,1,10][0,10,1][1,0,10][1,10,0][10,0,1][10,1,0][0,6,6][1,1,10][1,10,1][3,3,
22:11:17 <b_jonas> add the cut to make it print just one solution per sum?
22:11:48 <ais523> `! brachylog 81>ℕ≜{~{Ṫ{.∧ℕA+₁×↙A~×₂}ᵐ+}!w⊥}
22:11:58 <ais523> I think you can cut after the w too, to the same effect
22:11:58 <HackEso> [0,0,0][0,0,1][0,1,0][1,0,0][0,1,1][1,0,1][1,1,0][0,0,3][0,3,0][1,1,1][3,0,0][0,1,3][0,3,1][1,0,3][1,3,0][3,0,1][3,1,0][1,1,3][1,3,1][3,1,1][0,0,6][0,3,3][0,6,0][3,0,3][3,3,0][6,0,0][0,1,6][0,6,1][1,0,6][1,3,3][1,6,0][3,1,3][3,3,1][6,0,1][6,1,0][1,1,6][1,6,1][6,1,1][0,3,6][0,6,3][3,0,6][3,3,3][3,6,0][6,0,3][6,3,0][0,0,10][0,10,0][1,3,6][1,6,3][3,1,6][3,6,1][6,1,3][6,3,1][10,0,0][0,1,10][0,10,1][1,0,10][1,10,0][10,0,1][10,1,0][0,6,6][1,1,10][1,10,1][3,3,
22:12:14 <ais523> nope, /have/ to cut after, that position is before the labelise :-)
22:12:17 <ais523> `! brachylog 81>ℕ≜{~{Ṫ{.∧ℕA+₁×↙A~×₂}ᵐ+}w!⊥}
22:12:19 <HackEso> [0,0,0][0,0,1][0,1,1][0,0,3][0,1,3][1,1,3][0,0,6][0,1,6][1,1,6][0,3,6][0,0,10][0,1,10][0,6,6][0,3,10][1,3,10][0,0,15][0,1,15][1,1,15][0,3,15][1,3,15][0,10,10][0,0,21][0,1,21][1,1,21][0,3,21][0,10,15][1,10,15][0,6,21][0,0,28][0,1,28][0,15,15][0,3,28][1,3,28][3,15,15][0,6,28][1,6,28][0,0,36][0,1,36][0,10,28][0,3,36][1,3,36][3,10,28][0,6,36][0,15,28][1,15,28][0,0,45][0,1,45][1,1,45][0,3,45][0,21,28][1,21,28][0,6,45][1,6,45][10,15,28][3,6,45][0,0,55][0,1,55
22:12:24 <ais523> labelise rules are the worst thing about Brachylog
22:12:53 <ais523> because you need to know way too much about how the "derive an algorithm to meet the spec you give" works internally to be able to labelise correctly
22:13:49 <b_jonas> ``` \! brachylog '81>ℕ≜{~{Ṫ{.∧ℕA+₁×↙A~×₂}ᵐ+}w!⊥}' | perl -e "local $/; print substr <STDIN>,200"
22:13:50 <HackEso> ERROR: Prolog initialisation failed: \ ERROR: brachylog_main/4: Undefined procedure: default/0
22:14:12 <b_jonas> ``` \! brachylog '81>ℕ≜{~{Ṫ{.∧ℕA+₁×↙A~×₂}ᵐ+}w!⊥}' | perl -e 'local $/; print substr <STDIN>,200'
22:14:14 <HackEso> ERROR: Prolog initialisation failed: \ ERROR: brachylog_main/4: Undefined procedure: default/0
22:14:35 <b_jonas> ``` perl -e 'print "foo!bar"'
22:14:54 <b_jonas> ``` \! brachylog '81>ℕ≜{~{Ṫ{.∧ℕA+₁×↙A~×₂}ᵐ+}w!⊥}'
22:14:55 <HackEso> ERROR: Prolog initialisation failed: \ ERROR: brachylog_main/4: Undefined procedure: default/0
22:15:05 <b_jonas> ``` \! 'brachylog 81>ℕ≜{~{Ṫ{.∧ℕA+₁×↙A~×₂}ᵐ+}w!⊥}'
22:15:06 <HackEso> Warning: '../../../../../tmp/input.brachylog':1:4: Illegal multibyte Sequence \ Warning: '../../../../../tmp/input.brachylog':1:5: Illegal multibyte Sequence \ Warning: '../../../../../tmp/input.brachylog':1:6: Illegal multibyte Sequence \ Warning: '../../../../../tmp/input.brachylog':1:7: Illegal multibyte Sequence \ Warning: '../../../../../tmp/input.brachylog':1:8: Illegal multibyte Sequence \ Warning: '../../../../../tmp/input.brachylog':1:9: Illegal m
22:15:33 <b_jonas> I want to see the entries past the line cutoff
22:15:40 <ais523> `` \! 'brachylog 81>ℕ≜{~{Ṫ{.∧ℕA+₁×↙A~×₂}ᵐ+}w!⊥}'
22:15:42 <HackEso> [0,0,0][0,0,1][0,1,1][0,0,3][0,1,3][1,1,3][0,0,6][0,1,6][1,1,6][0,3,6][0,0,10][0,1,10][0,6,6][0,3,10][1,3,10][0,0,15][0,1,15][1,1,15][0,3,15][1,3,15][0,10,10][0,0,21][0,1,21][1,1,21][0,3,21][0,10,15][1,10,15][0,6,21][0,0,28][0,1,28][0,15,15][0,3,28][1,3,28][3,15,15][0,6,28][1,6,28][0,0,36][0,1,36][0,10,28][0,3,36][1,3,36][3,10,28][0,6,36][0,15,28][1,15,28][0,0,45][0,1,45][1,1,45][0,3,45][0,21,28][1,21,28][0,6,45][1,6,45][10,15,28][3,6,45][0,0,55][0,1,55
22:15:54 <ais523> try using a prefix that doesn't randomly turn UTF-8 mode off?
22:16:07 <b_jonas> well that's backwards, but ok
22:16:08 <ais523> I still don't see the point in ``` :-D
22:16:59 <b_jonas> ``` LC_CTYPE=en_NZ.utf8 \! brachylog '81>ℕ≜{~{Ṫ{.∧ℕA+₁×↙A~×₂}ᵐ+}w!⊥}' | perl -e 'local $/; print substr <STDIN>,200'
22:17:00 <HackEso> ERROR: Prolog initialisation failed: \ ERROR: brachylog_main/4: Undefined procedure: default/0
22:17:06 <b_jonas> ``` LANG=en_NZ.utf8 \! brachylog '81>ℕ≜{~{Ṫ{.∧ℕA+₁×↙A~×₂}ᵐ+}w!⊥}' | perl -e 'local $/; print substr <STDIN>,200'
22:17:08 <HackEso> ERROR: Prolog initialisation failed: \ ERROR: brachylog_main/4: Undefined procedure: default/0
22:17:11 <HackEso> LANG=en_NZ.UTF-8 \ LANGUAGE= \ LC_CTYPE="en_NZ.UTF-8" \ LC_NUMERIC="en_NZ.UTF-8" \ LC_TIME="en_NZ.UTF-8" \ LC_COLLATE="en_NZ.UTF-8" \ LC_MONETARY="en_NZ.UTF-8" \ LC_MESSAGES="en_NZ.UTF-8" \ LC_PAPER="en_NZ.UTF-8" \ LC_NAME="en_NZ.UTF-8" \ LC_ADDRESS="en_NZ.UTF-8" \ LC_TELEPHONE="en_NZ.UTF-8" \ LC_MEASUREMENT="en_NZ.UTF-8" \ LC_IDENTIFICATION="en_NZ.UTF-8" \ LC_ALL=
22:17:20 <b_jonas> ``` LANG=en_NZ.UTF-8 \! brachylog '81>ℕ≜{~{Ṫ{.∧ℕA+₁×↙A~×₂}ᵐ+}w!⊥}' | perl -e 'local $/; print substr <STDIN>,200'
22:17:22 <HackEso> ERROR: Prolog initialisation failed: \ ERROR: brachylog_main/4: Undefined procedure: default/0
22:17:39 <b_jonas> `` \! brachylog '81>ℕ≜{~{Ṫ{.∧ℕA+₁×↙A~×₂}ᵐ+}w!⊥}' | perl -e 'local $/; print substr <STDIN>,200'
22:17:41 <ais523> ``` LANG=en_NZ.UTF-8 locale
22:17:41 <HackEso> ERROR: Prolog initialisation failed: \ ERROR: brachylog_main/4: Undefined procedure: default/0
22:17:41 <HackEso> LANG=en_NZ.UTF-8 \ LANGUAGE= \ LC_CTYPE="en_NZ.UTF-8" \ LC_NUMERIC="en_NZ.UTF-8" \ LC_TIME="en_NZ.UTF-8" \ LC_COLLATE="en_NZ.UTF-8" \ LC_MONETARY="en_NZ.UTF-8" \ LC_MESSAGES="en_NZ.UTF-8" \ LC_PAPER="en_NZ.UTF-8" \ LC_NAME="en_NZ.UTF-8" \ LC_ADDRESS="en_NZ.UTF-8" \ LC_TELEPHONE="en_NZ.UTF-8" \ LC_MEASUREMENT="en_NZ.UTF-8" \ LC_IDENTIFICATION="en_NZ.UTF-8" \ LC_ALL=
22:18:10 <b_jonas> `` \! brachylog '81>ℕ≜{~{Ṫ{.∧ℕA+₁×↙A~×₂}ᵐ+}w!⊥}' | cat
22:18:12 <ais523> it should be using LC_CTYPE to determine the program encoding, I think?
22:18:13 <HackEso> ERROR: Prolog initialisation failed: \ ERROR: brachylog_main/4: Undefined procedure: default/0
22:18:31 <b_jonas> `` \! 'brachylog 81>ℕ≜{~{Ṫ{.∧ℕA+₁×↙A~×₂}ᵐ+}w!⊥}' | cat
22:18:34 <HackEso> [0,0,0][0,0,1][0,1,1][0,0,3][0,1,3][1,1,3][0,0,6][0,1,6][1,1,6][0,3,6][0,0,10][0,1,10][0,6,6][0,3,10][1,3,10][0,0,15][0,1,15][1,1,15][0,3,15][1,3,15][0,10,10][0,0,21][0,1,21][1,1,21][0,3,21][0,10,15][1,10,15][0,6,21][0,0,28][0,1,28][0,15,15][0,3,28][1,3,28][3,15,15][0,6,28][1,6,28][0,0,36][0,1,36][0,10,28][0,3,36][1,3,36][3,10,28][0,6,36][0,15,28][1,15,28][0,0,45][0,1,45][1,1,45][0,3,45][0,21,28][1,21,28][0,6,45][1,6,45][10,15,28][3,6,45][0,0,55][0,1,55
22:18:41 <b_jonas> ``` LANG=en_NZ.UTF-8 \! 'brachylog 81>ℕ≜{~{Ṫ{.∧ℕA+₁×↙A~×₂}ᵐ+}w!⊥}' | perl -e 'local $/; print substr <STDIN>,200'
22:18:43 <HackEso> 1,10,15][0,6,21][0,0,28][0,1,28][0,15,15][0,3,28][1,3,28][3,15,15][0,6,28][1,6,28][0,0,36][0,1,36][0,10,28][0,3,36][1,3,36][3,10,28][0,6,36][0,15,28][1,15,28][0,0,45][0,1,45][1,1,45][0,3,45][0,21,28][1,21,28][0,6,45][1,6,45][10,15,28][3,6,45][0,0,55][0,1,55][0,21,36][0,3,55][1,3,55][0,15,45][0,6,55][1,6,55][3,15,45][0,28,36][0,10,55][0,0,66][0,1,66][1,1,66][0,3,66][0,15,55][1,15,55][0,6,66][0,28,45][1,28,45][3,6,66][0,10,66][1,10,66][0,0,78][0,1,78][1,1,78
22:19:07 <ais523> it's because `! gets the language name and program as a single argument because that's how single ` works
22:19:34 <b_jonas> though we could make it also work with two arguments
22:20:31 <HackEso> #!/bin/bash \ CMD=`echo "$1" | cut -d' ' -f1` \ ARG="$(echo "$1" | cut -d' ' -f2-)" \ exec ibin/$CMD "$ARG"
22:20:42 <b_jonas> ``` LANG=en_NZ.UTF-8 \! 'brachylog 81>ℕ≜{~{Ṫ{.∧ℕA+₁×↙A~×₂}ᵐ+}w!⊥}' | perl -e 'local $/; print substr <STDIN>,400'
22:20:45 <HackEso> 1,21,28][0,6,45][1,6,45][10,15,28][3,6,45][0,0,55][0,1,55][0,21,36][0,3,55][1,3,55][0,15,45][0,6,55][1,6,55][3,15,45][0,28,36][0,10,55][0,0,66][0,1,66][1,1,66][0,3,66][0,15,55][1,15,55][0,6,66][0,28,45][1,28,45][3,6,66][0,10,66][1,10,66][0,0,78][0,1,78][1,1,78] \ false.
22:21:20 <ais523> `` sed -i -e 's/ARG"$/ARG$2"' 'bin/!'
22:21:21 <HackEso> /bin/sed: -e expression #1, char 14: unterminated `s' command
22:21:24 <ais523> `` sed -i -e 's/ARG"$/ARG$2"/' 'bin/!'
22:21:28 <HackEso> #!/bin/bash \ CMD=`echo "$1" | cut -d' ' -f1` \ ARG="$(echo "$1" | cut -d' ' -f2-)" \ exec ibin/$CMD "$ARG$2"
22:21:50 <b_jonas> be careful, sed is also overridden in /hackenv/bin
22:22:08 <HackEso> /hackenv/bin/`: line 5: brachylog: command not found
22:22:14 <b_jonas> and be careful with sed, if you want to allow two arguments, then you also want to allow two arguments when the second one can have newlines and carriage returns
22:22:15 <ais523> `` '!' brachylog '2+₂w'
22:22:16 <HackEso> ERROR: Prolog initialisation failed: \ ERROR: brachylog_main/4: Undefined procedure: default/0
22:22:40 <b_jonas> not for brachylog in particular, but in some languages, newlines in the source are useful
22:22:55 <ais523> I was only using sed for editing bin/!
22:23:06 <ais523> the edit worked, but the resulting code doesn't do what I wanted
22:23:23 -!- ais523 has quit (Quit: sorry for my connection).
22:23:36 -!- ais523 has joined.
22:24:10 <ais523> `` echo '' | cut -d' ' -f2- | wc
22:24:31 <ais523> `` echo '' | cut -d' ' -f2- | od -t x1z
22:24:51 <ais523> ooh, cut is appending a newline?
22:25:11 <int-e> `` echo -n '' | cut -d' ' -f2- | od -t x1z
22:25:35 <ais523> echo is appending a newline
22:25:45 <ais523> but bin/! isn't using echo -n
22:25:55 <int-e> `` echo a `echo b` c
22:26:03 <ais523> `` sed -i -e 's/echo/echo -n/' 'bin/!'
22:26:04 <int-e> ...the shell should strip the newline
22:26:32 <ais523> `` '!' brachylog '2+₂w'
22:26:34 <HackEso> ERROR: Prolog initialisation failed: \ ERROR: brachylog_main/4: Undefined procedure: default/0
22:26:41 <ais523> b_jonas: why do you use ``` rather than ``?
22:27:06 <int-e> Wasn't ``` the one with the C locale...
22:27:15 <HackEso> #!/bin/sh \ export LANG=C; exec bash -O extglob -c "$@" | rnooodl
22:27:30 <HackEso> #!/bin/bash \ cmd="${1-quote}" \ TIMEFORMAT="real: %lR, user: %lU, sys: %lS" \ shopt -s extglob globstar \ eval -- "$cmd" | rnooodl
22:27:32 <b_jonas> ais523: C locale is more practical for some things. especially bash itself: makes it sort the results of wildcard extension asciibetically rather than locale-wise, and more importantly, make bracket hyphen range wildcards like [a-k] match in a sane asciibetic way
22:28:35 <ais523> generally I use `` like I would use an actual shell
22:28:39 <ais523> and I don't set my actual shell to C locale
22:28:44 <b_jonas> ais523: if the brachylog interpreter depends on the locale, like the java compiler, but most programs use fancy characters that you won't find in smaller charsets, then you should consider making the wrapper set the LC_CTYPE explicitly
22:29:42 <ais523> b_jonas: the brachylog interpreter uses the locale in order to interpret what encoding the input is in, which is correct
22:29:59 <b_jonas> ais523: I set LC_CTYPE to an utf-8 locale, but the other locale facets to C. that makes programs, including the builtin readline in bash, know that the terminal uses utf-8, but doesn't have the strange behavior for wildcard expansion because that's governed by LC_COLLATE
22:30:05 <ais523> forcing it to something that the locale doesn't specify would be incorrect, because if, say, it's running in a UTF-16 environment, it should be interpreting the input as UTF-16
22:30:23 <ais523> perhaps ``` should be using C.UTF-8? because IRC uses UTF-8 except when it doesn't
22:30:42 <b_jonas> ais523: UTF-16 environments won't usually work in unix, definitely not when you pass the program in argv, because argv strings can't have nul bytes
22:31:21 <ais523> that's a good point, main uses char** for argv not wchar_t**
22:31:25 <b_jonas> you can read utf-16 files, but you can't have utf-16 argv or environment
22:31:30 <b_jonas> or filenames for that matter
22:31:52 <ais523> I believe there's some Linux-specific way to get at the command line arguments even if they have embedded NULs but I doubt anyone uses it because the portable way is more portable and more convenient
22:32:11 <b_jonas> in C and unix, yes. in windows and NNIX, you can have the argument and environment contain utf-16 strings.
22:32:12 <kmc> is it in the ELF startup vectors thing
22:32:20 <kmc> there's that weird auxv thing that people don't use
22:32:23 <kmc> that i forgot even the purpose of
22:32:41 <ais523> that said, I'm not convinced you /can/ put embedded NULs into the argument list because I'm not sure there's any kernel-level API for doing that
22:32:42 <kmc> oh right, it has certain useful runtime system info
22:32:52 <ais523> kmc: ASLR is one good use of it, it contains a random number for ASLR purposes
22:32:54 <kmc> that is used mainly by the dynamic loader and libc init code
22:32:54 <b_jonas> ais523: I don't think there is, at least for actual execced programs (as opposed to shell builtins, which cheat), because the arguments are passed in by execve, and execve takes nul-terminated strings
22:33:09 -!- MDead_ has joined.
22:33:12 <b_jonas> ais523: it's quite the opposite: there's a windows-specific way to get the original utf-16 arguments
22:33:47 <b_jonas> kmc: I used it through that libc wrapper in one program
22:33:54 <b_jonas> sysconf or something like that
22:34:03 <b_jonas> I dunno, some strange name like that
22:34:15 <b_jonas> I needed one of the parameters
22:34:26 <b_jonas> because of some linux-specific stuff
22:35:27 <b_jonas> ais523: maybe you can do something crazy like that to put an empty string into the environment and read it
22:36:49 <b_jonas> maybe you can do that even normally
22:38:14 <ais523> b_jonas: putenv puts the provided string into the environment, not a copy of it
22:38:27 <ais523> so you can just put an arbitrary string into the environment and then overwrite the first byte with NUL afterwards
22:38:47 <ais523> this is probably an esoteric use of putenv?
22:39:11 <shachaf> Hmm, I don't know how environment variables work.
22:39:32 <ais523> it's somewhat more insane than you'd expect
22:39:33 <shachaf> Is the running process's environment as modified by libc functions accessible in /proc, in Linux?
22:39:54 <shachaf> Or does putenv only affect getenv and exec functions?
22:39:55 <ais523> basically, environment variables aren't tracked by the kernel at all except at the execve → main boundary
22:39:57 <b_jonas> ais523: but does that survive an execve?
22:40:06 <shachaf> OK, that's what I would have guessed.
22:40:07 <ais523> the environment doesn't survive an execve by definition
22:40:10 <ais523> that's what the e stands for
22:40:12 <b_jonas> or more like, survive an execv, or can you pass execve
22:40:14 <ais523> "replace the environment"
22:40:28 <ais523> execv is just a wrapper in libc that does an execve with your current environment
22:40:49 <b_jonas> ais523: how does /proc/self/env work then?
22:41:00 <shachaf> I know Linux processes can modify their argv and that becomes visible in /proc/cmdline (and ps).
22:41:04 <ais523> so the kernel providing only execve, not any of the other 7 exec* functions, means it doesn't need to track the environment for correctness
22:41:12 <shachaf> But I don't know how they can modify their command line to make it longer, for example.
22:41:21 <ais523> I think /proc/*/environ stores a copy for auditing reasons but the kernel doesn't need to remember it for semantic reasons
22:41:34 <ais523> shachaf: argv[0] is a pointer to a string, you can just change the pointer rather than the string
22:41:46 <b_jonas> ais523: so it's like the filenames you get if you readlink /proc/*/fd/* ?
22:41:48 <shachaf> ais523: And the kernel will pick up on that?
22:41:59 <ais523> argv is double-mutable, you can mutate both the pointers and the things they point to
22:42:15 <ais523> I'm not sure that the kernel picks up on argv[0] assignments in Linux
22:43:06 <ais523> I though you could set the executable name using prctl, but maybe you can't
22:44:18 <ais523> hmm, so prctl lets you set the kernel's idea of where the command line is stored in memory and where the environment is stored in memory
22:44:35 <ais523> so maybe /proc/self/env just reads the environment variables directly out of the program's memory, assuming they're stored in the same place as before?
22:45:19 <b_jonas> ok... I think I don't even want to know those details
22:45:27 <ais523> aha: there's a PR_SET_MM_EXE_FILE
22:45:46 <ais523> which lets you change which executable file the kernel thinks your program is currently running from
22:45:53 <ais523> which is even more insane than changing argv[0]
22:45:57 <shachaf> ais523: But that's only the executable, not the command line.
22:46:18 <ais523> in order to be able to use it you first have to entirely unmap your existing executable, also you can only do it once per process
22:46:35 <shachaf> I once wrote a C program that ran without libc, let me look at what it did.
22:47:05 <b_jonas> shachaf: did that program ran on linux as a user process?
22:47:18 <shachaf> At startup with the amd64 ABI, you get argc right at %rsp, and then argv, which is an array of argc many pointers, and then envp, and then auxv.
22:47:53 <b_jonas> shachaf: what type is auxv there?
22:48:21 <shachaf> Oh, no, it's the actual array.
22:48:39 <shachaf> You scan it until you find the sentinel with type AT_NULL
22:48:45 <b_jonas> yeah, so that was the un-c-like part, not how argv and envp were passed
22:49:34 <shachaf> By the way, auxv contains the file name passed to execve, which can of course be distinct from argv[0]
22:50:02 <b_jonas> shachaf: sure, ps can print both
22:50:57 <b_jonas> it can print two different executable-name-like-things at least
22:51:00 <shachaf> I know it can read the link proc/pid/exe, but that's an absolute path, which I think is a bit different.
22:54:14 <shachaf> Oh man, this is so confusing.
22:54:26 <b_jonas> ``` ps axo pid,comm,args # this prints stuff like "Web Content" in the second column and command lines starting with "/usr/lib/firefox-esr/firefox-esr -contentproc" in the second column
22:54:26 <HackEso> PID COMMAND COMMAND \ 1 init /init \ 2 kthreadd [kthreadd] \ 3 ksoftirqd/0 [ksoftirqd/0] \ 4 kworker/0:0 [kworker/0:0] \ 5 kworker/0:0H [kworker/0:0H] \ 6 kworker/u2:0 [kworker/u2:0] \ 7 lru-add-drain [lru-add-drain] \ 8 kdevtmpfs [kdevtmpfs] \ 9 oom_reaper [oom_reaper] \ 10 writeback [writeback] \ 11 kcompactd0 [kcompactd0] \ 12 crypto
22:54:30 <shachaf> In this program U8 means an 8-byte unsigned integer rather than an 8-bit unsigned integer.
22:54:44 <b_jonas> not always full pathnames that is
22:55:03 <b_jonas> the second colume only has the basename of the executable, or what it lies about itself
22:55:17 <b_jonas> the third column has what looks pretty much like the full argv joined
22:55:45 <b_jonas> the argv sometimes has relative pathname, sometimes absolute pathname for the executable
22:55:57 <b_jonas> and sometimes the argv itself lies
22:56:17 <b_jonas> because you can pass basically anything, and only the shell and gzip and git and a few programs like that care
22:56:35 <b_jonas> (the shell cares about whether it starts with a hyphen, gzip and git cares about names it's usually symlinked to)
22:57:08 <fizzie> I've seen the U1/2/4/8 nomenclature somewhere before, for 8/16/32/64-bit integers, respectively.
22:57:35 <shachaf> ais523: As far as I can tell setting argv[0] to point to a different string has no effect on ps.
22:57:56 <ais523> that's what I'd expect too; it works on some systems but I don't think Linux is one of them
22:57:57 <b_jonas> I have written C++ code where I defined typenames ending in 1, 2, 4, 8 for 1-byte, 2-byte, 4-byte, and 8-byte integers. not U8 or u8 or S8 or s8 or I8 or i8 though
22:58:01 <shachaf> fizzie: Yes, I thought it would be a better idea because they're all one-digit numbers.
22:58:20 <shachaf> ais523: Then maybe I misunderstood 15:41 <ais523> shachaf: argv[0] is a pointer to a string, you can just change the pointer rather than the string
22:58:48 <shachaf> I decided to go back to bit counts because that's what everyone else uses.
22:59:03 <shachaf> It wouldn't be confusing except that 8 bit and 8 bytes are both very common sizes.
22:59:15 <ais523> shachaf: that was in reply to a question asking about how you could make the name longer
22:59:17 <b_jonas> although there's also a third variant, where you use "3" for 1-byte, "4" for 2-byte, "5" for 4-byte, "6" for 8-byte, "7" for 16-byte, "8" for 32-byte, and "9" for 64-byte
22:59:32 <shachaf> ais523: Yes, for people viewing the name through ps.
22:59:38 <ais523> anyway, it seems that on Linux, the "executable name" is the name of the executable's main thread, so you can rename the thread in question and that renames the view in ps
22:59:39 <shachaf> Why else would I want to make it longer?
22:59:47 <ais523> that's limited to 15 bytes, apparently
23:00:08 <b_jonas> and any of these is better than using ambiguous names like "long" and "int" and "word" or abbreviations for them
23:00:09 <ais523> b_jonas: because 1 byte = 8 bits?
23:00:22 <b_jonas> ais523: yes, you can also have "0" for booleans
23:00:24 <shachaf> I want to change the contents of /proc/pid/cmdline.
23:00:45 <fizzie> Oh, I think it was probably the JVM specification.
23:00:58 <fizzie> https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html "The types u1, u2, and u4 represent an unsigned one-, two-, or four-byte quantity, respectively."
23:01:24 <ais523> I'm not sure if it's possible to change arguments after the first in /proc/pid/cmdline; my guess is yes but if so my searches haven't discovered a method yet
23:01:38 <shachaf> Recently I've been reading decompiled Java code to understand a game better.
23:01:49 <shachaf> It's amazing how much information they put in there. Almost everything except comments.
23:01:51 <ais523> Java doesn't /have/ unsigned 1-, 4-, or 8-byte types
23:02:06 <ais523> (char is an unsigned 2-byte number with a misleading name)
23:02:18 <fizzie> ais523: JVM, not Java.
23:02:32 <ais523> fizzie: yes, that's why the names can be weird
23:02:37 <ais523> as they don't have Java names to use as a reference
23:02:42 <b_jonas> and there's also one I considered using for the syntax of a certain sort-of esolang I've been considering: "1" for 1-byte, "2" for 2-byte, "4" for 4-byte, "8" for 8-byte, "3" for 4-byte float, "7" for 8-byte float, "6" for 8-byte pointer, "0" for boolean, because this way they're distinct and give the approximate size of the mantissa in bytes
23:02:50 <shachaf> ais523: Can't you just mutate argv[1][0] or whatever and put what you like in there?
23:03:25 <ais523> shachaf: yes, but if mutating argv[0] doesn't affect ps output, I wouldn't expect mutating argv[1] to affect ps output either
23:03:51 <kmc> I think unixes where it does alter ps output look into the process memory
23:03:54 <kmc> it's n a s t y
23:04:14 <kmc> not sure about /proc/$PID/cmdline
23:04:25 <shachaf> ais523: Mutating argv[0][0] does change ps output.
23:04:36 <shachaf> But not the pointer argv[0], which I thought was the distinction you were making before.
23:04:51 <b_jonas> shachaf: what if you unmap the initial stack?
23:05:02 <ais523> so I guess that /proc/$PID/cmdline is looking at the memory backing the pointers that argv points into
23:05:04 <ais523> that would make some sort of sense
23:05:09 <shachaf> One time I got very confused by a program that used strtok to parse command line arguments.
23:05:12 <b_jonas> surely it won't segfault the kernel, linux is careful about that thing these days, but what does it show in cmdline?
23:05:22 <shachaf> ais523: Yes, that's what it does. I think the pointers aren't used for anything.
23:05:33 <shachaf> It's just nul-separated strings.
23:05:46 <ais523> b_jonas: there's a prctl option to set where the memory backing *argv is; presumably, based on shachaf's results, that could be used to set the entire cmdlien
23:06:28 <shachaf> ais523: But argv isn't limited to 15 bytes.
23:07:06 <ais523> shachaf: there are three separate program name things
23:07:15 <shachaf> I like how the POSIX-specified way of getting access to the environment (to pass to execve or whatever) is to write "extern char **environ;" in your program.
23:07:25 <b_jonas> ais523: the third is the filename remembered for the mapping?
23:07:46 <ais523> you have readlink(/proc/self/exe) (kernel's idea of executable image); orig_argv[0] (memory space in which the command line was passed); and the name of the program's main thread (settable via prctl)
23:08:06 <ais523> the last is the one that's limited to 15 bytes when set via prctl; I'm not sure whether it can exceed 15 bytes if it's set by the kernel on program start
23:08:10 <shachaf> ais523: There's also the AT_EXECFN in auxv.
23:08:31 <ais523> ah yes, although I'm not sure that the kernel can see that one if it's modified?
23:08:41 <fizzie> It would probably be hard for it to look at the pointers, since that vector is constructed by the libc; the initial process stack at _start is just the strings.
23:08:42 <shachaf> No, it's read-only I assume.
23:09:10 <b_jonas> fizzie: is that only for auxv, or also for argv?
23:09:21 <fizzie> Also for (the contents of) argv.
23:09:26 <shachaf> fizzie: No, the ABI gives programs an array of pointers at startup, I think.
23:09:35 <fizzie> shachaf: No, it doesn't.
23:09:39 <b_jonas> I've heard contradictory statements about this, I give up now
23:09:47 <fizzie> At least the x86-64 ELF ABI.
23:09:48 <b_jonas> I'll have libc or other libraries handle this
23:09:48 <shachaf> fizzie: How confident are you, on Linux amd64?
23:09:56 <fizzie> shachaf: Very, because I'm staring at the spec.
23:10:05 <fizzie> It's Figure 3.9: Initial process stack.
23:10:26 <fizzie> No, I just can't read.
23:10:38 <fizzie> Yes, there is an array of pointers there.
23:11:07 <b_jonas> and it's terminated by a null pointer?
23:11:13 <fizzie> It's just that there's no pointer to the array of pointers, that's what I was misremembering.
23:11:38 <ais523> they didn't want to get into three-star programming :-)
23:12:02 <b_jonas> so the libc startup routines create argc and argv, but not *argv or **argv?
23:12:11 <shachaf> I'm glad the spec agrees with my program.
23:12:21 <ais523> that's one of my favourite articles on c2, it inspired the name of an esolang
23:12:22 <b_jonas> shachaf: is your program x86_64?
23:12:47 <shachaf> b_jonas: argc and argv are passed by the kernel at (%rsp) and 8(%rsp)
23:13:11 <shachaf> I guess I should say at %rsp and at %rsp + 8
23:13:29 <fizzie> At 8(%rsp) there is the first pointer, as in argv[0].
23:14:01 <ais523> wow, apparently the C2 wiki need to be able to make "cross-domain" (actually to a different subdomain of itself, but still) XHR requests to work correctly?
23:14:03 <shachaf> Yes, I meant that argv points to that address.
23:14:19 <ais523> http://wiki.c2.com/?ThreeStarProgrammer for anyone interested, btw
23:16:34 <b_jonas> yeah, I remember I looked at that because you link to it from the 3-star programmer description page on esowiki
23:16:49 <b_jonas> I don't otherwise use the c2 wiki
23:16:51 <fizzie> https://zem.fi/tmp/f39.png is that table, just for the reference.
23:17:16 -!- Phantom_Hoover has quit (Quit: Leaving).
23:17:22 <ais523> nowadays most people think only of Wikipedia when someone says "wiki"
23:17:28 <ais523> but the older wikis are an important part of Internet history
23:18:03 <b_jonas> ais523: I most certainly don't, but I mostly think on _newer_ wikis than wikipedia
23:18:30 <shachaf> // argv: 8 bytes * (argc + 1), terminated with 0 pointer
23:18:30 <shachaf> // envv: 8 bytes * ?, terminated with 0 pointer
23:18:30 <shachaf> // auxv: 16 bytes * ?, terminated with AT_NULL (type 0) entry
23:18:42 <ais523> one thing I dislike is when I'm in #esoteric or #nethack or the like and someone says "the wiki" to mean Wikipedia rather than Esolang or NetHackWiki respectively
23:19:20 <fizzie> shachaf: Arguably, auxv is (16*N + 8) bytes long, at least according to that table.
23:19:21 <shachaf> Only nonsense people say that, though.
23:19:31 <ais523> on the subject of argv and friends being insane, I would like there to be a standard for command-line arguments and exit codes from programs, even if not everyone followed it
23:19:47 <fizzie> (The "Auxiliary vector entires..." are "2 eightbytes each", but the "Null auxiliary vector entry" is only "1 eightbyte".)
23:19:53 <ais523> this would mean that programs could opt-in to declaring they followed the standard, making them easier to use in an automated way without needing to special-case your code for every program
23:20:11 <shachaf> But I think the next eight bytes are guaranteed to be mapped so you can treat it as a 16-byte entry.
23:20:16 <ais523> BSD has a standard for return codes, that seems like a good starting point (and I typically try to follow it in my own code, but it's not very fine-grainedD)
23:20:30 <ais523> I'm not sure which BSD, probably all of them
23:20:41 <shachaf> It would be a funny joke to put that right on a page boundary.
23:20:43 <fizzie> It doesn't say in the table, but it might say it in the text. Certainly it's true in practice.
23:21:02 <shachaf> Is it always true in practice?
23:21:17 <shachaf> What if the environment and argv are empty?
23:21:32 <b_jonas> ais523: perl uses the convention that if the program exist with an unhandled exception, the exit code is max(errno & 0xFF, 1)
23:21:38 <shachaf> Oh, there are always going to be other things in the information block.
23:21:52 <ais523> b_jonas: ugh, I hate that convention
23:21:53 <b_jonas> which is useful because the errno can give some useful information when the exception message is not too detailed
23:22:14 <ais523> because errno has more than 256 possible values and as such you're making every single element of the exit code space ambiguous (other than 0)
23:22:26 <ais523> in particular, you have nowhere to return non-errno-based failures
23:22:27 <b_jonas> for proper programs, I prefer if the errno is 1 for ordinary failure, 2 for wrong usage or exceptional failure
23:22:33 <ais523> (I guess you could map them onto the closest errno value)
23:23:03 <ais523> in the BSD system, 64 is used for wrong usage, and is not used in any other circumstance
23:23:05 <ais523> I like that sort of guarantee
23:23:11 <b_jonas> ais523: no it doesn't. it's still under 256 on unix.
23:23:30 <b_jonas> I mean, technically you can assign any int to errno, but the defined errno codes only go up to something between 125 and 256
23:23:38 <b_jonas> I don't know the exact limit
23:23:40 <ais523> hmm, it goes up to 133, but wraps at 127 I think
23:23:44 <b_jonas> it's syscalls that go way past 256
23:23:54 <b_jonas> ais523: hmm, does perl wrap it to 7 bits? let me test
23:24:16 <ais523> no, wait (which is what returns the exit code) wraps it to 7 bits
23:24:25 <b_jonas> ``` perl -e '$!=0x81;die'; echo $?
23:24:32 <b_jonas> ``` perl -e '$!=0x89;die'; echo $?
23:24:47 <b_jonas> I claim this for unix, I don't know what happens on windows
23:25:03 <ais523> ``` perl -e 'kill $$, 9'; echo $?
23:25:09 <ais523> ``` perl -e 'kill 9, $$'; echo $?
23:25:10 <HackEso> bash: line 1: 58 Killed perl -e 'kill 9, $$' \ 137
23:25:10 <b_jonas> it's only the shell the maps signal k to 128+k in the shell parameter $?
23:25:26 <ais523> good thing HackEso protects me from that sort of error :-)
23:25:28 <b_jonas> everything other than the shell support proper 8-bit exit codes, both on the exit side and the wait side
23:25:34 <b_jonas> though sometimes the documentation claims otherwise
23:25:35 <shachaf> Man, I sure wish I could statically link all my Linux programs.
23:26:00 <ais523> even the ones that load dynamic libraries at runtime?
23:26:15 <shachaf> I mean, I wish the platform ABI didn't require you to load dynamic libraries at runtime.
23:26:16 <ais523> I think there are some programs that even compile code from source while they're running, then dlopen the resulting executables
23:26:33 <shachaf> You could use dlopen and still statically link, probably.
23:26:36 <b_jonas> ``` perl -e 'system "perl", "-e", "kill 9, $$"; printf "wait code %04X,\n", $?;'
23:26:39 <shachaf> If you had your own implementation of dlopen.
23:26:54 <b_jonas> ``` perl -e 'system "perl", "-e", "kill 9, \$"; printf "wait code %04X,\n", $?;'
23:26:55 <HackEso> syntax error at -e line 1, at EOF \ Execution of -e aborted due to compilation errors. \ wait code FF00,
23:26:59 <ais523> b_jonas: you need to escape the $$
23:27:00 <b_jonas> ``` perl -e 'system "perl", "-e", "kill 9, \$\$"; printf "wait code %04X,\n", $?;'
23:27:03 <ais523> the inside perl killed the outside perl
23:27:18 <b_jonas> ``` perl -e 'system "perl", "-e", "\$!=0x89; die"; printf "wait code %04X,\n", $?;'
23:27:19 <HackEso> Died at -e line 1. \ wait code 8900,
23:27:23 <shachaf> I think OpenGL is the biggest culprit?
23:27:33 -!- Sgeo_ has joined.
23:27:35 <shachaf> Unfortunately writing GPU code is just ridiculous on every platform.
23:27:37 <b_jonas> upper byte of the wait code is the exit code, lower byte is the signal, and there are two or three other bits stowed in there
23:27:50 <ais523> I think that if you're statically linking libc and friends, you probably want to use LTO to take advantage of that
23:28:08 <b_jonas> the signal and the exit code are the ones you usually care about, unless you're ptracing something
23:28:22 <ais523> anyway, we now have a problem, in that there are /two/ incompatible exit code standards now
23:28:24 <ais523> which is worse than having one
23:28:27 <b_jonas> or doing job control, which needs to care about stopped children
23:28:29 <shachaf> ais523: Do you like Penguins?
23:28:54 <ais523> shachaf: penguins as in the animals, or is Penguins some piece of software or the like that I don't know about?
23:29:34 <b_jonas> ais523: there are also programs with custom exit codes defined. curl the command-line program actually documents what exit codes correspond to each kind of error. I even used that in a script that calls command-line curl and wants to retry for some errors but give up for others.
23:29:39 <ais523> I don't eat chocolate nowadays, but back when I did I didn't /dislike/ Penguins but there were many sorts of chocolate I preferred, so I hardly ever ate them
23:29:51 <shachaf> Why don't you eat chocolate?
23:30:01 <ais523> (don't eat = I avoid things that are primarily chocolate, I'm fine with chocolate traces)
23:30:11 <ais523> also I gave it up for a few months by accident/coincidence and just never started again
23:30:32 <b_jonas> ais523: do you have an estoeric language, other than feather, that does something like time travel?
23:30:33 <ais523> I don't think it's particularly good for my health and I was doing fine without it
23:30:53 -!- Sgeo__ has quit (Ping timeout: 244 seconds).
23:31:17 <ais523> b_jonas: I think the closest you get is nondeterminism in the NP sense
23:31:20 <shachaf> ais523: Anyway LTO seems like a different level of detail than what I was thinking about.
23:31:20 <ais523> e.g. Nellephant, Precognition
23:31:37 <shachaf> The point is that I want to make a Linux executable, in whatever language, which is self-contained. I might not use libc at all.
23:31:38 <ais523> the word "precognition" refers to a time-travel effect even if the language Precognition can be implemented without it
23:31:45 <shachaf> So I just want to know what ABIs it needs to conform to.
23:32:16 <ais523> shachaf: x86_64 (or whatever) kernel ABI would be the only relevant one if you have control over all the code in your executable
23:32:29 <ais523> you can use whatever you want for an ABI internally, and with no libraries, the API isn't relevant
23:32:38 <shachaf> ais523: OpenGL or Vulkan is also relevant if you want to write code that uses the GPU.
23:32:39 <b_jonas> shachaf: just because you don't use libc you can still use some other startup standard library that is distributed with the language. rust actually has one. C++ has one too but that one is pretty close to libc.
23:32:49 <shachaf> And that's a huge userspace mess.
23:32:58 <ais523> shachaf: oh right, you also have the API for any userspace programs you want to communicate with
23:33:13 <ais523> from Web of Lies I learned that X mostly works over sockets
23:33:15 <shachaf> X is a protocol that you can implement yourself.
23:33:22 <kmc> have fun with that
23:33:24 <shachaf> ...Except if you want accelerated rendering.
23:33:28 <b_jonas> shachaf: which side? server or client?
23:33:39 <shachaf> kmc: I'd almost rather implement the X protocol myself than use Xlib.
23:33:52 <ais523> I assume there's enough information to implement either yourself, but also strongly suspect that the client end of the connection is the easier to implement
23:33:54 <shachaf> You also can't really use xcb without Xlib.
23:34:05 <shachaf> b_jonas: The client, of course.
23:35:02 <shachaf> Now they're releasing Wayland which is in many ways even worse, and you're still limited to a single library.
23:35:03 <ais523> sshd logically has to contain an implementation of the server end otherwise ssh -X wouldn't work (possibly unlike ssh -Y, -X needs some understanding of the commands passing overe it), but my guess is that it just delegates almost everything to the X server on the same machine
23:35:22 <shachaf> Except now the library is more complicated and tries to do more things for you that you don't want to do.
23:35:50 <ais523> doesn't Wayland put much of the logic into the client exectuable? that would explain the need for a complex library
23:36:26 <shachaf> Well, for example the Wayland library requires you to do everything with a lot of callbacks instead of just giving you event data like Xlib.
23:36:31 <fizzie> Well, soon there won't be any X, right?
23:36:52 <ais523> X will be supported pretty much forever for compatibility reasons
23:36:59 <fizzie> ais523: "Once we [Fedora] are done with this [transitioning to Wayland] we expect X.org to go into hard maintenance mode fairly quickly. The reality is that X.org is basically maintained by us and thus once we stop paying attention to it there is unlikely to be any major new releases coming out --"
23:36:59 <shachaf> ais523: I'm not objecting to a complex library existing, but I do object to a complex library that you have to use.
23:37:10 <ais523> there's likely already an X server written in Wayland to act as a compatibility buffer between the two
23:37:21 <shachaf> If you're going to be forced to use a library, there should be a minimal simple library that the optional complex library is built on top of.
23:37:27 <fizzie> They'll support XWayland "forever", sure.
23:38:01 <shachaf> I don't object to deprecating X but a bunch of things in Wayland seem either not ready or just bad.
23:38:29 <ais523> one thing I discovered by accident is that SDL is capable of writing to framebuffers directly
23:38:43 <ais523> and thus can run and display graphics without access to X, Wayland or friends
23:38:51 <fizzie> mplayer can do that too.
23:38:55 <ais523> but this only works in fullscreen mode and there are a lot of graphicial artifacts
23:39:01 <b_jonas> some of the things wayland does make sense, but it also runs on a lot of stupid marketing about things where it's not actually better than X, I think
23:39:03 <fizzie> It can also do accelerated video on MGA cards without X.
23:39:14 <ais523> presumably SDL doesn't use the GPU at all in that configuration
23:39:26 <fizzie> (The G200/G400/G450/G550 ones.)
23:39:42 <ais523> b_jonas: the main alleged argument for Wayland is that it doesn't try to serialise the drawing commands over a socket, allowing it to be simpler
23:39:58 <ais523> I'm not sure I agree with this, but it's not an obviously ridiculous argument
23:40:20 <b_jonas> ais523: yeah, but X doesn't do that either, at least with modern programs and local X server
23:40:20 <fizzie> ...well, if you can call it "accelerated video", AIUI the only accelerated bit is the colorspace conversion, the card provides a YUV overlay.
23:40:50 <b_jonas> you can use X that way, but most programs these days don't, I believe
23:40:55 <ais523> b_jonas: it uses a unix domain socket I think rather than a TCP socket
23:41:03 <ais523> it's still /technically/ a socket but I doubt there's much loss at that point
23:41:13 <kmc> yeah i saw someone who had a tiling WM esque setup using tmux windows and mplayer fbdev
23:41:14 <b_jonas> ais523: not even that I think
23:41:23 <kmc> now all you need is a web browser
23:41:32 <ais523> well it uses a unix domain socket when running under web of lies, but maybe it detected that it couldn't talk to X the normal way?
23:41:41 <b_jonas> I meean, there's still a socket connection for control info, but not for all the drawing command data
23:42:02 <fizzie> kmc: There was at least one browser that supported rendering mostly as text, then overdrawing bitmaps into the framebuffer at the right spots.
23:42:09 <ais523> b_jonas: ah, how is that sent? shared memory?
23:43:19 <fizzie> Hmm, it at least has a framebuffer driver, but maybe that's in the more conventional style where it draws the text there as well.
23:43:23 <b_jonas> ais523: I think X gives the programs some sort of access to the GPU, with GPU permissino control, maps some GPU memory thing into the visible window, and the programs use toolkit libraries that, below heavy levels of abstractions and in the common fast case, ask the GPU to render the actual graphics into that GPU memory
23:43:45 <ais523> b_jonas: oh, the Direct Rendering Manager
23:43:50 <ais523> I have no idea how that thing works
23:44:04 <ais523> (just that people keep getting annoyed at it because it has the same acronym as Digital Rights Management and both are tied up with graphics/video)
23:44:05 <b_jonas> the X socket itself is still used to initiate everything, but I don't see a problem with at
23:44:42 <shachaf> I wrote my own UI library that renders directly with Xlib and OpenGL.
23:44:59 <shachaf> Well, it doesn't do very much UI right now.
23:45:31 <kmc> is that the emscriptenized thing you were showing me?
23:45:43 <b_jonas> ais523: that's not an accident of course. if you want to allow the user to read e-books that they don't own but only have a license to read but don't want to allow them to copy their contents, then you can't just serialize the drawing commands for the e-book through a socket to X.
23:46:07 <shachaf> I have an SDL backend which more or less supports HTML, though it's not that great.
23:46:07 <ais523> I would love it if there were a portable UI library where you gave it a description of what elements you wanted in your UI and it translated that to appropriate native (or native-looking/behaving) GUI/TUI for every platform
23:46:23 <ais523> I'm surprised it hasn't been written yet, the main issue may be that a number of the backends would be moving targets
23:46:26 <shachaf> I might make a proper emscripten/web backend eventually rather than using SDL.
23:46:28 <b_jonas> movies too, but for those you also need the efficiency.
23:46:28 -!- arseniiv has quit (Ping timeout: 272 seconds).
23:46:44 <ais523> but more likely it hasn't been written because managers care about their program looking the same on every platform more than they care about their program fitting into the platform
23:46:45 <b_jonas> ais523: there are such portable libraries,
23:47:03 <b_jonas> but the problem is that what the graphics environments want to do are moving targets, so every such library gets obsolate
23:47:14 <ais523> the closest I've seen is Java AWT, which has been deprecated for years and doesn't really work
23:47:23 <shachaf> ais523: I think Google' Flutter is a recent library with a goal like that.
23:47:30 <b_jonas> and eventually they do get improved, but everyone keeps using the old version of gtk (2 rather than 3) just like how they're using the old version of python (2 rather than 3) so the new things can't be added
23:47:48 <shachaf> By the way, chet out https://makepad.github.io/makepad/
23:47:57 <shachaf> That's written in Rust and renders all the text and everything with WebGL.
23:47:59 <ais523> b_jonas: isn't that because Gnome 3 was a disaster? I really dislike the way its native programs behave
23:47:59 <b_jonas> there are several such portable libraries, not only gtk, but also wx and tk which are both even more obsolate and, from a modern point of view, badly designed, than gtk
23:48:09 <shachaf> It looks surprisingly good for a web thing that does that.
23:48:11 <ais523> no doubt it's possible to use GTK 3 without repeating the same bad decisions, but Gnome 3 will have rather tainted it
23:48:16 <b_jonas> ais523: no, I think gnome 3 was a disaster for reasons other than that
23:48:31 <b_jonas> I don't think that's connected to gnome 3 much
23:48:37 <ais523> I have to use Gnome 3 at work, I hate it
23:48:43 <shachaf> Oh man, what's with the GTK3 native client-side decorations (ncsd) thing?
23:48:58 <shachaf> Ubuntu disables it automatically if you're using a window manager other than GNOME.
23:49:12 <ais523> it's bad enough that it forced me to Cinnamon on my laptop, because even though I dislike how bad Cinnamon's performance is it is at least possible to customize it into being usable
23:49:15 <shachaf> But the way they do it is with a .so that they add to LD_PRELOAD (!!!)
23:49:19 <kmc> everything is bad
23:49:56 <ais523> bad enough to be LD_PRELOADed out by the operating system :-D
23:50:11 <ais523> hmm, does this mean that you have terrible UI when you run programs with sudo?
23:50:18 <shachaf> ais523: They have access to the code! Don't they have patches for every package anyway?
23:50:41 <ais523> shachaf: it could be meant for, e.g., locally compiled software, snaps, etc.
23:50:41 <b_jonas> the hackenv environment is actually quite short
23:50:52 <ais523> snapd is something that I would benefit from knowing how it works, I think
23:51:03 <fizzie> shachaf: I don't think Flutter is super-focused on making applications "look native" on the platforms it supports. Maybe for the sort of behavioral things, but I think you get the same widgets you pick on all platforms you target.
23:51:04 <ais523> it may be an excellent idea or a terrible idea but I don't know enough about it to tell
23:51:14 <ais523> I have the suspicion, though, that if I understood it I would have a strong opinion on it
23:51:24 <shachaf> fizzie: Oh, that was the impression I got but I never used it.
23:51:27 <fizzie> Since it does the rendering on its own, with Skia.
23:52:04 <shachaf> fizzie: I thought they rendered the widgets to look like each platform's widgets, though.
23:52:56 -!- ais523 has quit (Remote host closed the connection).
23:52:57 <fizzie> Hm, maybe. I know it's got two widget sets (Material Design, and iOS-y), so maybe the default could be to pick the "natural" one.
23:53:09 -!- ais523 has joined.
23:53:12 <shachaf> fizzie: Oh, maybe that's all I as thinking of.
23:53:41 <shachaf> fizzie: I remember reading something about how they have to chase a moving target to match iOS widget look. Maybe it's just that rather than a general cross-platform thing.
23:54:07 <fizzie> All I know about Flutter is what I've overheard, there's been a lot of talk about it lately.
23:54:34 <fizzie> (Where "lately" means "over the last year or so".)
23:54:35 <shachaf> I wish platforms weren't all about maximizing lock-in with their nonsense bad APIs.
23:54:43 <shachaf> This is what every single platform is about.
23:54:50 <b_jonas> how does that even work these days, when modern programs don't even use any sort of standard widgets, not even from toolkits, but instead use their stupid custom reinvented checkboxes and calendar widgets where you can only enter a date by clicking on arrows with the mouse and text input boxes that try to interpret your raw keyboard presses directly?
23:58:44 <fizzie> shachaf: Text selected in makepad doesn't end up in the PRIMARY selection. :/
23:59:24 <b_jonas> in webpages, first the fashion was custom calendar widgets and custom dropdown boxes, then input boxes that's pre-filled with a description of what the input box should contain that it's supposed to delete when you start entering text but can't really do that because the javascript api doesn't do,
23:59:24 <shachaf> fizzie: Man, that's the one nitpick I pointed out to someone when I was telling them about this the other day.
23:59:36 <shachaf> fizzie: I wonder whether it's doable, by making a hidden buffer and selecting the text in it.
23:59:51 <fizzie> The rounded corners of the selection highlight are nice, though.
23:59:53 <shachaf> fizzie: Ctrl-C/Ctrl-V does work, which surprised me a bit.