00:01:36 -!- ArthurStrong has quit (Quit: leaving). 00:04:02 I wonder how many system calls Linux would have if you got rid of all the obsolete ones. 00:06:56 my asm/unistd_64.h lists 332 total, the vast majority of them seem to be neither removed nor superseded, so I'm guessing about 300? 00:07:22 Mine has 436. 00:07:41 I suspect quite a few are superseded. 00:07:41 I think there might be debates about what counts as obsolete 00:07:54 sorting them alphabetically, I came across dup/dup2/dup3 00:07:56 yeah, eg. is read obsolete because we have preadv? 00:08:00 which of those would you consider obsolete? 00:08:10 ais523: dup, dup2 are definitely obsolete, just use the fcntl functions 00:08:19 dup3 clearly supersedes dup2. 00:08:25 dup isn't superseded as far as I know. 00:08:42 dup3 too has an fcntl equivalent 00:08:45 dup is entirely duplicated by fcntl 00:08:48 Of course the Linux ABI is much bigger than system calls. It include /proc and /sys, and ioctls, and so on. 00:08:53 and dup3 can be written in terms of dup2 + fcntl 00:09:16 hmm wait 00:09:18 /proc and /sys and friends can only be accessed via system calls 00:09:26 they're more like special cases of system calls, than ABIs in their own right 00:09:28 fcntl doesn't do the dup2/dup3 explicit destination file descriptor number thing? 00:09:32 sorry 00:09:42 b_jonas: no 00:10:00 although you can do a dup+cloexec mix using a single fcntl instruction 00:10:04 -!- FreeFull has quit. 00:10:11 which doesn't have a dedicated system call of its own otherwise (dup3 can't do it) 00:10:36 this ABI is actually something of a mess, but I guess backwards compatibility (and to some extent usabliity from asm without wrappers) is important 00:13:29 If foo() is replaced with foo2() which has a flags argument, clearly foo is obsolete. 00:13:41 Similarly foo with fooat. 00:14:19 what if the flags are rarely used, and technically unnecessary? 00:15:14 It should've had the flags argument in the first place. 00:15:16 dup3 is probably not entirely redundant to dup2 + fcntl (there are likely some race conditions relating to exec in one thread against dup in another), but it's only weird situations where you'd need it 00:15:39 and in practice it's more likely to be used as an optimisation to reduce system call overhead 00:16:01 You mean CLOEXEC? 00:16:22 All the system calls that make fds are getting flags arguments to support CLOEXEC. 00:16:24 dup3 only supports one flag ;-) 00:16:46 That seems like a good reason to call the nonflag version obsolete. 00:17:37 I would expect dup2(x,y) to be preferred over dup3(x,y,z) if you didn't want to set cloexec 00:18:38 fwiw, this is probably a good argument for all system calls to have a flags argument, even if it's initially just always-0? 00:18:47 -!- Frater_EST has quit (Read error: Connection reset by peer). 00:19:18 hmm, is the Linux system call ABI guaranteed to preserve registers, other than eax? I vaguely remember that it is 00:19:32 in which case dup2 has less register pressure, in addition to not needing to zero an additional register 00:19:48 It clobbers rcx and r11. 00:19:59 oh right, everything clobbers r11 00:20:11 Why? 00:20:43 in practice, r11 very rarely /actually/ changes as the result of a call, but it's been considered useful to have a register that dynamic linkers and other similar things can use as a temporary if they need to inject glue code for some sort of call or another 00:21:01 like, at any change of control, you have a register that's safe to clobber no matter what 00:21:14 and r11 is the generally agreed-on choice for that 00:21:22 (it helps if everyone uses the same register, for obvious reasons!) 00:21:46 I guess this is a SysV thing. 00:22:07 -!- Frater_EST has joined. 00:22:20 it probably started from there, at least 00:22:43 I think calling files in /proc a special case of the ABI of open()/read() is a big stretch. 00:23:13 $ readlink /proc/self/exe 00:23:14 /bin/readlink 00:23:19 if that isn't a special case, I don't know what is 00:23:28 err, wrong one 00:23:58 I meant /proc/self/fd/0 and friends 00:24:18 Oh man, I forgot Linux had name_to_handle_at and open_by_handle_at. 00:25:00 (the point being that if a process has a deleted file open, readlink on that file returns the name it had before that name was deleted, but you can nonetheless read the file directly by fd) 00:25:20 I mean, /proc is obviously part of the ABI, but in a really bad way, and I don't think putting the blame on read is reasonable. 00:25:24 actually that probably works on /proc/self/exe too if a deleted executable is running 00:25:44 my point is that this is a special case relating to the combination of readlink and proc, you won't find anything like it elsewhere 00:25:58 and this is because proc is basically just a set of special case for system calls 00:28:16 I'm confused by the name_to_handle_at API. 00:28:48 Oh, never mind, I didn't read far enough. 00:30:58 whoa, Linux has process_vm_{read,write}v 00:32:06 It's also finally getting pidfd, apparently. 00:32:58 process_vm_{read,write}v look like a huge efficiency gain for debuggers, and probably have other uses as well 00:33:23 reading a target process' memory in tiny chunks via ptrace would have huge system call overhead 00:33:54 Was it previously possible to read /proc/pid/mem? 00:34:11 hmm, I didn't think of that 00:37:10 Ooh, pidfd. 00:37:52 There are so many foofd's in Linux; signalfd, eventfd, timerfd. 00:38:05 what's the intended use case of a pidfd? 00:38:19 at a guess, some sort of protection against PID reuse? 00:38:25 Avoiding race conditions, I imagine. 00:38:52 Yes, sending a signal to a known process without worrying about it dying and being replaced by some other process is the one I know of. 00:39:03 Also waiting for a process to exit without being its parent, maybe? 00:39:21 (or its ptracer) 00:39:47 actually, you can also wait for a process to exit without being its parent /or/ its ptracer by ptracing its parent, but that's probably a bit silly 00:42:03 hmm, the man page for ptrace has been updated since I last read it 00:42:26 -!- hppavilion[6] has quit (Ping timeout: 240 seconds). 00:42:59 there's a discussion of permissions, including the mention that ptrace permission checks are based on the ptracer's real UID/GID, not its effective UID/GID (which seems like a minor security risk in the case where the ptracer is trying to suspend its own permissions) 00:43:08 Here are some obsolete system calls: accept chown creat create_module dup2 epoll_create epoll_ctl_old epoll_wait_old eventfd fchown fork fstat getdents lchown link lstat mkdir mknod open pipe preadv pwritev readlink signalfd stat symlink vfork 00:43:44 This article says there's also a proposal for a clone flag that can make a process that can only be waited on through its pidfd, the intention being that a library can create a helper process without confusing its host application's wait calls. 00:44:45 -!- Sgeo_ has quit (Read error: Connection reset by peer). 00:44:54 -!- ais523 has quit (Remote host closed the connection). 00:45:07 -!- ais523 has joined. 00:45:19 For a Go application I wrote recently (for personal use), I did a really ugly-looking snippet to use ambient capabilities, before learning that actually the standard Go library's syscall.SysProcAttr struct has an AmbientCaps field for using ambient capabilities. 00:46:36 The man page for wait4 says that waitpid and waitid are preferred. 00:46:53 But neither one of them gives you rusage, like wait4 does! 00:47:24 Except that's not true. 00:47:36 The system call gives you rusage, but the glibc wrapper just ignores it. 00:47:50 -!- Sgeo has joined. 00:51:14 inotify_init is another one. 00:53:10 I think it would be helpful if there were some sort of model of OS-level capabilities, plus any similar constructs at below the OS level, in terms that users could easily understand 00:54:06 When will Linux support mmap into a ptracee? 00:54:14 in particular, there seems to be some sort of hierarachy of cans that override can'ts that override cans that override can'ts… 00:54:26 Windows has supported this forever. 00:54:38 like, file-permitted is the strongest sort of capability, it says that the file can do this, overriding everything else 00:54:47 Without mmap you can't even guarantee finding a syscall instruction to do anything else. 00:57:57 -!- budonyc has joined. 00:57:59 actually, no, there are two levels above that 00:58:22 being run as root or suid-root and not capability-aware lets you do anything and sort-of bypasses the whole capability thing 00:59:06 or, ugh 00:59:12 capability bounding set is really confusing in this model 01:00:01 removing a capability from the bounding set absolutely prevents that capability from ever again being regained by file-inheritable; however, it does not prevent it being regained from file-permitted 01:02:04 Yeah, it's not super-obvious. 01:02:09 AFAICT, capabilities is currently a mix between several different permissions models, with system calls to choose which ones you want, and/or to prevent your descendant processes using their own system calls to change back to a different one 01:02:24 except that the kernel doesn't force you to pick a specific model but sort of lets you blend your way between them if you like 01:02:41 There's that table in capabilities(7) on how the ambient, permitted, effective, inheritable and bounding sets are derived on execve. 01:03:30 But even that wasn't the full story. 01:04:45 I think a sane model would look something like "processes: permitted is always a subset of inheritable; files: only inheritable permissions exist" 01:06:22 actually, I think you need a new category entirely 01:07:05 I think files should have two permission sets: one is equivalent to "inheritable" in the current model, the other causes the process executed from that file to gain a permission as permitted if it is both inheritable and effective in the calling process 01:07:18 Anyway, all I wanted was to have one capability-aware program execute a capability-dump helper process with CAP_DAC_READ_SEARCH, and I think I got that setup right: for the capability-aware executable file, set that bit in the file's effective and permitted sets; in the capability-aware program, first add the bit to the process's inheritable set, then raise it in the process's ambient set. 01:08:16 files don't hav effective sets 01:08:28 just the effective bit, which could be called the "capability-unaware" bit 01:09:24 hmm, how does the no-new-privs bit interact with all this? 01:10:48 Right, that's what I meant. 01:11:15 Arguably, it's no surprise capabilities haven't really conquered the world yet. 01:12:21 if a capability-aware program A is trying to execute a capability-unaware program B with a particular capability set, AFAICT all it needs to do is to put the capability set into its own ambient set, with no changes to B needed 01:12:48 Well, it also needs to put the capability into its own inheritable set, but you might consider that a part of putting it into its own ambient set. 01:13:09 (If it wasn't there already, that is.) 01:13:17 (It won't be there already if it's coming from a file.) 01:13:18 yes, that's part of ambient 01:13:50 actually, what confuses me is that inheritable seems to be at all-0s for unprivileged processes 01:14:47 this gives it a /really/ niche use; its only purpose is for a privileged program to call unprivileged helper programs in such a way that they can call file-inheritable programs in a privileged way 01:16:19 I can't think of circumstances where that would be useful, and thus suspect that inheritable capabilites aren't currently used much 01:17:29 That's what I think too. https://lwn.net/Articles/636533/ calls them "broken". (The proposal for ambient capabilities.) 01:20:34 I think a bounding set on fP (in that article's notation) is useful, but oddly neither pI nor X actually bound it 01:20:38 I don't think anything can bound that 01:21:04 other than NNP, obviously, which has to outrank /everything/ to be usable securely 01:34:53 -!- imode has joined. 01:41:24 ais523: did you see my last edit to TPIMI? 01:41:56 oerjan: yes, I'm not sure you're right though 01:42:24 when I have the time and mental energy, I'll write an interpreter and figure it out that way 01:44:20 -!- zzo38 has joined. 01:44:42 oerjan: tempted to take your advice and add Mode to the wiki. 01:44:47 How to run PHP5 on Raspberry Pi? 01:45:00 zzo38: is there a package in the raspbian repos? 01:45:30 sudo apt-get install apache2 php5 ? 01:45:45 you shouldn't need apache to run PHP? 01:45:58 only if you want to use it for CGI scripts 01:46:16 I guess that's a common use, but my first thought was PHP as a standalone programming language rather than as part of a web server 01:46:18 ais523: well it seems obvious to me that the length 1 block representation needs to be the same length as the basic production sequence 01:46:32 I only want to run PHIRC, which is the IRC client I have. (My internet doesn't work, so I use this other computer instead, which has wireless internet.) 01:46:37 you shouldn't need apache, you can use anything else, however I'm under the assumption that- 01:46:39 nevermind. 01:46:46 you should just be able to install php5 then. 01:47:28 It says "package php5 has no installation candidate" 01:47:36 what distro are you running on the pi. 01:48:06 zzo38: does it have to be PHP 5 specifically, or is a newer version OK? 01:48:36 I think many things will break with PHP 7, which is what it currently has 01:49:29 I suppose I can try to see if the program works, but it might not work 01:50:20 the easiest way is probably to get a package for an old version of PHP from the Debian archives, see http://snapshot.debian.org/ for details 01:50:54 php5 should be a package in raspbian... 01:50:54 although, it might not work with modern dependencies 01:51:06 php5 is really old though 01:51:22 it's probably dropped out of the archives by now 01:51:28 sure, but it's still a required package. 01:51:55 it's possible that it has a minor version number in the archives 01:52:01 ais523: anyway, i cut and pasted into vim and rotated lines, and it seemed to fit that way. 01:52:24 zzo38: sudo apt-cache search php I guess. 01:52:29 you don't need the sudo iirc. 01:52:33 nor the "-cache" 01:52:47 been a long time since I used debian. arch main. 01:53:09 I think «apt show "php5*"» will be more useful 01:53:53 I tried that; it says virtual 01:53:56 huh, raspbian doesn't have a web-searchable package mirror. 01:53:58 that's lame. 01:54:09 if they're all virtual it means that the package doesn't exist in the repositories any more 01:54:20 so you'll need to find an old version of the package, perhaps from an old version of the repositories 01:54:26 I think the assumption is that nobody would use php5 any more 01:54:42 python 1 isn't in the repositories either 01:54:57 https://www.raspberryconnect.com/raspbian-packages/54-raspbian-php 01:55:07 how old _is_ php5. 01:55:34 oof, sec support in debian ended on new year's. 01:55:35 Is there a program for Raspberry Pi to download Usenet messages to be read later on another computer? 01:55:48 7.0 appears to be the oldest version available from there 01:55:49 still in jesse, though.. 01:57:41 7.0 was released in 2015; 5.6 was the most current version before that (6 was abandoned) 01:58:22 why was 6 abandoned? 01:58:30 5.6 became unsupported at the end of 2018 01:58:31 (feels like there's a joke there...) 01:59:25 apparently they started writing PHP 6 in 2008, and abandoned it in 2014 because it still wasn't finished by then 01:59:39 perl6 and php6. 01:59:40 the main intended feature that they failed to implement for 6 was Unicode support 02:00:11 perl 6 was finished though, it's just that it's sufficiently different from perl 5 that many people prefer the original (including me) 02:00:49 and perl 6 eventually got renamed to reduce confusion, I think 02:01:03 it's raku now 02:01:27 * oerjan discovered the name change when he saw people editing that in his wikipedia watchlist 02:02:07 The original's still being actively developed, as well. 02:02:45 Yes, that can be a good idea, to call it something else, since it is something else. I think Inform7 should also be renamed because it is a different programming language from Inform 02:12:56 -!- imode has quit (Ping timeout: 240 seconds). 02:19:05 I am trying to compile SQLite and now there is a temperature icon in the corner of the screen 02:22:09 -!- zzo38 has quit (Read error: Connection reset by peer). 02:26:44 -!- kspalaiologos has quit (Ping timeout: 265 seconds). 02:27:45 -!- zzo38 has joined. 02:28:02 Well, it works even with PHP7, so I don't need PHP5. (I was told it wouldn't work with PHP5; they were wrong.) 02:31:46 -!- Frater_EST has quit (Read error: Connection reset by peer). 02:31:50 -!- ESol5 has joined. 02:33:46 Typing "nice gcc" and omitting "-O2" prevented it from crashing. 02:42:57 I also invented a new esolang. 02:45:32 It is like a subset of PostScript, although having a different syntax, 02:45:56 -!- Frater_EST has joined. 02:46:20 Perhaps later I will post on esolang wiki, but right now I won't, so that I do not have to occupy the TV set right now 02:46:22 -!- zzo38 has quit (Quit: zzo38). 02:47:10 -!- budonyc has quit (Quit: Leaving). 02:56:21 -!- imode has joined. 03:00:41 I take it zzo38 is trying to use a Pi as a daily driver? 03:02:25 more power to him, tbh. always wanted to try a pi as a driver, if only to find a laptop case to put it in. 03:02:57 with the raspi zero w or whatever, it's attractive. surprised a phone hasn't been made from it yet. 03:03:18 the gpi case is a step in the right direction, though: http://retroflag.com/GPi-CASE.html 03:13:16 It is a bit limited in some ways, but I'm pretty sure none of those limitations are a surprise to anyone 03:13:32 Especially with the cost 03:15:00 -!- Frater_EST has quit (Read error: Connection reset by peer). 03:15:16 -!- Frater_EST has joined. 03:16:30 tbh using it as a thin client to access your actual workstation would be a great idea. 03:16:37 that's cute 03:17:01 imode: what would be the point of making a phone out of a DIY board based on a years-old phone SoC? 03:17:07 it's not even a particularly 'open' SoC 03:17:16 it's just another broadcom whatever 03:18:30 kmc: it's cheap, I can buy it in bulk, and there's less I have to do to fix it. this is of course assuming there is a supply chain ready to hand you a "phone case" for a pi zero w. 03:19:05 if there's an alternative SBC out there that has the same kind of adoption I'm down, I just haven't encountered it. 03:21:15 it's going to be less powerful than a 5 year old android phone and chunkier too 03:22:19 * imode shrugs. 03:22:37 power and chunkiness don't really concern me that much. I use a T430 thinkpad as my daily driver. 03:22:52 would like a phone that's built like a toughbook. 03:24:32 -!- Frater_EST has quit (Read error: Connection reset by peer). 03:34:05 -!- imode has quit (Ping timeout: 268 seconds). 03:35:10 -!- Frater_EST has joined. 03:53:49 -!- ESol5 has quit (Ping timeout: 268 seconds). 03:58:17 -!- oerjan has quit (Quit: Nite). 04:10:59 -!- imode has joined. 04:51:44 -!- Frater_EST has quit (Read error: Connection reset by peer). 05:12:06 -!- ais523 has quit (Quit: quit). 06:16:48 -!- imode has quit (Ping timeout: 265 seconds). 07:04:18 -!- Frater_EST has joined. 07:32:56 -!- Frater_EST has quit (Read error: Connection reset by peer). 07:34:37 -!- Frater_EST has joined. 07:52:27 -!- Frater_EST has quit (Read error: Connection reset by peer). 07:54:29 -!- Frater_EST has joined. 08:36:47 -!- b_jonas has quit (Remote host closed the connection). 08:45:16 -!- Frater_EST has left. 09:11:30 -!- xkapastel has joined. 09:11:48 -!- grumble has quit (Quit: God, you're more annoying than a creative voice mail message.). 09:16:59 -!- grumble has joined. 11:40:53 -!- arseniiv has joined. 11:51:17 -!- xkapastel has quit (Quit: Connection closed for inactivity). 12:40:29 -!- xkapastel has joined. 13:21:35 -!- kspalaiologos has joined. 13:30:07 -!- ArthurStrong has joined. 14:18:12 -!- Sgeo has quit (Ping timeout: 265 seconds). 14:19:02 -!- Sgeo has joined. 14:45:13 -!- ais523 has joined. 15:06:37 -!- Frater_EST has joined. 15:06:53 -!- ais523 has quit (Quit: sorry for my connection). 15:07:08 -!- ais523 has joined. 15:20:16 -!- Xatenev has joined. 15:21:17 -!- xkapastel has quit (Quit: Connection closed for inactivity). 15:22:34 -!- Frater_EST has quit (Read error: Connection reset by peer). 15:23:28 -!- Xatenev has left ("Leaving"). 15:25:24 -!- Frater_EST has joined. 15:29:12 -!- Frater_EST has quit (Read error: Connection reset by peer). 15:29:48 -!- Frater_EST has joined. 15:33:38 -!- imode has joined. 16:09:36 -!- imode has quit (Ping timeout: 240 seconds). 16:23:40 -!- Frater_EST has quit (Read error: Connection reset by peer). 16:40:50 -!- imode has joined. 17:05:55 -!- imode has quit (Ping timeout: 265 seconds). 17:07:54 -!- xkapastel has joined. 17:39:42 -!- LKoen has joined. 17:40:19 -!- FreeFull has joined. 17:45:05 -!- Frater_EST has joined. 17:47:01 -!- Frater_EST has quit (Read error: Connection reset by peer). 17:56:11 -!- subleq has quit (Ping timeout: 268 seconds). 17:59:47 -!- kritixilithos has joined. 18:02:53 -!- subleq has joined. 18:03:46 -!- ais523 has quit (Quit: quit). 18:28:42 [[User:CMinusMinus]] https://esolangs.org/w/index.php?diff=67035&oldid=66944 * CMinusMinus * (+10) 18:29:10 [[Nine]] https://esolangs.org/w/index.php?diff=67036&oldid=67019 * CMinusMinus * (+9) 18:29:25 [[Nine]] https://esolangs.org/w/index.php?diff=67037&oldid=67036 * CMinusMinus * (+0) /* Fizz Buzz */ 18:54:12 -!- laerling has joined. 19:04:24 -!- kritixilithos has quit (Quit: kritixilithos). 19:08:41 -!- imode has joined. 19:21:18 -!- xkapastel has quit (Quit: Connection closed for inactivity). 19:23:06 -!- arseniiv has quit (Quit: gone completely :o). 19:31:44 -!- imode has quit (Ping timeout: 276 seconds). 19:57:22 -!- LKoen has quit (Remote host closed the connection). 20:06:23 -!- LKoen has joined. 20:06:25 -!- imode has joined. 20:07:37 -!- kspalaiologos has quit (Quit: Leaving). 20:10:41 -!- LKoen has quit (Client Quit). 20:29:21 -!- nico_nico has joined. 20:53:30 -!- b_jonas has joined. 20:54:53 -!- arseniiv has joined. 20:57:30 -!- hppavilion[1] has joined. 20:57:37 if I set UTF-8 encoding in a windows console, my C# program treats some inputs as if it was end of stream :o I blamed it on ConEmu first, but then I sorted it out and even fixed this behavior setting the encoding to “standard Windows unicode” UTF16-LE. Oooof, it was a nightmare. And it’s nonsense 21:00:28 and if I don’t set it, it would be some ununicode encoding which can’t output my lovely ‘ and ’ quotes and which does mangle my lovely unicode filenames so the program thinks I gave it unexistent ones. Nightmare, and all for a program to replace a file retaining old file’s date attributes 21:01:02 though thank gods it worked in the end 21:25:29 -!- imode has quit (Ping timeout: 276 seconds). 21:25:48 -!- Frater_EST has joined. 21:35:19 Wolfram announced a prize on results regarding rule 30 :D the problems seem sensible? Here they are: 21:36:24 Problem 1: Does the center column always remain non-periodic? 21:36:24 Problem 2: Does each color of cell occur on average equally often in the center column? 21:36:24 Problem 3: Does computing the n-th cell of the center column require at least O(n) computational effort? 21:36:25 they all ask about the evolution of …000010000… where 1 is at the mentioned center column 21:36:55 what do you think this will lead to? 21:37:34 and how hard do you estimate these three? 21:38:06 arseniiv: they're probably easier than Wolfram has money. did he pose a high enough prize? 21:39:30 $30k (USD, I presume?), but I don’t see yet if it’s for each of them or for all of them combined 21:39:42 b_jonas: ^ 21:39:57 the post is too long 21:40:56 -!- nico_nico has quit (Quit: Leaving). 21:43:16 hm I don’t see it even on its official website 21:44:27 it just says “$30,000 in prizes for 3 problems” and no more? I think that means it would be divided between them, evenly or not 21:44:37 -!- ArthurStrong has quit (Quit: leaving). 21:50:38 -!- hppavilion[1] has quit (Ping timeout: 246 seconds). 21:53:39 -!- arseniiv has quit (Ping timeout: 250 seconds). 22:28:50 [[Nine]] https://esolangs.org/w/index.php?diff=67038&oldid=67037 * JonoCode9374 * (+178) /* Examples */ 22:29:04 [[Nine]] https://esolangs.org/w/index.php?diff=67039&oldid=67038 * JonoCode9374 * (-14) /* Swapping the Words "Good" and "Bad" */ 22:34:19 -!- jguy has joined. 22:48:34 -!- jguy has quit (Remote host closed the connection). 22:59:23 -!- djhoulihan has joined.