←2020-01-11 2020-01-12 2020-01-13→ ↑2020 ↑all
00:10:38 <b_jonas> though it works better if you ask specific questions or hints
00:10:55 <b_jonas> tell what you're stuck with or what doesn't work
00:11:40 <kspalaiologos> I'm tired not going to solve it now
00:11:50 <kspalaiologos> I need to take a rest
00:12:07 <kspalaiologos> See you today but around twelve
00:18:01 <b_jonas> sure
00:22:03 -!- arseniiv has quit (Ping timeout: 268 seconds).
00:27:02 <zzo38> I want to minimize dependencies of TeXnicard; it already uses SQLite, Ghostscript, and PCRE; so if I add further dependencies I should add ones which are already used by Ghostscript, if possible, I think.
00:38:01 -!- Frater_EST has joined.
00:48:24 <zzo38> I want to support PK format fonts in TeXnicard, and it seem that FreeType doesn't implement that format. Well, I can implement my own; I have done it before.
01:03:27 -!- j-bot has joined.
01:13:18 -!- Frater_EST has left.
01:40:33 -!- nico_nico has joined.
01:41:54 <esowiki> [[User:DmilkaSTD]] https://esolangs.org/w/index.php?diff=68804&oldid=67931 * DmilkaSTD * (-125)
01:42:15 <esowiki> [[User:DmilkaSTD]] https://esolangs.org/w/index.php?diff=68805&oldid=68804 * DmilkaSTD * (+4)
01:45:01 -!- nico_nico has quit (Client Quit).
02:18:07 <esowiki> [[NewFuck]] N https://esolangs.org/w/index.php?oldid=68806 * DmilkaSTD * (+415) Created page with "NewFuck is another brainfuck derivative. The operations changes everytime you make a new project. == Possible operations == {| class="wikitable" |- ! Brainfuck operation !! Po..."
02:19:11 <esowiki> [[NewFuck]] https://esolangs.org/w/index.php?diff=68807&oldid=68806 * DmilkaSTD * (+1)
02:26:46 <esowiki> [[NewFuck]] https://esolangs.org/w/index.php?diff=68808&oldid=68807 * DmilkaSTD * (+463)
02:54:52 -!- oerjan has joined.
03:10:42 -!- Lord_of_Life_ has joined.
03:11:38 -!- Lord_of_Life has quit (Ping timeout: 268 seconds).
03:12:03 -!- Lord_of_Life_ has changed nick to Lord_of_Life.
03:17:42 -!- sftp has quit (Ping timeout: 252 seconds).
03:20:11 -!- sftp has joined.
04:31:08 -!- MDude has quit (Quit: Going offline, see ya! (www.adiirc.com)).
04:34:03 -!- ^[ has quit (Ping timeout: 245 seconds).
04:35:07 -!- ^[ has joined.
04:37:48 -!- dog_star has quit (Ping timeout: 245 seconds).
04:39:12 -!- dog_star has joined.
04:40:50 -!- kspalaiologos has quit (Ping timeout: 240 seconds).
04:47:45 <kmc> has anyone made a brainfuck variant which allows direct system calls?
04:48:08 <kmc> for example say the ! command executes a syscall where the syscall number and arguments are given by the value under the head and the next six
04:48:13 <kmc> and puts the return value under the head
04:48:44 <kmc> to be actually useful you would also need a way to get real machine-level pointers to brainfuck cells, or some other way to use syscalls which have pointer arguments
04:51:40 <kmc> you could just say that the address of the first memory cell is in the first memory cell when the program starts
04:51:45 <kmc> or something like that
04:58:53 <FreeFull> Or you could translate 0 into a pointer to the first cell, 1 into a pointer to the second, and so on
04:59:16 <kmc> except that some arguments are pointers and some aren't
04:59:24 <kmc> and it would need to know about each syscall in that case
04:59:37 <kmc> or there may even be cases where it could be a pointer or not according to the semantics of the call
04:59:51 <FreeFull> I think the interpreter would have to know about the syscalls anyway
05:00:17 <kmc> why?
05:01:00 <FreeFull> So it knows how many inputs to take and how many outputs to provide. Unless you always have it do 6 arguments and ignore the extra ones
05:01:22 <kmc> yeah
05:01:28 <kmc> on linux anyway, I think it will work fine that way
05:02:01 <kmc> the syscall ABI is pretty simple
05:02:05 <FreeFull> And you'd need some way to deal with structs
05:02:49 <kmc> yeah the brainfuck code would need to manually construct the appropriate struct layout on the stack
05:02:52 <kmc> and then get a pointer to it
05:02:55 <kmc> s/stack/tape/
05:03:10 <kmc> it'd be a pain in the ass but
05:03:14 <kmc> this is esoprogramming
05:06:16 <imode> what's a _good_ alternative to syscalls, anyway.
05:09:37 <zzo38> You can also use calls for some kind of VM. I invented (but did not implement) a way to use Glk with Befunge, for example.
05:15:34 <kmc> what is Glk?
05:18:53 -!- atslash has quit (Quit: Leaving).
05:19:29 <zzo38> It is a API for setting up text windows for I/O especially in text adventure games. It also supports displaying pictures, sounds, music, file I/O, and date/time.
05:26:35 <kmc> ah, cool
05:26:37 <zzo38> It is a C API, although there is also a dispatch layer which uses a standardized format for arguments and uses numbers to identify each function (although a few functions cannot be dispatched, including the dispatching function itself).
05:32:40 <zzo38> Glulx is a VM which is mainly used with Glk (although the design allows implementations to be made with other I/O systems too), but also has some other functions included, such as the ability to save the entire VM memory and stack to a file, and built-in instructions for searching (linear, binary, or linked).
05:38:38 -!- FreeFull has quit.
05:44:17 -!- xkapastel has joined.
09:03:01 <zzo38> Now loading font metric files is implemented in TeXnicard.
09:06:37 <zzo38> It might be useful to add some extensions beyond what TeX uses, such as a margin character (like the boundary character it is not displayed; it can be used in kerning for hanging punctuation). Possibly some others too, but I don't know which ones. Possibly a table of accented characters, and maybe large character set support, maybe
09:42:33 -!- kspalaiologos has joined.
09:44:12 <kspalaiologos> up for tasks
09:44:36 <esowiki> [[Special:Log/upload]] upload * Hakerh400 * uploaded "[[File:Quine common program structure.png]]": Quine - common program structure
09:44:39 <kspalaiologos> I need to solve the last one
09:45:35 <kspalaiologos> [ s
09:45:36 <j-bot> kspalaiologos: 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
09:45:41 <kspalaiologos> wait
09:45:43 <kspalaiologos> what's this
09:45:44 <kspalaiologos> [ set
09:45:45 <j-bot> kspalaiologos: |value error: set
09:51:25 <zzo38> What task is that you will need to solve?
09:54:04 <kspalaiologos> b_jonas, can you look at #jsoftware and help me?
09:54:14 <kspalaiologos> split the vector into three element lists
09:54:17 <kspalaiologos> multiply them
09:54:20 <kspalaiologos> and put it in another list
10:11:41 <zzo38> Recovering Cards {3} Instant ;; Put target non-basic non-creature non-planeswalker non-Equipment non-Vehicle card from your graveyard on top of your library. ;; Retrace ;; Cycling {3}
10:50:05 <kspalaiologos> what is this
10:52:03 <oerjan> `? this
10:52:08 <HackEso> This is something people on the channel like to talk about. We're often unsure what this is, though. Nobody likes this.
10:52:13 <oerjan> hth
10:58:29 -!- kritixilithos has joined.
11:11:11 -!- xkapastel has quit (Quit: Connection closed for inactivity).
11:17:33 -!- oerjan has quit (Quit: leaving).
11:23:16 <int-e> `? that
11:23:17 <HackEso> that? ¯\(°​_o)/¯
11:23:24 <int-e> That's good.
11:33:10 -!- imode has quit (Ping timeout: 268 seconds).
11:37:18 -!- arseniiv has joined.
12:22:55 -!- Frater_EST has joined.
12:23:20 -!- Frater_EST has left.
13:08:19 <esowiki> [[User talk:*berlinquin]] N https://esolangs.org/w/index.php?oldid=68810 * Hex96 * (+101) Created page with "hello! ~~~~"
13:19:22 -!- xkapastel has joined.
13:28:02 <b_jonas> Is Taneb actually Tony Hawk?
13:28:35 <fizzie> Just because they both start with "T", I don't think that's enough evidence.
13:33:42 -!- kritixilithos has quit (Remote host closed the connection).
13:35:22 <Taneb> b_jonas: why do you ask?
13:36:43 <fizzie> Maybe they saw you do some sick [INSERT SKATEBOARDING TERMINLOGOY]s.
13:57:02 -!- Frater_EST has joined.
13:57:36 -!- Frater_EST has left.
14:09:08 -!- MDude has joined.
14:12:18 <b_jonas> Taneb: I was watching GDQ and it has a skateboarding game that has a cutscene that shows a likeness of Tony Hawk
14:12:36 <b_jonas> I probably connected it to you because of that list
14:12:54 <b_jonas> ``` cat wisdom/*people*taneb*
14:12:55 <HackEso> cat: 'wisdom/*people*taneb*': No such file or directory
14:12:57 <b_jonas> uh
14:13:01 <b_jonas> ``` cat wisdom/*taneb*not*
14:13:02 <HackEso> cat: 'wisdom/*taneb*not*': No such file or directory
14:13:07 <b_jonas> oh
14:13:15 <b_jonas> ``` cat /hackenv/wisdom/*taneb*not*
14:13:16 <HackEso> Taneb is not elliott, a rabbi, Mark Zuckerberg, James Bond, Queen Elizabeth the first, or anyone older than Queen Elizabeth the Second. Pending approval: Shigeru Miyamoto.
14:13:18 <b_jonas> right
14:13:24 <b_jonas> anyway, that list
14:18:20 <Taneb> Anyway, I am not Tony Hawk, I can't even skateboard
14:37:03 <b_jonas> good to know
14:37:19 <b_jonas> the mystery thickens, who is Taneb then?
14:37:40 <Taneb> I am
14:54:43 <arseniiv> could one person be different people simultaneously?
15:09:24 <b_jonas> `? dokalf
15:09:25 <HackEso> dokalf? ¯\(°​_o)/¯
15:11:55 -!- Lord_of_Life_ has joined.
15:13:21 -!- Lord_of_Life has quit (Ping timeout: 258 seconds).
15:14:48 -!- Lord_of_Life_ has changed nick to Lord_of_Life.
15:31:11 -!- xkapastel has quit (Quit: Connection closed for inactivity).
15:47:01 <fizzie> I think quite often these things turn out to have been some sort of a collective, like Nicolas Bourbaki.
15:47:35 <b_jonas> fizzie: which things? Taneb? or Tony Hawk?
15:47:57 <b_jonas> or a rabbi? or Queen Elizabeth the Second? that would explain how she reigns for so long.
15:48:15 <fizzie> I was thinking of Taneb, but maybe some of those others too.
15:49:02 <b_jonas> Tony Hawk can't be a very large collective since he fits on a single skateboard and in a single helmet
15:59:30 <Taneb> If I was a collective I'd probably be more active
16:00:11 <b_jonas> Taneb: maybe you're a collective representing a secret organization, which is why you're not too active?
16:00:32 <Taneb> b_jonas: I do not think that quite works out
16:01:19 <kingoffrance> `8ball is Taneb James Bond?
16:01:20 <HackEso> You may rely on it.
16:01:58 <kingoffrance> thats not a bad fortune, you can work with that
16:03:47 <b_jonas> kspalaiologos: ok, that's a better guess, because many people think that James Bond is a collective, or an inheritable title
16:17:34 <kspalaiologos> I'm confused
16:17:43 <kspalaiologos> fungot, what just happened
16:17:43 <fungot> kspalaiologos: the variable " foobar"
17:00:30 <zoobab> win 6
17:08:47 -!- FreeFull has joined.
18:28:13 <zzo38> I saw one program has the following license terms: This program is free and open source under the MIT license. Additionally, any discordian pope may automatically grant themselves a license under the WTFPL, as desired.
18:35:16 <fizzie> Since WTFPL allows any relicensing, and since there are many discordian popes ("every man, woman and child on this Earth is a genuine and authorized pope"), it probably means it's not hard to get a copy of that program under any other license either.
18:44:55 <b_jonas> Is Taneb a discordian pope?
18:50:22 <kmc> I assume so
18:50:27 <kmc> it's opt-out
18:55:52 <Taneb> I haven't knowingly opted out
18:56:03 <myname> who isn"t?
18:56:25 <Taneb> That said, I haven't knowingly opted out of any other sort of papity
18:57:51 <kmc> I think most of them are opt-in
18:58:03 <kmc> I'm also not sure if there is a formal procedure to opt out of Discordianism popehood
18:58:31 <kmc> I suppose I did that and became a mome instead
18:58:44 <kmc> I had the official card in my wallet for a long time
18:58:53 <kmc> along with a card listing the axioms of ZFC in Metamath notation
18:59:05 <kmc> (which also included propositional and predicate logic on the backside as a prerequisite)
18:59:07 <int-e> > map (pred . pred) "pope"
18:59:10 <lambdabot> "nmnc"
18:59:11 <kmc> I used to be such a nerd
18:59:14 <kmc> I still am, but I used to, too
19:00:21 <kmc> that was around the time of my GEB phase
19:00:25 <kmc> everyone has a GEB phase, right?
19:02:44 <int-e> don't remind me
19:02:49 <myname> technically, you need to opt-in to discordianism, or you don't
19:04:14 <esowiki> [[UnoScript]] N https://esolangs.org/w/index.php?oldid=68811 * *berlinquin * (+2508) Created page with "'''UnoScript''' is a stack-based, interpreted language inspired by the [https://en.wikipedia.org/wiki/Uno_(card_game) UNO card game]. It aims to be as general-purpose and usab..."
19:13:05 <esowiki> [[UnoScript]] https://esolangs.org/w/index.php?diff=68812&oldid=68811 * *berlinquin * (+99) Add categories
19:14:53 <esowiki> [[Language list]] https://esolangs.org/w/index.php?diff=68813&oldid=68716 * *berlinquin * (+16) /* U */
19:21:38 -!- stux has quit (Quit: Aloha!).
19:21:59 -!- stux has joined.
19:33:29 <b_jonas> kmc: yes. and a Smullyan phase too. the Smullyan phase lasts longer.
19:37:36 <kmc> Smullyan is cool
19:37:46 <kmc> and I still think GEB is a good book, it's just that the speculative parts are... quite speculative
19:37:49 <b_jonas> was, sadly
19:37:58 <kmc> it's interesting but it doesn't explain everything about the world like I thought it did when I was 16
19:38:25 <kmc> and the part which teaches metamathematics is both accessable and precise. it's not dumbed down
19:40:40 <arseniiv> <kmc> everyone has a GEB phase, right? => mmmaybe. My one was pretty shallow and maybe not a phase at all. I was even lazy to solve any question from there as I was more or less learned on logic and lazy in general. I read the book, found stories amusing, took something from the dual part but I suppose not at a face value. Complex questions have complex answers, would I expect different even some eight (I think?) years ago?..
19:41:33 <arseniiv> oh, Smullyan phase should be cooler maybe yes maybe definitely but I hadn’t read his books at the right time, only various excerpts
19:41:51 <arseniiv> <kmc> and I still think GEB is a good book, it's just that the speculative parts are... quite speculative => nailed it
19:48:28 <arseniiv> I’d like an accessible book on spinors and some simplified quantum-theoretical things, but essentially they should be quite separable. Spinors are interesting in their own way, and in a sense they are even applicable to rare mundane problems, though their transformations, i. e. spin groups (and there are sometimes miscommunication in people occasionally calling elements of a spin group, a spinor, which it isn’t), as I was to say, spin groups are m
19:48:28 <arseniiv> ore applicable as they act on vectors too and quaternions in rotating 3D are precisely the 3-dimensional spin group, as are complex numbers a 2D one and split-quaternions a 4D one etc. etc. clifford algebras blah blah
19:49:33 <arseniiv> <kmc> along with a card listing the axioms of ZFC in Metamath notation => whyy?
19:50:29 <kmc> why not
19:56:34 -!- kspalaiologos has quit (Quit: Leaving).
20:01:39 <arseniiv> reasonable!
20:03:24 <int-e> . o O ( Yay, the moment your program has been running for half an hour and you realise you forgot to compile it with optimizations enabled )
20:03:55 <int-e> (it was supposed to finish in 15 minutes ;) )
20:12:21 <arseniiv> :D rofoldl
20:19:53 -!- imode has joined.
20:32:31 -!- kspalaiologos has joined.
20:49:30 -!- stux has quit (Quit: Aloha!).
20:57:18 -!- kspalaiologos has quit (Quit: Leaving).
20:58:18 -!- imode has quit (Ping timeout: 265 seconds).
20:58:53 -!- imode has joined.
21:02:28 -!- stux has joined.
21:33:12 -!- imode has quit (Ping timeout: 260 seconds).
21:43:29 <int-e> Such intuitive code... http://paste.debian.net/1125756/
21:50:16 <int-e> And I should use one more variable rather than using the second half of one of those registers.
21:53:25 <int-e> (But it's also so much faster than the naive code it replaced, a factor of 30 for what I've been doing.)
21:53:51 <kmc> SSE, fun
21:54:17 <int-e> (fortunately I don't have to worry about portability :) )
21:54:41 <int-e> requirement: "runs on my PC"
21:55:18 <kmc> yay :)
21:58:12 <esowiki> [[NewFuck]] https://esolangs.org/w/index.php?diff=68814&oldid=68808 * DmilkaSTD * (+96)
22:00:23 -!- kspalaiologos has joined.
22:03:37 <b_jonas> int-e: my way to handle portability is to just make it give a reasonable compile time #error when there's no implementation for how you're compiling
22:03:58 <b_jonas> or, if that's hard, a runtime error with a reasonable message
22:07:07 <kmc> it's also not hard to use that gcc feature I forgot the name of
22:07:19 <kmc> which selects between multiple versions of a function at load time
22:07:25 <kmc> based on cpu flags
22:07:31 <kmc> it might be more of a glibc feature, but anyway
22:07:39 <kmc> it's good to have a portable fallback anyway for testing
22:08:01 <kmc> it does introduce a function pointer indirection though
22:08:09 <kmc> you can do the same thing with dynamic code patching but that's more complicated
22:10:37 -!- Lord_of_Life has quit (Ping timeout: 268 seconds).
22:10:48 <int-e> 'GNU indirect functions are an extension of ELF that allows you to make a decision about which implementation of a function to use at [dynamic] link time.'
22:11:09 -!- Lord_of_Life has joined.
22:11:20 <int-e> I didn't know what it was called either but I did come across the concept at some point.
22:14:29 <b_jonas> kmc: sure but you usually don't want to actualy write the other implementation
22:15:12 <kmc> sounds like int-e already did
22:15:24 <kmc> typically you would do a portable version first, then the optimized
22:15:26 <kmc> and I think it's good to have a reference implementation anyway
22:15:29 <kmc> for testing
22:15:41 <b_jonas> I wouldn't. I would do premature optimization. whether it's a part I need to optimize or not.
22:15:44 <kmc> if you have both then it's very easy to test the fancy vector code just by throwing random inputs and comparing outputs
22:15:47 <kmc> lol
22:15:50 -!- stux has quit (Read error: Connection reset by peer).
22:15:59 <kmc> on top of that the portable code is probably easier to read if someone wants to understand what's going on
22:16:07 <kmc> if it doesn't have to be fast at all, it can be very clear
22:16:14 -!- stux has joined.
22:16:54 <int-e> kmc: it's still around as a reference implementation anyway
22:18:57 <int-e> which is deliberately simple and not efficient, even for processors without fancy carryless multiplication instructions: http://paste.debian.net/1125758/ (and still not quite portable; it's missing the UINT64_C thingy)
22:22:14 <kmc> isn't uint64_t standard in C99 and later?
22:22:24 <kmc> what is this code for?
22:22:39 <int-e> kmc: UINT64_C is the macro for making a uint64_t literal.
22:22:44 <kmc> huh
22:22:58 <kmc> is it something like #define UINT64_C(x) x ## ull
22:22:59 <kmc> ?
22:23:07 <kmc> I never knew that was needed
22:23:08 <int-e> Because you can't really know whether the suffix should be empty, ul or ull...
22:23:11 <kmc> mhm
22:23:14 <kmc> yay for C :eyeroll:
22:23:26 <kmc> I was just going to ask if you need a ull actually
22:23:38 <kmc> better put ullllll just in case
22:23:50 <int-e> s/empty/U/ (those are capital, aren't they?
22:24:00 <kmc> hm
22:24:01 <kmc> maybe
22:24:19 <fizzie> UINT64_C makes a uint_least64_t constant, actually.
22:24:32 <fizzie> I've always found that a little odd, but that's how it is.
22:24:34 <int-e> good enough?
22:24:41 <kmc> you could cast it
22:24:51 <int-e> I guess there are corner cases where that becomes an issue.
22:25:03 <fizzie> I assume it's mostly because uint64_t isn't required to exist.
22:25:10 <fizzie> But uint_least64_t is.
22:25:14 <kmc> oh really
22:25:17 <kmc> interesting
22:25:37 <fizzie> It's required to be defined, but only if the implementation provides a suitable type.
22:26:50 <fizzie> C18 Exact-width integer types: "These types are optional. However, if an implementation provides integer types with widths of 8, 16, 32, or 64 bits, no padding bits, and (for the signed types) that have a two's complement representation, it shall define the corresponding typedef names."
22:28:56 <int-e> Yeah that sounds like C.
22:29:48 <fizzie> I'm not really sure what UINT64_C and friends are for, I guess they're just supposed to look nicer than the corresponding cast.
22:29:48 -!- kspalaiologos has quit (Read error: Connection reset by peer).
22:30:31 <int-e> does POSIX amend this?
22:30:45 <fizzie> I think POSIX might require 8, 16, 32 and 64, yes.
22:31:29 <fizzie> Oh, heh. Actually, only 8, 16 and 32.
22:32:31 <fizzie> https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdint.h.html "[CX] The following types are required: int8_t, int16_t, int32_t, uint8_t, uint16_t, uint32_t. If an implementation provides integer types with width 64 that meet these requirements, then the following types are required: int64_t, uint64_t"
22:33:19 <int-e> Seems sane enough, honestly... 32 bit platforms are not that long gone, probably still lingering in may corners :)
22:33:26 <int-e> *many
22:33:36 <fizzie> Thing is, uint_least64_t and uint_fast64_t are still mandatory.
22:33:55 <int-e> Yeah that is strange :)
22:34:28 <int-e> . o O ( diverging realities are fun )
22:35:01 <fizzie> I guess maybe the reasoning was, the implementation might have to do something weird to support at-least-64-bit types, and might have a harder time providing the exact-width type.
22:35:21 <kmc> I mean the Intel 8051 8-bit architecture from 1980 is still around
22:35:29 <kmc> so yeah 32 bit is still common
22:35:45 <kmc> 32 bit is only starting to become common in embedded
22:36:02 <int-e> Hmm I suspect POSIX never worried about 8 bit architectures :)
22:36:12 <kmc> yeah but they do have C compilers
22:36:14 <kmc> to varying degrees
22:36:19 <int-e> 16 bit though, hmm. Tricky :)
22:36:33 <kmc> the PIC XC8 compiler has a "short long" type :)
22:36:54 <fizzie> Is that a 24-bit type?
22:36:56 <kmc> yes
22:37:07 -!- imode has joined.
22:37:10 <int-e> Yes, C accomodates all sorts of niches, which goes a long way towards explaining their reluctance to mandate types. I'm really surprised to hear about uint_least64_t being madatory.
22:37:24 <kmc> avr-gcc has it too, but calls it something sensible: __uint24
22:37:52 <int-e> I suppose short long isn't worse than long double.
22:37:59 <fizzie> The Motorola DSP56K C compiler has a 24-bit 'int' and a 48-bit 'long'.
22:38:00 <kmc> gcc is more principled than most embedded compilers about how it handles extensions, syntactically
22:38:01 <int-e> (intel's 10 byte version)
22:38:08 <kmc> int-e: ah
22:38:09 <fizzie> (And a 24-bit 'char' as well.)
22:38:13 <kmc> is it 128 bit on ppc?
22:38:17 <int-e> (now mostly extinct because of SSE)
22:40:02 <fizzie> I think GCC on PPC did the double-double trick for long double.
22:40:40 <int-e> fancy
22:41:19 <fizzie> Where your extended-precision type is actually just two double-precision floats, organized so that you get about the same range as a regular double, but more or less double the precision.
22:41:26 <int-e> (IIRC Knuth covers this topic but I skipped that part.)
22:43:18 <arseniiv> I was thinking about that some day but wasn’t very sharp to think it in any detail
22:44:52 <zzo38> I didn't know about GNU indirect functions.
22:46:47 <fizzie> Fun fact: the typing of (non-U-suffixed) octal/hexadecimal literals is different than those of decimal constants. On (e.g.) x86-64, 0x80000000 is an `unsigned int`, while 2147483648 is a `long`.
22:47:43 <fizzie> https://ideone.com/aLGNHI as a corollary.
22:47:46 <kmc> ugh
22:48:41 <zzo38> I didn't know that either; why is that? Isn't there a U and L suffix so that you can use that to indicate it?
22:49:10 <fizzie> Yes, 2147483648U would be an unsigned int too.
22:49:46 <zzo38> (And, you can add a dot if you want a floating number.)
22:49:51 <fizzie> The way it works, the type (decimal, vs. octal/hexadecimal) and suffix (none, U, L, UL, LL, ULL) determine the possible list of types, and then the constant gets the first type on the list that it can be represented in.
22:50:39 <fizzie> `int`, `long` and `long long` is the list for unsuffixed decimal, but the list for unsuffixed octal/hexadecimal is `int`, `unsigned`, `long`, `unsigned long`, `long long`, `unsigned long long`.
22:50:41 <HackEso> int`,? No such file or directory
22:50:47 <fizzie> HackEso: Sorry.
22:52:08 <zzo38> O, that is how it works.
22:53:35 <fizzie> The official reason is: "Unlike decimal constants, octal and hexadecimal constants too large to be `int`s are typed as `unsigned int` if within range of that type, since it is more likely that they represent bit patterns or masks, which are generally best treated as unsigned, rather than 'real' numbers."
22:54:34 <zzo38> OK, although that still look like strange to me, and even then perhaps it might should depend how many leading zeros too (does it count the leading zeros?)
22:55:36 <fizzie> Any (nonzero) amount of leading zeros makes a constant octal, so... kinda? But not really.
22:56:20 <zzo38> No, I mean additional leading zeros for a octal or hexadecimal constant (after the initial 0 or 0x)
22:57:22 <fizzie> Oh. No, those don't matter.
23:39:05 -!- imode has quit (Ping timeout: 246 seconds).
23:40:08 -!- imode has joined.
23:53:07 -!- xkapastel has joined.
←2020-01-11 2020-01-12 2020-01-13→ ↑2020 ↑all