←2014-12-18 2014-12-19 2014-12-20→ ↑2014 ↑all
00:00:15 <fizzie> It's missing the "non-trivial zeroes" part.
00:00:17 <cluid> oh yeah, all solutions rather than all 'nontrivial'
00:00:34 <elliott> cluid: send it in and get your fere pen
00:00:37 <elliott> *free
00:00:57 <elliott> kind of unreasonable that they end the offer in 2018
00:01:01 <boily> fungot: how would one prove the Riemann?
00:01:01 <fungot> boily: fun fact: sisc is a subclass of a, but 5.25" on the abacus to any position in the argument
00:01:02 <elliott> can't spare a pen after that
00:01:08 <cluid> imagine if you really prove the RH, and they reject it beacuse you didn't prove their false mistatement of the theorem
00:01:22 <cluid> that would be annoying
00:02:03 <elliott> haha
00:02:22 <elliott> I also note they don't give a pen for proving ~RH
00:06:35 <oren> does 'nontrivial' have a real definition
00:07:16 <fizzie> It has a conventional definition in this context, at least.
00:07:24 <oerjan> fizzie: are you sure the multiplication by Gamma(s/2) doesn't take care of the trivial zeros?
00:07:38 <cluid> So-called "trivial zeros" occur at all negative even integers s=-2 , -4 , -6 ,
00:07:55 <oerjan> er and pi^(-s/2)
00:08:04 <oerjan> actually no, not that
00:08:51 <cluid> what does everyone use for 2D programming?
00:09:03 <cluid> im finding it quite hard to do it in a plain text editor :/
00:09:28 <oren> I think crazym4n has an ide for you.
00:09:41 <CrazyM4n> :3
00:10:00 <CrazyM4n> https://gist.github.com/CrazyM4n/d02380667be743be1310
00:10:27 <fizzie> oerjan: I was wondering about that, but it seemed like too much thinking to think it through.
00:10:58 <oerjan> fizzie: the graph on https://en.wikipedia.org/wiki/Gamma_function shows that it's infinite at the right points, at least
00:11:17 <oerjan> erm
00:11:39 <oerjan> actually what about odd negative integers
00:11:50 <cluid> this is awy cool
00:11:59 <cluid> i need something a bit different sorry to say!
00:12:08 <cluid> i havet o drag boxes around and connect them with wires
00:12:17 <cluid> http://lpaste.net/116828
00:13:15 -!- mitchs has quit (Ping timeout: 265 seconds).
00:13:35 <oerjan> hm indeed the zeta function isn't zero at those
00:13:39 <CrazyM4n> cluid: Hmm, what you're doing seems cool
00:13:39 <CrazyM4n> What is it?
00:13:57 <elliott> cluid: use a UML tool :P
00:14:16 * boily mapoles elliott “No UML. Bad UML.”
00:14:37 <cluid> CrazyM4n, this is called 2D, I found it inside someones UMIX directory inside the file that codex.umz produces when run http://www.boundvariable.org/task.shtml
00:15:00 <cluid> i have to program some things in 2D to get a code
00:15:20 <CrazyM4n> hmm
00:15:23 <CrazyM4n> interesting
00:16:17 <cluid> http://lpaste.net/116836
00:18:22 <oren> plaintext highlighted as a programming language, reminds my of those awful sites where random words are double-underlined red links
00:21:50 <oren> although i haven't seen those since i switched from my XP box. where did they go?
00:24:56 -!- mitchs has joined.
00:26:32 <elliott> are you sure you didn't have malware
00:26:55 <oren> elliott: i am sure i had everypossible malware
00:27:14 <CrazyM4n> I see those too
00:27:26 <CrazyM4n> I don't know what they are, but I haven't seen them since switching to linux
00:27:32 <oren> are they caused by malware?
00:27:34 <CrazyM4n> I see them on the school computers occasionally
00:27:42 <CrazyM4n> Probably, they are probably from MITM attacks
00:28:05 <CrazyM4n> All my not-technologically-advanced friends have crap tons of those red links
00:28:36 <oren> maybe it was one of those toolbars doing it
00:28:51 <CrazyM4n> You know, I never really put two and two together to realize that it was probably a MITM attack and not just invasive ad thingy
00:29:06 <CrazyM4n> It's not from a toolbar, I wouldn't have let that happen
00:29:29 <oren> yeah, googling it indicates there are spyware thingies that do the redlinks
00:29:53 <oren> but i never realized it wasn't just the sites
00:30:17 <CrazyM4n> Yeah
00:36:29 <cluid> http://i.imgur.com/11ht8ig.png
00:36:33 <cluid> ive pushed all 3switches finally
00:38:03 <cluid> i cannto get the flashy diamond since the path is blocked..
00:38:25 -!- mitchs has quit (Ping timeout: 245 seconds).
00:38:55 <zzo38> Then you did something wrong you need to plan ahead to not move around stuff so that the path gets blocked.
00:40:27 <zzo38> The chest is not pushable, nor is the small slime blob. Therefore, they can block things. (The sliders can also block some things.)
00:41:13 <zzo38> Learn the numbers "1" and "2" they will help too.
00:44:03 -!- MoALTz_ has joined.
00:46:41 -!- MoALTz has quit (Ping timeout: 250 seconds).
00:46:46 <cluid> 5thanks zzo38 I will try!
00:46:52 <cluid> It is a very interesting game
00:47:02 <cluid> and extremly difficult :D
00:50:32 -!- mitchs has joined.
00:53:32 <cluid> http://esolangs.org/wiki/Ragaraja this could be the most devoted brainfuck derivative?
01:00:08 <elliott> not very devoted, they didn't finish it
01:02:17 <CrazyM4n> Seems kind of pointless
01:04:34 <CrazyM4n> Though, the biological references seem kind of interesting
01:04:59 <CrazyM4n> There should be a language that is completely comprised of G, C, A, and T
01:05:18 <CrazyM4n> And it splits the code into 3-length codons
01:05:26 <CrazyM4n> And parses the codons as instructions
01:05:33 <cluid> http://esolangs.org/wiki/NucleotideBF_(nBF) same author
01:06:23 <CrazyM4n> I saw that, but it has a bunch of other random different letters, isn't parsed like how I suggested, and is generally kind of useless - all it can do is <>+- and .
01:06:49 <cluid> http://esolangs.org/wiki/DNA-Sharp
01:06:58 <cluid> this one uses ascii art of DNA strange
01:07:30 <cluid> http://esolangs.org/wiki/DNA
01:07:36 <CrazyM4n> It also has 4 letter codons ;~;
01:07:55 -!- dianne_ has joined.
01:09:17 -!- dianne has quit (Ping timeout: 272 seconds).
01:10:04 <CrazyM4n> Hmm
01:11:05 <CrazyM4n> I'm going to set up a google spreadsheet and start typing out commands
01:20:44 <CrazyM4n> Hmm, it exists
01:20:44 <CrazyM4n> http://esolangs.org/wiki/RNA
01:20:48 <CrazyM4n> But it's not done
01:22:15 -!- bb010g has quit (Quit: Connection closed for inactivity).
01:31:05 -!- AndoDaan has joined.
01:37:14 -!- mihow has joined.
01:38:47 -!- mihow has quit (Client Quit).
01:46:48 -!- Guest82803 has quit (Ping timeout: 245 seconds).
01:54:40 <CrazyM4n> Okay, I have 20 instructions and need to know what to do with them
01:54:50 <CrazyM4n> If amino acids were a language they'd be functional
01:54:57 <CrazyM4n> Therefore, this is gonna be a functional language :P
01:55:08 <CrazyM4n> Maybe it'll be APL-esq? I'd like to make that
01:55:12 <Jafet> You don't believe in hidden variable theory?
01:56:04 <CrazyM4n> I'm saying metaphorically
01:56:37 <CrazyM4n> AKA I'm using this as an excuse to try to write a functional language
01:56:47 <CrazyM4n> Because stack languages can get boring, you know
02:00:48 <AndoDaan> There was a DNA/amino accid language in Hofstadter's Godel, Escher, Bach.
02:02:10 <CrazyM4n> Well, while thinking of commands, I'm going to install windows on my newfound HDD
02:02:29 <diginet> are there any truly *completely* context-free languages?
02:02:59 <cluid> diginet, Can you define what you mean by that exactly?
02:03:01 <Jafet> Maybe fungot knows one.
02:03:01 <diginet> obviously, there are some variations, Perl being the prototypical example of a highly context-sensitive language
02:03:01 <fungot> Jafet: so you just subclass game and override fnord, while at the same time? if not, it was the ms messenger protocol... but i thought both would be pretty sweet as well :)
02:03:29 <diginet> CrazyM4n: I think DNA would do well as an encoding of binary lambda calculus
02:04:01 <CrazyM4n> diginet: I noticed that too, but I don't actually *know* binary lambda calculus (and it's been done many times)
02:04:02 <diginet> cluid: I mean, like. . .are there any languages which could be parsed with only EBNF I guess (informally speaking)
02:04:13 <CrazyM4n> I'd like to program in my language, tbh :)
02:04:24 <diginet> CrazyM4n: doesn't unlambda have four symbols?
02:04:41 <diginet> `SKI IIRC
02:04:57 <HackEgo> ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: SKI: not found
02:04:58 <tromp_> that's LazyK
02:05:02 <diginet> oh right
02:05:05 <CrazyM4n> I'm not using the 4 symbols
02:05:06 <diginet> well LazyK then
02:05:09 <tromp_> unlambda has a bunch more
02:05:13 <CrazyM4n> I'm parsing them down to the amino acids they represent
02:05:21 <diginet> CrazyM4n: hmm
02:05:21 <CrazyM4n> So I have 20 possible instructions
02:05:33 <diginet> CrazyM4n: yeah but there's more than 20 codons, right?
02:05:46 <CrazyM4n> On an unrelated note, my DVD drive stopped working on the only day I've needed it
02:06:01 <CrazyM4n> This is what I have so far: http://i.imgur.com/IuVFISF.png
02:06:10 <diginet> you could use each codon as a separate symbol. Thought I don't believe there are 4^3 different codons
02:06:17 <diginet> *though
02:06:18 <tromp_> BLC sort of has four symbols: LAM, APP, ZERO, SUCC
02:06:31 <CrazyM4n> There are 64 possible combinations, but only 20 distinct ones
02:06:42 <cluid> tromp_, why is it zero nd suc rather than binary?
02:07:09 <tromp_> to fit the distribution of variable indices likely to occur in practice
02:07:18 <diginet> wait hold on, I thought there were 20 amino acids
02:07:21 <tromp_> basically a huffman encoding
02:07:26 <elliott> use a universal code, clearly :)
02:07:29 <cluid> ah clever
02:07:33 <diginet> with some amino acids having multiple codons assigned to them
02:07:37 <tromp_> and to simplify parsing:)
02:07:37 <cluid> I read a cool fact today
02:07:38 <diginet> i.e. DNA is a degenerate code
02:07:46 <cluid> Base e is optimal if you are trying to minimize length of number * number of possible digits. A base with many different prime factors is optimal if you want to be able to write many kinds of numbers with the normal digit notation. Base 2 is optimal if you want to minimize the number of possible digits.
02:08:01 <diginet> cluid: so BLC in phinary?
02:08:03 <tromp_> also see http://esolangs.org/wiki/Real_Fast_Nora%27s_Hair_Salon_3:_Shear_Disaster_Download, which makes those 4 tokens explicit
02:08:04 <diginet> err
02:08:06 <diginet> Base E
02:08:13 <cluid> the de brjuin indices are unary
02:08:45 <elliott> base 47 is optimal because that's the biggest number I can imagine
02:08:48 <CrazyM4n> I still want this to be a usable language
02:08:51 <AndoDaan> https://archive.org/stream/GEBen_201404/GEBen_djvu.txt search for "Typogenetics
02:08:51 <AndoDaan> We are now about"
02:08:56 <CrazyM4n> So I'll make one of them define a function
02:09:15 <diginet> CrazyM4n: maybe a better option would be to define an ISA with 20 different instructions
02:09:21 <diginet> and then compile languages to that
02:09:26 <CrazyM4n> ISA?
02:09:37 <diginet> instruction set architecture
02:09:45 <diginet> e.g. x86, MIPS, ARM
02:09:49 <cluid> Can you make it more biological?
02:09:51 <cluid> it should act like real RNA
02:10:01 <CrazyM4n> I was doing that, diginet
02:10:01 <diginet> CrazyM4n: I actually like the idea a lot though
02:10:03 <cluid> emit acids which form proteins
02:10:06 <CrazyM4n> That's what I'm trying to think of
02:10:10 <cluid> and the protiens act together in some way
02:10:18 <CrazyM4n> cluid: Yeah, it actually synthesizes the acid chains in your CPU
02:10:18 <diginet> CrazyM4n: oh, I thought you said earlier you wanted something functional language-y
02:10:18 <cluid> it could be strochastic
02:10:38 <CrazyM4n> diginet: I do, but I don't know how far I'm going to be able to take it
02:10:58 <diginet> CrazyM4n: I feel like a concrete ISA and functional programming are orthogonal ideas
02:11:34 <diginet> CrazyM4n: are you trying to implement this in practice, or is this just an idea for a language particularly suited to encoding in DNA?
02:11:44 <CrazyM4n> You know, the more I think of it, the more I agree that amino acid chains would be more suited to an ISA
02:11:44 <diginet> like are you trying to physically compute with DNA
02:11:55 <CrazyM4n> If only I had the technology for that :P
02:12:05 <diginet> CrazyM4n: yeah, that was my thought, find 20 different basic instructions
02:12:09 <diginet> also a stack machine would be best
02:12:09 <CrazyM4n> I'm making it for fun, because I think that DNA is rather cool
02:12:22 <CrazyM4n> I really don't like the idea of a stack for this
02:12:45 <diginet> CrazyM4n: how are you going to encode registers then with only 20 different possible instructions, or is it going to be variable length?
02:12:48 <CrazyM4n> Maybe a pool and registers
02:13:09 <diginet> or will instructions be encoded in multiple codons?
02:13:16 <CrazyM4n> Well, each register could be referenced with a specific codon
02:13:34 <CrazyM4n> As in, lets say "UUU" is "access from register, just for sake of conversation
02:13:37 <CrazyM4n> "
02:13:38 <diginet> so are you going to use all 64 possible ones?
02:13:41 <CrazyM4n> No
02:13:53 <CrazyM4n> But, maybe I could make instructions take arguments
02:14:22 <diginet> I guess I misunderstood, I thought each three DNA base pairs were going to be atomic operations
02:14:29 <CrazyM4n> As in, "UUUGACGGA" would take a value from the register at GAC GGA
02:14:35 <CrazyM4n> You didn't misunderstand
02:14:50 <CrazyM4n> But I am just trying to figure out how I could actually make this usable without a stack
02:14:56 -!- AndoDaan has left ("Leave channel").
02:15:00 <diginet> . . .how can you possibly encode a register based ISA into 20 different ops?
02:15:04 <CrazyM4n> So I'm just throwing out ideas
02:15:11 <diginet> there's not a large enough coding space
02:15:22 -!- AndoDaan has joined.
02:15:29 <CrazyM4n> Hm
02:15:55 <diginet> you could use an accumulator architecture
02:16:06 <CrazyM4n> I could make instructions take arguments of other codons, but that would be really awkward to read and write
02:16:23 <diginet> so each instructions would be multiple codons long?
02:16:26 <diginet> that's what I was asking
02:16:48 <CrazyM4n> You know, maybe that is a good idea
02:17:04 <diginet> I tried to design an 8-bit RISC a few months ago. I wanted an 8-bit fixed length design. It was *incredibly* difficult to design anything useful
02:17:05 <CrazyM4n> So now we have 400 instructions to work with
02:17:11 <diginet> and that's with 256 to work with
02:17:13 <diginet> not 20
02:17:36 <cluid> where is the page that shows how to encode brainfuck into binary brainfuck?
02:17:42 <diginet> I ended up dumping the idea of fixed-length
02:18:00 <CrazyM4n> What about one codon that changes the operation of the next codon
02:18:26 <CrazyM4n> That could work, and it allows us 39 arguments
02:18:33 <AndoDaan> http://samuelhughes.com/boof/
02:18:50 <diginet> that's effectively a variable length encoding
02:18:54 <CrazyM4n> We could string together arbitrary amounts of those codons to get an infinite instruction space
02:19:00 <CrazyM4n> (instruction space?)
02:19:04 <diginet> sounds VAXy
02:19:06 <cluid> http://esolangs.org/wiki/Brainfuck_bitwidth_conversions this is kinda related
02:19:20 <cluid> thanks AndoDaan !
02:19:38 <AndoDaan> np :)
02:20:38 <HackEgo> [wiki] [[Brainfuck derivatives]] M http://esolangs.org/w/index.php?diff=41517&oldid=41510 * Cluid Zhasulelm * (+356) Slight improvements and added MIBBLLII
02:20:44 <diginet> BLC is the most elegant language of all time
02:20:48 <CrazyM4n> So how many registers could there be
02:20:51 <diginet> I'm not even kidding
02:20:57 <diginet> CrazyM4n: hold on
02:21:00 <diginet> let me think
02:21:02 <CrazyM4n> Well, actually, I got something
02:21:06 <CrazyM4n> Let me type this out
02:21:08 <CrazyM4n> Wait
02:21:10 <diginet> sure
02:22:35 <oerjan> <elliott> base 47 is optimal because that's the biggest number I can imagine <-- oh come on, even grothendieck new a prime bigger than that hth
02:22:52 <CrazyM4n> (I'm typing it in a spreadsheet
02:22:52 -!- boily has quit (Quit: MURIATIC CHICKEN).
02:22:54 <CrazyM4n> )
02:22:56 <elliott> oerjan: it was indeed a new prime -- nobody else had ever heard of it...
02:23:15 <elliott> diginet: no love for BCT?
02:23:33 <diginet> elliott: what's that?
02:23:42 <elliott> https://esolangs.org/wiki/Bitwise_Cyclic_Tag
02:23:49 <elliott> (has oerjan proved self-BCT TC yet :p)
02:25:40 <diginet> elliott: that sounds similar to an OISC/ZISC
02:27:05 <oerjan> *knew
02:27:32 <oerjan> elliott: no. as i said recently, it seems to be in an awkward class.
02:27:57 <elliott> oh it came up recently?
02:28:09 <elliott> it sort of seems conceptually similar to /// to me
02:28:17 <oerjan> maybe.
02:28:22 <elliott> you have program matching and program modification :p
02:28:32 <cluid> cyclic tag things are very weird
02:28:37 <oerjan> but nothing large-scale!
02:28:40 <cluid> i dont know how to understand them
02:28:46 <elliott> oerjan: yeah it is not easy
02:29:05 <elliott> but emulating a cyclic tag system or such seems not unthinkable?
02:29:13 <diginet> http://esolangs.org/wiki/BF_instruction_minimalization the three symbol version would be nice for a ternary machine
02:29:41 <elliott> (maybe interleaving its program and data string, or such)
02:29:48 <elliott> heck, even implementing BCT itself in it :P
02:30:05 <oerjan> you go right ahead
02:30:08 <CrazyM4n> diginet: How about something like http://i.imgur.com/AtfAch4.png ?
02:30:18 <elliott> diginet: most of those languages are very ad ho :/
02:30:18 <elliott> *hoc
02:30:28 <diginet> elliott: true
02:30:30 <diginet> CrazyM4n: hold on
02:30:38 <elliott> oerjan: good luck!
02:31:07 <diginet> CrazyM4n: I'm a little confused
02:31:18 <oerjan> elliott: i think you misread a pronoun hth
02:31:20 <CrazyM4n> Okay
02:31:30 <CrazyM4n> So pretty much what I'm trying to say
02:31:43 <diginet> are you saying that when a codon is prefaced by another it changes its function?
02:31:47 <CrazyM4n> is that "UUU" (phenylalanine) is a modifier of sorts
02:31:49 <oerjan> also i'm vaguely working at the mcculloch 2 machine, which came up in the same discussion
02:32:15 <CrazyM4n> So, let's say you ran "UUU UUU CUG"
02:32:29 <diginet> so basically when prefaced by UUU the op that a codon performs changes?
02:32:38 <CrazyM4n> The first UUU modifies the second one into meaning "Change the next Op to its get"
02:32:39 <CrazyM4n> yeah
02:32:43 <diginet> so it's basically a variable length code?
02:32:44 <cluid> good luck with mcculloch
02:32:58 <CrazyM4n> and then that UUU changes the CUG (leucine) into a get Op
02:33:04 <CrazyM4n> Which gets from register 1
02:33:05 <diginet> what's mcculloch?
02:33:17 <diginet> where are the arithmetic operations?
02:33:18 <oerjan> https://esolangs.org/wiki/McCulloch%27s_second_machine
02:33:41 <diginet> CrazyM4n: is this an 1-operand arch?
02:33:43 <diginet> *a
02:33:47 <CrazyM4n> Hm?
02:34:00 <CrazyM4n> Sorry, I'm not too well versed in computer jargon
02:34:02 <CrazyM4n> D:
02:34:08 <diginet> I mean is there an implied operand, like an accumulator?
02:34:25 <diginet> where is the data coming from that gets or sets the registers?
02:37:04 <elliott> oerjan: you deserve wolfram's money too for all your work :)
02:37:46 <CrazyM4n> diginet: That's what I'm still trying to figure out
02:37:54 <CrazyM4n> Maybe I should do it deadfish style
02:38:03 <CrazyM4n> Accumulator and square-er
02:38:09 <CrazyM4n> And subtractor
02:38:21 <diginet> CrazyM4n: I still think a stack machine would be vastly more suited to what you are trying to accomplish
02:38:41 <CrazyM4n> diginet: I completely agree, but stack machines are so boring :(
02:38:50 <diginet> CrazyM4n: not necessarily!
02:38:59 <diginet> their minimalism is intriguing
02:38:59 <CrazyM4n> I guess...
02:39:19 <CrazyM4n> We also have around 35 instructions to do
02:39:22 <CrazyM4n> Hm.
02:39:31 <diginet> if you want my advice
02:39:46 <diginet> I would do something like this, 20 registers, 20 instructions, with one accumulator
02:39:50 <diginet> each instruction is two codons wide
02:40:26 <diginet> all operations use the accumulator as an implied operand, and a then specify the register with the second
02:40:50 <cluid> how is switch/case done in brainfuck
02:40:57 <diginet> how many bits wide do you want th registers to be?
02:41:15 <CrazyM4n> That might be a good idea
02:41:21 <diginet> if you make everything a single bit, you could do some interesting things
02:41:48 <oerjan> elliott: OKAY
02:41:54 <CrazyM4n> I honestly want to keep each instruction one codon wide, the one thing I'm completely opposed to doing is changing the instruction length
02:42:08 <CrazyM4n> It is an esolang, after all. There's bound to be some challenges along the way.
02:42:19 <elliott> cluid: nested []s, basically
02:42:22 <diginet> CrazyM4n: well okay, I'll be honest, I don't think a register machine is possible with only 20 possible instructions
02:42:29 <cluid> damn
02:42:39 <elliott> I think there was an article on the wiki about how to do BF switches
02:42:42 <diginet> I don't see how you could possible encode that much data
02:42:49 <CrazyM4n> 80 instructions including the modifier instruction
02:42:52 <diginet> if you wanted to use all 64 possible codons, it *might* be
02:42:58 <cluid> http://lpaste.net/116837
02:42:59 <CrazyM4n> 20 registers
02:43:07 <CrazyM4n> How many registers do I really *need*?
02:43:12 <cluid> do you think this is right to visit every node (of the left tree at least) in Treehugger
02:43:15 <diginet> no no you're missing the point
02:43:19 <CrazyM4n> Okay
02:43:28 <diginet> you want each instruction to one codon wide, right?
02:43:44 <CrazyM4n> Yeah, but remember, I have that one modifier codon which allows for a whole nother set of instructions
02:43:51 <diginet> then it's not one codon wide
02:43:58 <diginet> as I said earlier, that's a variable length code
02:44:11 <CrazyM4n> Okay, that's fine I guess
02:44:33 <diginet> if you're fine with a variable length code I don't see how what I'm suggesting is different
02:44:40 <diginet> it just happens to be fixed-length
02:44:43 <diginet> but hey, your project
02:44:45 <CrazyM4n> I'd rather have it be variable length than an explicit codon length greater than one
02:44:52 <diginet> fair enough
02:44:56 <cluid> http://en.wikipedia.org/wiki/Structured_program_theorem that's interesting
02:44:59 <CrazyM4n> Well, I thought it'd be interesting to do. That's the reason why.
02:45:03 <diginet> yeah
02:45:20 <diginet> CrazyM4n: okay so with one modifier codon, that means you have 38 possible instructions
02:45:45 <diginet> well, 39 I guess
02:45:51 <CrazyM4n> Minus two for methionine, minus one for the stop codon's first function
02:46:33 <diginet> what do you need a "begin script" codon?
02:46:49 <CrazyM4n> This is RNA, remember
02:46:55 <CrazyM4n> AUG begins a strand of RNA
02:46:58 <diginet> oh right
02:47:47 <cluid> wher is the article about bf switches?
02:48:03 <cluid> I did come up with a way in a bf program I wrote before but it wasnt good
02:49:03 <cluid> I needed an extra cell
02:49:16 <cluid> i dont have hthat luxury here..
02:51:02 <cluid> It is very very difficult to write a program that visits every node in treehugger
02:51:13 <cluid> maybe noteven possible, what do you think?
02:52:32 <diginet> okay fair enough, that means we have let's see. . .37 possible ops
02:52:32 <diginet> so are you going to use an additional codon to specify the register?
02:52:33 <diginet> hmm ooh, idea, you could use a pointer register, similar to the RCA 1802 to specify the operands
02:52:35 <diginet> "INC P1" and "INC P2" and let's just say the pointer registers overflow so we don't need to waste an operand for DEC of both
02:52:38 <diginet> oops disconnected for a second
02:52:39 <diginet> what did you last get?
02:52:41 <diginet> CrazyM4n: what ALU ops do you want?
02:53:03 <diginet> ooooohhhh better idea
02:53:24 <diginet> have a circular register wing with a two-register window, with a instruction to shift the window by one register
02:53:38 <Sgeo> `olist 970
02:53:39 <HackEgo> olist 970: shachaf oerjan Sgeo FireFly boily nortti
02:53:41 <elliott> cluid: it must be possible I think
02:54:03 <elliott> you do have as much storage as you want below your current location that you can haul around
02:54:09 <elliott> that's just really awkward
02:54:27 <cluid> ive had a very different idea than thie 'recursive' approach
02:54:28 <elliott> oh you even specified Integer cells right
02:54:37 <cluid> yes i want to make this easy as possible
02:55:17 <oerjan> cluid: i think line 7 of your paste should be at x we change it to a (<-) then go ^
02:55:29 <cluid> thanks
02:55:33 <shachaf> Sgeo: is that thog?
02:55:38 <oerjan> but i also think it may be hard to do that with brainfuck looping
02:55:42 <CrazyM4n> diginet: Sorry, was in the bathroom
02:55:46 <shachaf> it's been so long that i've forgotten what last happened to thog hth
02:55:54 <Sgeo> shachaf: there's speculation, but a lot of people don't think so because why would he glare at Haley+Elan?
02:55:54 <diginet> CrazyM4n: np
02:55:55 <CrazyM4n> I got all the messages
02:55:59 <diginet> CrazyM4n: great
02:56:13 <diginet> CrazyM4n: I think the window idea is the most plausible
02:56:15 <CrazyM4n> Well, I will worry about the ALU next, right now I'm just adding basic accumulator manipulation
02:56:16 <elliott> cluid: maybe you can use bijective base 2 for the paths or something
02:56:18 <Sgeo> shachaf: I think he was buried under rubble after Roy tricked Thog into knocking down columns
02:56:27 <cluid> elliott, that was my new idea!
02:56:28 <oerjan> cluid: to make it work properly with brainfuck looping, i think you need to have some close-by cells that you know are 0
02:56:29 <CrazyM4n> And adding ops to move things around
02:56:34 <elliott> cluid: ehe
02:56:43 <diginet> CrazyM4n: yeah but we have limited opcodes, you need to plan out what you are going to allocate them to
02:56:46 <elliott> cluid: basically just store "next path to visit" at the current position
02:56:59 <diginet> CrazyM4n: I think the window idea is the most plausible, you won't even need to specify registers
02:57:03 <cluid> oerjan, that's an issue though because you have to visit every cell, that made me worry maybe this isnt possible
02:57:08 <elliott> I suppose it should be a path from the current position
02:57:12 <Sgeo> shachaf: Also, Prismata kickstarter seems to be picking up
02:57:13 <elliott> and then it's a simple matter of annoying calculations to split that into (next step, path from next step)
02:57:26 <elliott> then you take that step, copying the resulting path with you, and loop
02:57:31 <CrazyM4n> diginet: I don't quite get what you mean by that, though
02:57:38 <elliott> actually it would be bijective base 3.
02:57:42 <elliott> since you can go up as well
02:57:46 <diginet> CrazyM4n: let me try to draw a diagram
02:57:50 <CrazyM4n> Okay.
02:57:53 <cluid> elliott, I think the program would be in two parts: One following the path (pushing outwards), and another pulling everything back in before finally incrementing the path.. and repeat
02:57:53 <diginet> elliott: bijective bases are interesting
02:58:31 <diginet> elliott: I was working with a bijective base 23 based on the tradt'l latin alphabet (i.e. no J W or U)
02:58:39 <diginet> to convert latin words to numbers
02:59:04 <elliott> cluid: maybe I should draw out the state as I see it
02:59:11 <elliott> is there anything nice I can use to draw a tree
02:59:18 <elliott> or do I have to manually space it out myself and not leave enough room in my text editor
02:59:28 <cluid> i drew a tree earler in gimp, if i hadn't close it you could have it
02:59:40 <elliott> I was thinking something that would let me add text labels and stuf
02:59:41 <elliott> f
02:59:46 <CrazyM4n> http://i.imgur.com/CzY4c6D.png This is what I have so far
02:59:51 <cluid> inkscape is probably best
03:00:01 <MDude> Dia?
03:00:06 <elliott> doesn't dia have ascii syntax
03:00:08 <elliott> kind of defeats the point
03:00:20 <elliott> whatever I'll just use a text file and draw the tree on its side
03:00:32 <MDude> It uses a gui.
03:01:25 <elliott> oh
03:01:26 <elliott> then maybe
03:01:45 <MDude> Graphiz is what hqas a scripting basef system.
03:01:49 <MDude> *has
03:02:37 <elliott> cluid: ah, now that I actually read your paste I see that it's quite elegant
03:02:43 <elliott> is the problem that it's hard to implement, or that it doesn't cover the whole tree?
03:03:05 <MDude> I have a cat on one hand, it's not great for my typing.
03:03:07 <cluid> the problem with that is that I cannot really do the switch/case, since I don't have free memory cells around
03:03:11 <elliott> cluid: one problem is that [^] will fail
03:03:17 <elliott> because the top of the tree will be non-0 at some point
03:03:19 <elliott> so you'll die
03:03:25 <elliott> sure you have free memory cells around
03:03:28 <elliott> they're to your < and >
03:03:28 <elliott> oh
03:03:32 <elliott> but not if you're revisiting
03:03:36 <oerjan> elliott: you don't need to do [^] ever
03:03:42 <elliott> oerjan: cluid's paste has it, but yeah
03:03:58 <oerjan> oh hm it does
03:04:01 <elliott> cluid: okay well the requirement is only to touch every cell right
03:04:02 <oerjan> i read that as ^
03:04:04 <elliott> cluid: then let's cheat
03:04:20 <oerjan> cluid: my correction of line 7 was assuming line 1 was ^ not [^]
03:04:23 <elliott> cluid: go two layers at a time, touching the other children
03:04:29 <oerjan> also you need a special value at the root
03:04:32 <elliott> then you have scrap cells free everywhere
03:04:37 <elliott> if you get what I mean
03:04:45 <elliott> instead of trying to pack the directions, go by twos, so you have free space
03:05:46 <elliott> basically instead of covering the tree with path symbols you cover it with path symbols + adjacent scratch space
03:09:50 <oerjan> if you do 3 layers at a time, i think you have enough room to use just bit values...
03:10:04 <cluid> too crazy!
03:10:13 <elliott> it'd be easier
03:10:40 -!- yonkie has joined.
03:11:18 <diginet> CrazyM4n: still working on the picture hold tight
03:11:31 <CrazyM4n> Okay, I'm working on the ALU functions
03:11:55 <CrazyM4n> I think we have enough instruction space just here in order to define a whole language
03:16:23 <cluid> [-<[-]+<+^^]<<[-^^+<<]^^
03:16:42 <cluid> here's code to leave a cell intact using << as tmp, putting 0 or 1 in < depending on whether this cell is 0
03:18:02 <diginet> CrazyM4n: http://i.imgur.com/PAZFRvP.png
03:18:14 <diginet> the red is the implied first operand, the green is the implied second
03:18:33 <diginet> you would shift the window, then "0" would become red, and "1" would become green
03:18:35 <diginet> make sense?
03:18:52 <CrazyM4n> Yes
03:19:14 <CrazyM4n> Hm, maybe
03:20:55 <CrazyM4n> I've been writing more of the spec also
03:20:56 <CrazyM4n> http://i.imgur.com/vcWHr7u.png
03:21:31 -!- cluid has left ("Leaving").
03:21:34 -!- cluid has joined.
03:21:52 <cluid> i cant work out how to go from having n to having < with ceil n/2 and > with floor n/2
03:22:04 <CrazyM4n> I don't know how practical the window idea is going to be
03:23:02 <CrazyM4n> diginet: So far, most of this is rather self explanatory. I'm just not sure how intuitive the windows will be.
03:23:32 <cluid> http://spth.virii.lu/main.htm
03:26:15 -!- yonkie has left.
03:27:48 -!- atslash has joined.
03:29:06 <oerjan> cluid: if you can ensure n is even, then it is easy
03:29:31 <elliott> do you need arithmetic like that if you have as many scratch cells as you want?
03:29:31 <cluid> ill make n even, and put that bit in the riht placebeforehand
03:30:14 <oerjan> also if n is a power of 2, you can just store the exponent
03:31:12 <elliott> I guess there's two approaches
03:31:19 <oerjan> at least!
03:31:21 <elliott> one, store the path spread across the tree with scratch cells
03:31:34 <elliott> two, store the path all in one cell, so that it's okay to scribble over used cells when processing it
03:31:40 <elliott> (because the only state you care about is in the current cell)
03:31:49 <elliott> the former seems easier to me
03:32:05 <elliott> since it is just a simple branch, flip, move sequence at each stop
03:32:50 <cluid> this is so hard to program in omg
03:35:17 <elliott> so is bf :P
03:35:54 <elliott> I do think oerjan's idea of just using bits for state is ideal
03:36:09 <elliott> that way you could completely eliminate anything but branching and flipping and moving
03:36:24 <tromp> did someone have a question for me?
03:38:30 <elliott> I don't think so
03:41:43 <cluid> I made an 'evenness' detector, but it is extremely long
03:42:10 <cluid> 47 chars
03:42:25 <cluid> this can be done much better
03:42:30 <cluid> im sure
03:42:47 <CrazyM4n> Okay, can someone help here
03:42:59 <CrazyM4n> I think that this is turing-complete: http://i.imgur.com/Lf24Tnh.png
03:43:05 <CrazyM4n> But I'm not sure
03:44:50 -!- FireFly has quit (Ping timeout: 244 seconds).
03:46:48 <cluid> CrazyM4n, yes looks TC
03:47:16 -!- FireFly has joined.
03:48:30 <CrazyM4n> cluid: Success!
03:48:44 <CrazyM4n> Now to write an interpreter
03:50:59 -!- bb010g has joined.
03:51:43 -!- cluid has quit (Remote host closed the connection).
04:04:08 -!- CrazyM4n has quit (Quit: ("sleep for finals")).
04:08:43 -!- GeekDude has quit (Ping timeout: 255 seconds).
04:10:56 -!- MDude has changed nick to MDream.
04:14:01 -!- Sprocklem has joined.
04:14:04 <J_Arcane> Hah hah. My Collatz search is still running this morning.
04:14:42 <glguy> What's it searching for?
04:15:23 <J_Arcane> Euler #14; longest sequence for a seed under a million. Think I need a more efficient program.
04:17:47 <glguy> Are you doing it in a normal language or in something like BF?
04:18:09 <J_Arcane> I'm doing it in Heresy, which is my own language built on-top of Racket.
04:33:01 -!- drdanmaku has quit (Quit: Connection closed for inactivity).
05:15:50 -!- hjulle_ has joined.
05:15:51 -!- hjulle has quit (Read error: Connection reset by peer).
05:26:06 <Sgeo> `slist
05:26:07 <HackEgo> slist: Taneb atriq Ngevd Fiora Sgeo ThatOtherPerson alot
05:26:28 <Sgeo> J_Arcane: is Heresy a real Racket language, or just interpreted ala Arc?
05:28:30 <J_Arcane> Sgeo: Basically a big pile of macros.
05:29:00 <J_Arcane> so the former, i think? it's implemented to use #lang s-exp
05:30:23 -!- hjulle_ has quit (Ping timeout: 264 seconds).
05:31:38 <Sgeo> I'd say that counts
05:32:02 <Sgeo> I just think straightforward interpretation is boring
06:02:57 -!- atslash has quit (Remote host closed the connection).
06:07:36 <oren> I'm going to make a scrip7 compiler in scrip7.
06:32:22 -!- AndoDaan_ has joined.
06:35:22 -!- AndoDaan has quit (Ping timeout: 258 seconds).
06:49:41 -!- J_Phone has joined.
06:50:20 -!- J_Phone has quit (Read error: Connection reset by peer).
06:53:16 -!- oerjan has quit (Quit: leaving).
06:55:48 -!- J_Phone has joined.
06:56:06 <J_Phone> Moi.
07:01:05 -!- J_Phone has quit (Read error: Connection reset by peer).
07:07:11 -!- Sprocklem has quit (Ping timeout: 258 seconds).
07:23:52 <fizzie> "Subject: magic rod factory supplying from China"
07:24:13 <fizzie> "We mainly produces PET woven nylon hair thick stick, ever-changing magic rod, a whirlwind speed, snail, TV curlers, automatic curl bar, HDMI cable network weaving, snakeskin nets, mesh casing, scalable network management, tin plated copper woven nets, shielding line, all kinds of wire and wire processing woven cotton and so on."
07:24:39 <oren> fizzie: that makes perfect sense
07:24:55 <fizzie> The "ever-changing magic rod" makes perfect sense? Well, I guess.
07:25:58 <oren> it probably means a continuously casted plastic
07:26:38 -!- Patashu has joined.
07:27:39 <oren> fizzie: they make nylon line by continuous extrusion
07:28:26 <oren> so i think this is a factory that does the copper wire and the plastic cover in one continuous process
07:29:07 <b_jonas> fizzie: I read that as “snake's oil and tin plated copper woven hairnets that shield your brain from mind control satellites as much as tinfoil hats”
07:30:51 <fizzie> I'm just wondering about the "whirlwind speed", which (based on the commas) seems to be an item in its own right, unless the following comma is misplaced, and it's a whirlwind speed snail.
07:31:13 <oren> oh! maybe the magic rod menas the one from Hitachi?
07:31:40 <oren> that would make whirlwind speed make some sense
07:32:21 <fizzie> "The product is as seen on TV", if that helps.
07:32:50 <oren> fizzie: so yeah definitely hitachi.
07:46:29 -!- MoALTz_ has quit (Quit: Leaving).
07:49:24 <zzo38> I thought more about and figure out things about how Aberration Hater Card Game can be working. The card can consist of (name,tags,actcost,rescost,type,hitpoints,move,text). An expansion set consists of multisets of card IDs for each rarity. Rarities should be assigned based on what makes a draft more interesting.
07:51:35 <zzo38> Is it OK so far do you think so?
07:51:39 <oren> That sounds really cool, zzo38.
07:52:13 <zzo38> I am not sure quite yet the pack distributions. However, note that Limited format is the main format so it would be designed around that mainly.
08:02:34 <zzo38> Cards can be played in front or in back and if you have any cards in front then only those cards can attack, defend, and be attacked (regardless of their type; even attachments can be attacked). The card can cost action points and/or resource points to play them. Cards can be switched front/back by their move cost in action points (unless it is either immovable or has an infinite move cost).
08:03:29 <Sgeo> shachaf: Prismata is ~2k away from getting funded
08:16:47 -!- mitchs has quit (Ping timeout: 272 seconds).
08:24:09 <shachaf> It will surely make it.
08:24:32 <zzo38> I made idea for Magic: the Gathering cards one is "All permanents gain cumulative upkeep {0}."
08:25:27 <shachaf> zzo38: Is the idea that if you forget to do the thing you sacrifice it?
08:25:42 <shachaf> It seems like a big hassle, putting age counters on every permanent.
08:25:49 <zzo38> shachaf: Well, one idea is that if you don't want that card anymore you can sacrifice it during your upkeep.
08:25:51 <shachaf> Oh, maybe you mean that it interacts with other cumulative upkeep things.
08:26:00 <shachaf> Because age counters are age counters.
08:26:10 <zzo38> The other idea is it causes extra counters on other cards that already have cumulative upkeep.
08:26:11 <shachaf> Oh, that also works.
08:28:16 -!- mitchs has joined.
08:29:33 <oren> #define brase break;case
08:30:53 <oren> #define brefault break;default
08:31:09 <lifthrasiir> #define break return
08:32:01 <oren> #define tldr }
08:32:20 <zzo38> Are those the kind of macros you like to define in a C program?
08:32:53 <oren> zzo38: pretty much. my favorite is #define loop for(;;)
08:33:25 <shachaf> `quote 181
08:33:26 <HackEgo> 181) <zzo38> Invent the game called "Sandwich - The Card Game" and "Professional Octopus of the World" (these names are just generated by randomly)
08:33:36 <shachaf> zzo38: I'd like to learn more about those games.
08:33:46 <zzo38> Other ideas related to Magic: the Gathering cards, including cards creating non-creature tokens, as well as "Target spell gains Epic" and one card "Epic Fail" which does nothing except it has Epic.
08:34:07 <zzo38> shachaf: They don't exist as far as I know; if they do, ask someone else please.
08:34:08 <shachaf> There are already cards creating non-creature tokens.
08:34:32 <shachaf> zzo38: What is the point of Epic Fail?
08:34:57 <zzo38> Nothing...it is just full of the epic failure...
08:36:00 <oren> idea: cards which are typeless.
08:36:08 <zzo38> Yes I thought that too
08:37:13 <zzo38> Is there a card which exiles all indestructible permanents?
08:37:39 <shachaf> And no other ones?
08:37:43 <zzo38> Yes
08:37:57 <shachaf> I don't think so.
08:38:30 <shachaf> But searching Google for that phrase finds IRC logs of this channel.
08:38:49 <shachaf> oh boy i was such a jerk
08:43:57 <zzo38> Some of the existing rules I find klugy and I don't like much, one is including the rule for card types and I would like to perhaps change it to: Any card can be played onto the stack during your main phase if the stack is empty by paying its mana cost (you can't if it doesn't have a mana cost); all instants have Flash; lands can be played directly into play during your main phase if stack is empty by costing a land drop ...
08:44:34 <b_jonas> oh dear, M:tG rules discussions
08:44:39 <b_jonas> I'll have to read this later
08:44:42 <shachaf> What would the changes be compared to the current rules?
08:44:49 <zzo38> ... if instants and sorceries would be put into play from anywhere it remains where it is; if something resolves and then remains on the stack it is discarded instead.
08:45:39 <shachaf> I'm not sure about that last pair of rules.
08:46:01 <zzo38> So, under these rules it would mean, if a land actually has a mana cost then you can either play it as a land, or play it as not a land onto the stack by paying its mana cost.
08:46:10 <b_jonas> lol "Epic Fail"
08:46:22 <zzo38> (And while it is on the stack it can be countered and that stuff too)
08:46:52 <shachaf> Are there any lands with mana costs?
08:47:08 <b_jonas> zzo38: whoa... I'd prefer if you always played lands like now, you just had to play their mana cost if they have one,
08:47:14 <zzo38> shachaf: Not as far as I know.
08:47:30 <shachaf> Using the existing rules you could just give a land an ability that functions in your hand: "{3}: Put this card from your hand onto the battlefield".
08:47:32 <b_jonas> in which case we could have a Spire with a mana cost of {1}
08:47:51 <zzo38> b_jonas: Maybe, but I still think the way I mentioned is more sensible, to me at least
08:47:53 <shachaf> Or maybe you mean that it wouldn't use the stack, which would be slightly more difficult to make work, I guess.
08:48:04 <b_jonas> zzo38: dunno
08:48:58 <b_jonas> zzo38: would that make lands that are sort of like the Borderposts?
08:49:07 <b_jonas> only not quite
08:49:17 <b_jonas> mind you, we still have cycling and morph lands
08:49:51 <zzo38> Also these rules I specified would make it so that a typeless card acts mostly like a global enchantment card.
09:03:45 <b_jonas> zzo38: actually, I was thinking about what you said
09:04:09 <b_jonas> and being able too cast lands with mana costs like a normal spell would indeed make sense
09:04:21 <b_jonas> though it has some slight implications:
09:04:58 <b_jonas> like you could then probably cast lands as spells (without land drop, even in an opponent's turn) using effects that make you cast a card without paying its mana cost
09:05:26 <b_jonas> zzo38: a typeless card already acts much like a global enchantment card, it's just that I think a typeless card can currently only exist on the battlefield
09:05:30 <zzo38> Yes, assuming that the card worked with lands otherwise
09:05:44 <zzo38> (If it doesn't say card types, it would indeed work with lands.)
09:05:48 <b_jonas> zzo38: yep.
09:05:58 <b_jonas> those cards currently say "play that card without paying its mana cost"
09:06:28 <b_jonas> an example is the hdieaway lands
09:07:03 <b_jonas> hideaway lands
09:08:03 <b_jonas> I don't think this is very abusable though
09:08:43 <b_jonas> occasionally casting a land on the opponent's turn that way doesn't seem an effect that can break much
09:10:04 <b_jonas> hmm wait
09:10:11 <b_jonas> no
09:10:23 <zzo38> I would change a lot of other rules too
09:10:38 <b_jonas> right, it wouldn't come up much anyway, because most lands don't have mana costs
09:10:59 <zzo38> Some of these changes would suggest that other cards should be changed
09:11:43 <b_jonas> what does "all instants have flash" change?
09:11:46 <zzo38> Rules for damaging Planeswalkers are too klugy. I also don't like the rule that makes auras and equipments that are also creatures to become not attached; I would remove those rules.
09:12:13 <zzo38> b_jonas: It would be an alternative to the normal rule. I don't know exactly what it would change.
09:12:22 <b_jonas> zzo38: such auras die anyway, it only matter for equipments
09:12:40 <b_jonas> and for equipments, I think it's better if they remain in play unattached so you can have animated swords
09:12:43 <b_jonas> and animated hammers
09:12:53 <zzo38> b_jonas: Yes I know, but I would delete those rule anyways so it is still allowed to be aura and equipment being attached.
09:14:05 <b_jonas> as for changing rules, some people have suggested changing the combat damage order rules so you can assign non-fatal damage to any number of creatures later in the order than all creatures to which you assign fatal damage
09:14:47 <b_jonas> of course that's less important now that we have a rule that damage from creatures with deathtouch counts as fatal, but it would still be nicer for combat tricks
09:14:51 <zzo38> Other rules I would change a lot too
09:16:24 <b_jonas> and did I mention I still don't understand why Spreading Seas was printed without a remainder text? I hate how they did that
09:16:35 <b_jonas> They should have known after Sea's Claim
09:16:50 <b_jonas> and this is despite that I like the flavour text of these cards
09:17:21 <b_jonas> but my rules and cards knowledge is very stale right nwo
09:17:37 <b_jonas> I don't follow M:tG much these days
09:19:11 <zzo38> I would also get rid of the rule causing tokens to cease to exist in not play zones and replace it with another one causing objects to cease to exist if they would be reset to their initial state but don't have one and then make tokens don't have any initial state and moving between zones resets an object.
09:19:44 <zzo38> Therefore, copies of spells or anything even placed on the stack also are tokens, so if a creature spell is copied the copy is also a token, and remains a token when it comes into play.
09:20:37 <shachaf> b_jonas: How can a typeless card exist on the battlefield?
09:27:36 <zzo38> I saw it once how but now I forgot.
09:33:33 <zzo38> I would also make loss of game due to inability to draw a card to become immediate instead of state-based. Therefore you can lose all life and still win if the same effect that caused it also causes your opponent to draw more cards than they have before state-based-effects are checked.
09:34:04 <shachaf> That seem pretty ad-hoc.
09:34:33 <zzo38> And also I will reintroduce mana burn for strategic purposes.
09:36:06 <coppro> shachaf: neurok transmuter and march of the machines
09:37:14 <coppro> and already, typeless permanents are a lot like global enchantments, just without the enchantment bit
09:37:37 <b_jonas> shachaf: yes, what coppro says
09:37:59 <shachaf> OK.
09:38:09 <coppro> If they were revising the rules from the get-go, they would quite possibly make Instant a supertype
09:38:29 <shachaf> I think a typeless permanent is slightly different from a typeless card. And I guess cards aren't on the battlefield at all, only permanents represented by cards, or something like that.
09:38:33 <shachaf> I don't remember.
09:38:35 <b_jonas> coppro: I don't think so. Instant is fine as a type.
09:38:59 <zzo38> Everyone argue differently about how the rules ought to be changed into.
09:38:59 <coppro> b_jonas: it could become "instant sorcery"
09:39:10 <b_jonas> coppro: yes, it could, but I don't think it would be a good idea
09:39:15 <shachaf> They're talked about the Instant Sorcery thing in various places before.
09:39:28 <coppro> b_jonas: in any event, it doesn't make sense to have two ways to accomplish the exact same thing
09:40:13 <coppro> typeless cards aren't possible
09:40:15 <b_jonas> coppro: there are more Instants than Sorceries printed. you'd have that ugly typeline on lots of cards unnecessarily. Instants are such a common case that they're worth a rule.
09:40:39 <b_jonas> It's like how all portal cards have "Summon Creature" printed on them. It's ugly.
09:41:04 <b_jonas> Mind you, you could argue that they changed from "Enchant Creature" to "Enchantment - Aura" with an ability
09:41:16 <coppro> yes
09:41:29 <b_jonas> and there are lots of Auras too
09:41:32 <coppro> you may notice that Magic cares about form, but only after function. Function is first.
09:41:44 <coppro> and the care with which the modern function is designed means that sometimes it gets in the way of form
09:41:54 <b_jonas> However, there are some auras with crazy restrictions
09:41:59 <shachaf> backwards compatibility > function > form hth
09:42:08 <b_jonas> like coral net
09:42:16 <coppro> animate dead?
09:42:18 <b_jonas> mind you, that's just printed as "Enchant Creature" on the card
09:42:46 <b_jonas> uh... no, Animate Dead is a separate category
09:44:20 <b_jonas> sure, function and form, but I don't see anything wrong with the function of instants
09:45:25 -!- PinealGlandOptic has joined.
09:45:57 <b_jonas> hmm, wasn't there one card that specifically cared about... something about "instant or card with flash", searching them or cast trigger or something
09:46:36 <zzo38> If the rule was the one I wanted to change it to, then "card with flash" would include instants.
09:47:09 <b_jonas> zzo38: I don't think that's worth: it affects only one card, possibly zero because I might have just dreamt this
09:47:17 <b_jonas> so it would need remainder text on that one card
09:47:29 <b_jonas> it's better to just write "instant or card with flash" in that one case
09:47:36 <b_jonas> does that card exist? or was I just dreaming?
09:47:38 <b_jonas> I can't find it
09:47:40 <zzo38> That isn't the reason I wanted that rule though
09:48:00 <b_jonas> ah, found it
09:48:04 <b_jonas> Mystical Teachings
09:48:31 <b_jonas> and it searches
09:48:36 -!- PinealGlandOptic has quit (Client Quit).
09:48:49 <b_jonas> (guess which set it is in)
09:49:02 -!- PinealGlandOptic has joined.
09:50:04 -!- PinealGlandOptic has quit (Client Quit).
09:50:26 -!- PinealGlandOptic has joined.
10:20:37 <oren> `relcome PinealGlandOptic
10:21:00 <HackEgo> PinealGlandOptic: Welcome to the international hub for esoteric programming language design and deployment! For more information, check out our wiki: <http://esolangs.org/>. (For the other kind of esoterica, try #esoteric on irc.dal.net.)
10:30:23 -!- AndoDaan_ has quit (Ping timeout: 250 seconds).
10:32:25 -!- AndoDaan has joined.
11:21:02 -!- boily has joined.
11:43:05 <oren> My GTK theme is done!
11:43:51 <oren> It's neat how the theming is done with CSS for gtk3
11:52:46 <mroman> data Tuple :: (*,*) -> * where Tuple :: a -> b -> Tuple '(a,b)
11:52:53 <mroman> how do you match against that in patterns?
11:53:06 <mroman> let foo (Tuple a b) = (a,b)
11:53:09 <mroman> doesn't work
11:59:07 <boily> you can have 'where' clauses in data declarations?
12:01:15 <mroman> yes
12:20:29 -!- boily has quit (Quit: TELLURIC CHICKEN).
12:23:56 <oren> http://snag.gy/BqAlC.jpg <-- how does this red and white color scheme look?
12:29:27 <AndoDaan> I'd not vouce for my sense of estetics, but it looks clear, and cool, to me.
12:30:22 -!- Patashu has quit (Ping timeout: 264 seconds).
12:30:24 <oren> I can;t get a picture of it for some reason, but the buttons and menu options turn red when they are moused over.
12:32:47 <oren> I like red. There is too much blue on computers.
12:38:12 <HackEgo> [wiki] [[Grasp]] http://esolangs.org/w/index.php?diff=41518&oldid=39081 * 210.9.139.234 * (+189) /* External resources */
12:44:07 -!- J_Arcane has quit (Read error: Connection reset by peer).
12:44:56 -!- J_Arcane has joined.
12:47:34 -!- relrod has quit (Ping timeout: 255 seconds).
12:47:45 -!- quintopia has quit (Ping timeout: 265 seconds).
12:48:40 -!- quintopia has joined.
12:48:45 -!- relrod_ has joined.
12:50:06 -!- AndoDaan_ has joined.
12:54:06 -!- AndoDaan has quit (Ping timeout: 256 seconds).
13:25:47 <b_jonas> oren: a monospace font? nice
13:36:28 <oren> b_jonas: yes but that setting isn't part of the theme. I'm now trying to make the theme consistent for gtk2 and gtk3
13:40:30 <oren> Ideally there should be a way to convert the two programmatically, but we do not live in that world
13:59:14 -!- copumpkin has quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…).
14:43:22 <b_jonas> zzo38: as for changing the rules so that copies of spells count as tokens, I was trying to imagine how very broken Doubling Season would be if it doubled copies of spells. it wouldn't, of course, because its rules text explicitly mentions only tokens put into play, but still.
14:43:41 <b_jonas> It would be very broken, because it would double the already crazy storm and isochron scepter effects.
14:47:46 -!- shikhin has joined.
14:47:50 -!- shikhin has quit (Changing host).
14:47:50 -!- shikhin has joined.
14:59:12 <J_Arcane> http://pasterack.org/pastes/24833
15:16:09 -!- `^_^v has joined.
15:26:25 <mroman> @tell boily You might want to have a look at GADTs
15:26:25 <lambdabot> Consider it noted.
15:26:52 <mroman> @tell boily https://downloads.haskell.org/~ghc/6.6/docs/html/users_guide/gadt.html
15:26:52 <lambdabot> Consider it noted.
15:29:24 -!- S1 has joined.
15:30:28 <b_jonas> fungot, do you sometimes find irc very annoying, given that you're forced to sit on this channel and have to listen?
15:30:29 <fungot> b_jonas: let me find it), scsh aligns the cwd that the os thinks the process is actually stored. when we were evaluating the expression a little.
15:30:45 <b_jonas> oh
15:31:32 -!- MDream has changed nick to MDude.
15:31:41 <b_jonas> fungot: oh, but what if I call unshare(CLONE_FS) in the thread?
15:31:42 <fungot> b_jonas: i would like to get past this error. i corrected it. the problem rather seems to be helping with mz.
15:52:13 -!- ais523 has joined.
15:54:09 -!- Sprocklem has joined.
16:02:49 -!- PinealGlandOptic has quit (Ping timeout: 256 seconds).
16:05:21 -!- GeekDude has joined.
16:09:13 -!- hjulle has joined.
16:12:49 -!- drdanmaku has joined.
16:15:46 -!- spiette has joined.
16:19:57 -!- GeekDude has quit (Ping timeout: 258 seconds).
16:27:13 <FireFly> That's good to hear, fungot
16:27:13 <fungot> FireFly: cool widgets crammed contiguously in the newspace one in the parrot distribution, but that only applies to channels that only accept bald
16:28:48 <Melvar> So, how should I time a certain section of process in a C program these days?
16:29:50 <b_jonas> fungot: how should Melvar time a certain section of process in a C program these days?
16:29:50 <fungot> b_jonas: you can? :) htmlprag?
16:30:14 <b_jonas> fungot: with a pointer to const void?
16:30:14 <fungot> b_jonas: s/ to/ too/ ei fnord
16:37:16 <Jafet> Your pointers need to be less const void.
16:37:37 <oren> Uhh... use gprof
16:41:38 <oren> unless you mean doing it in C code. then you can use microtime or nanotime
16:42:38 <Melvar> I was thinking either times or getrusage.
16:44:26 <Gregor> b_jonas: I don't think I can recommend unsharing in a thread.
16:44:38 <Gregor> That's what forks are for(k).
16:46:48 <oren> Melvar: hmm, well those are essentially the same, they just have different extra fields
16:47:49 <oren> you're choosing between tms.tms_utime+tms.tms_stime and ru.ru_utime+ru.ru_stime
16:48:17 <Melvar> oren: Except that times gives me clockticks, and getrusage gives me seconds+microseconds.
16:49:02 <oren> do you care about exact units or about comparison between runs?
16:49:24 <oren> if it is about compariosn then clockticks is fine right?
16:49:30 <Melvar> I want to plot the results and would prefer if my axis labels were in seconds.
16:50:57 <Jafet> Not processor cycles?
16:51:16 <oren> getrusage is better then, and it allows you to easily add memory usage graphs.
16:51:27 <oren> if you ever wanted that?
16:51:37 <Melvar> So I guess I’ll go with getrusage right now just to avoid having to put extra effort into translating.
16:53:07 <oren> processor cycles is kind of a useless metric. one processor cycle on a different processor can be longer or shorter and do less or more work.
16:53:33 <Melvar> I don’t expect I want memory usage for this particular thing, since that section is not supposed to allocate.
16:54:05 <oren> Melvar: does it do any syscalls?
16:54:42 <oren> if it doesn't then you don't need the stime it will probably be almost zero.
16:54:52 <Melvar> I don’t expect so, it’s a blas routine which I mainly want to subtract from the stuff I’m doing around it.
16:55:18 -!- nys has joined.
16:56:34 <Melvar> oren: So, thanks for helping me decide here.
17:04:22 -!- Sprocklem has quit (Ping timeout: 272 seconds).
17:09:04 -!- mitchs has quit (Ping timeout: 250 seconds).
17:12:00 -!- Sprocklem has joined.
17:20:21 -!- callforjudgement has joined.
17:20:55 -!- mitchs has joined.
17:22:16 -!- bb010g has quit (Quit: Connection closed for inactivity).
17:24:13 -!- ais523 has quit (Ping timeout: 265 seconds).
17:43:05 -!- AndoDaan has joined.
17:43:26 -!- AndoDaan_ has quit (Ping timeout: 245 seconds).
17:53:37 -!- GeekDude has joined.
18:06:08 -!- scarf has joined.
18:06:19 -!- scarf has quit (Changing host).
18:06:19 -!- scarf has joined.
18:09:46 -!- callforjudgement has quit (Ping timeout: 255 seconds).
18:10:21 -!- shikhout has joined.
18:10:41 -!- shikhout has quit (Changing host).
18:10:41 -!- shikhout has joined.
18:10:51 -!- shikhin has quit (Disconnected by services).
18:10:56 -!- shikhout has changed nick to shikhin.
18:11:21 -!- scarf has changed nick to ais523.
18:15:44 -!- MoALTz has joined.
18:34:44 -!- Sprocklem has quit (Ping timeout: 245 seconds).
18:46:37 -!- idris-bot has quit (Quit: Terminated).
18:46:54 -!- idris-bot has joined.
18:49:44 -!- relrod_ has changed nick to relrod.
19:00:08 -!- GeekDude has quit (Quit: {{{}}{{{}}{{}}}{{}}} (www.adiirc.com)).
19:09:10 <oren> Should scrip7 allow division by a pointer or of a pointer?
19:09:43 -!- quintopi1 has joined.
19:09:45 -!- lambdabot has quit (Ping timeout: 244 seconds).
19:09:45 -!- diginet has quit (Ping timeout: 244 seconds).
19:09:46 -!- quintopia has quit (Ping timeout: 244 seconds).
19:10:08 -!- diginet_ has joined.
19:10:24 <ais523> oren: I can't think of a situation where dividing pointers makes sense; dividing pointer /differences/ makes sense, though
19:10:35 <ais523> (pointer - pointer) / 4 is an operation that, say, NetHack actually does
19:10:45 <ais523> but the difference between two pointers is a ptrdiff_t, not a poitner
19:12:24 <oren> ais523: dividing pointers makes sense if you want to check alignment.
19:12:34 <ais523> pointer modulo makes sense, I guess
19:12:55 <oren> ok so i should disallow / but not %
19:13:27 <elliott> ptr % ptrdiff_t makes sense
19:13:29 <elliott> not ptr % ptr
19:13:37 <oren> i right now attempting to make the semantics of scrip7 fully defined in all situations
19:13:59 <elliott> ais523: (...are pointers a vector space or something?)
19:14:01 -!- S1 has quit (Quit: S1).
19:14:03 <oren> (or an error)
19:14:12 <ais523> elliott: they're an affine scale
19:14:20 <elliott> they're an affine space, right
19:14:32 <elliott> is affine scale something in particular?
19:14:51 -!- lambdabot has joined.
19:15:19 <oren> does bitwise operations on a pointer make sense?
19:15:23 <elliott> so what do you call an affine space that has modulo?
19:16:03 <elliott> well, I guess ptr divmod ptrdiff_t gives you (ptr rounded down to nearest diff, distance between that and ptr)?
19:16:12 <elliott> no, that first result can't be right
19:16:29 <elliott> oren: for pointer tagging and stuff, sure
19:16:32 -!- AndoDaan_ has joined.
19:16:42 <elliott> the point is that operations on pointers aren't symmetrical in the sense that it's ptr + ptr
19:17:15 <elliott> it's ptr + offset => ptr, ptr - offset => ptr, ptr - ptr => offset
19:17:24 <elliott> (ptr + ptr doesn't make sense)
19:17:45 <oren> but offsets have to be the same binary length as the pointer
19:17:50 <elliott> https://en.wikipedia.org/wiki/Affine_space#Definition so it is an affine space
19:17:53 <elliott> oren: yes, but they are not pointers
19:18:18 <oren> well, yes but scrip7 is pretty much typeless
19:18:29 <oren> operations have types not data
19:18:30 <elliott> then sure, just allow every arithmetic operation
19:18:48 <elliott> ais523: this is actually really elegant and nice
19:18:56 <elliott> ais523: I want a language that represents pointer operations like this now
19:19:02 <elliott> (with strong typing of it)
19:19:34 -!- AndoDaan has quit (Ping timeout: 264 seconds).
19:19:52 <oren> elliott: i have been toying with building a better version of C (with strong typing and no undefined behaviour) on top of scrip7
19:20:14 <elliott> uhh, script7 is an interesting choice of base for that but sure
19:20:47 <oren> well scrip7 is a "portable assembler" to an extent
19:20:58 <elliott> an interpreted portable assembler
19:21:06 <oren> you could compile it
19:22:07 <oren> but the main thing is that like C it allows direct memory access, but unlike C there is (will be) no undefined behaviour
19:23:44 <elliott> really
19:23:51 <elliott> so what is the defined behaviour of accessing some memory you haven't allocated
19:25:45 <oren> the defined behaviour of any memory access such as x=0 is that it: takes address in register 4, and places the 4 bytes representing a ieee 32 bit floating point number "0" into the four bytes of memory following that address
19:27:39 <oren> if the program crashes due to trying to do that, that is fine. the mian thing is that it will try.
19:29:07 <ais523> elliott: fwiw, my thesis is about (a subset of) affine programming languages
19:29:14 <oren> scrip7 has allocation primitives but these are not essential.
19:29:21 <elliott> oren: so you define the behaviour as undefined
19:29:36 <ais523> elliott: I guess the language's effect on the processor is defined
19:29:41 <elliott> just you also refuse to perform optimisations based on this undefined behaviour, so your programs will be slow
19:29:42 <ais523> but not the processor's interpretation of that
19:29:45 <elliott> ok! cool
19:29:48 <ais523> oren: how do you do things like SMP memory barriers?
19:29:49 <oren> elliott: i refer the definition to the processor and OS
19:29:58 <elliott> ahhh
19:30:02 <elliott> so your language has no definition
19:30:06 <elliott> and therefore all behaviour is undefined
19:31:35 <oren> it is defined to the extent that it will try to do what you have specified. it will not, for example, attempt to steal your bank account, as a C program may legally do.
19:32:13 <elliott> it will if the OS tries to
19:33:30 <oren> That is the OS's fault not mine. All i promise is if the value of O is 0, and you write u=0, i will attempt to write to the address 0.
19:33:50 <oren> I won't cut out that part pf the code
19:34:15 <elliott> all I can say is that you're going to make a cutting-edge language perfectly suited for the computers, speed and software engineering practices of the 80s
19:36:10 <oren> elliott: this has real implications. suppose you have a function which allocates memory, performs some cryptography, and then clears the memory and frees it. if such program is written in C, the compiler may optimize it by omitting the "clear memory" part. scrip7 promises not to.
19:36:25 <elliott> please stop trying to educate me about the implications of undefined behaviour
19:36:41 <elliott> the other way around would be more reasonable...
19:36:52 <elliott> that doesn't actually have anything to do with UB though
19:37:00 <elliott> that's literally just dead code elimination
19:37:07 <elliott> have fun writing a compiler that doesn't optimise anything at all
19:37:17 <elliott> you also can't optimise division into bitshifts because it'd change how it uses the CPU I suppose!
19:37:40 <oren> elliott: that is the point. dead code elimination can create security holes
19:37:48 <elliott> agreed.
19:37:51 <elliott> your solution sucks though
19:38:01 <oren> what's yours?
19:38:09 -!- callforjudgement has joined.
19:38:09 <elliott> (and crypto is hard. and its requirements are hard. and you probably won't satisfy them)
19:38:12 -!- GeekDude has joined.
19:38:14 <callforjudgement> *<ais523> oren: did you know that all modern kernels with any level of popularity for modern consumer desktops/laptops zero deallocated memory maps?
19:38:25 -!- ais523 has quit (Read error: Connection reset by peer).
19:38:29 -!- callforjudgement has changed nick to ais523.
19:38:33 <elliott> oren: my solution is to try being less naive and acknowledge complexity and reasons for things
19:38:36 <ais523> Windows actually has a background process that does the zeroing
19:38:44 <elliott> I support languages that don't let you do things like dereference invalid pointers at compile time, anyway.
19:39:03 <ais523> meanwhile, Linux (on systems with an MMU) will map all zeroed memory against the same page (full of zeros) until it gets written to
19:39:20 <elliott> (I also support unsafe escape hatches for when things like that are necessary (rarely), and for the behaviour of those escape hatches to be regulated by undefined behaviour to some degree to allow optimisation.)
19:39:26 <ais523> elliott: now I'm interested, what languages /do/ let you dereference invalid pointers at compile time
19:39:33 <elliott> ais523: misparse :)
19:39:35 <oren> BASIC
19:39:36 <ais523> Perl does, I believe? at least it does if you're allowed to use the FFI
19:39:58 <oren> POKE 0 1
19:40:02 <elliott> that's not compile time.
19:40:07 -!- mitchs_ has joined.
19:40:13 <elliott> (overall I support hardware and software systems that are built to not require such unsafety, to as great an extent as possible. but that is a pipe dream.)
19:40:36 <elliott> (I also think 95% of programs just shouldn't be touching raw pointers or anything at all.)
19:40:48 <elliott> (life is too short for that)
19:40:55 -!- callforjudgement has joined.
19:42:48 <callforjudgement> $ perl -e 'BEGIN { print +(unpack "p", 10000000), "\n"; }'
19:42:49 <callforjudgement> Segmentation fault (core dumped)
19:42:55 <callforjudgement> took a ton of tries to find an actual invalid pointer, though
19:43:03 -!- mitchs has quit (Ping timeout: 240 seconds).
19:43:12 <callforjudgement> apparently someone had mapped a bunch of zeroes over the bottom of the address space
19:43:33 -!- ais523 has quit (Disconnected by services).
19:43:35 -!- callforjudgement has changed nick to ais523.
19:44:06 <ais523> oh, and proof it's compile-time:
19:44:08 <ais523> $ perl -ce 'BEGIN { print +(unpack "p", 10000000), "\n"; }'
19:44:10 <ais523> Segmentation fault (core dumped)
19:44:13 <shachaf> Bottom as in page 0? What OS are you running?
19:44:22 <ais523> Linux, x86_64
19:44:29 <ais523> and bottom as in when I tried to dereference small integers
19:44:37 <ais523> interpreted as null-terminated strings
19:44:40 <ais523> I got zero-length strings back
19:44:58 <oren> what about an actual zero pointer?
19:45:09 <ais523> that's a special case, it doesn't even try to dereference it
19:45:11 <ais523> it just returns undef
19:45:23 <ais523> because NULL is 0 on this platform
19:45:31 <shachaf> You got that behavior for e.g. 1?
19:45:42 <oren> maybe a zero pointer is the internal repr. of undef in PERL
19:46:09 <shachaf> I think that page shouldn't be mappable by default usually.
19:46:11 <ais523> shachaf: yes, 1's the first thing I tried
19:46:16 <ais523> oren: no, it isn't
19:46:33 <oren> undef has its own type then?
19:46:38 <shachaf> What's `sysctl vm.mmap_min_addr`?
19:46:52 <ais523> I say this as someone who a) has dealt with Perl's memory management internals quite extensively, and b) has read the docs for pack which /specifically say 0 is a special case/
19:47:12 <ais523> shachaf: I'm guessing that it's the minimum address at which memory maps will be placed when the kernel's asked to choose an address
19:47:57 <ais523> now that there are three main ways to allocate memory (stack, brk, mmap), it's become hard giving them all their own address spaces
19:48:25 <ais523> in the old days, before OSes started to really exploit what the MMU could do (and before that, before MMUs existed), it was quite simple: stack grows down, heap grows up, they both grow into the same space
19:48:37 <ais523> that guarantees that you never have problems due to failing to guess which will grow larger
19:48:41 <elliott> fuck.c:1:5: error: size of array ‘fuck’ is too large
19:48:41 <elliott> int fuck[(unsigned long) -1];
19:48:41 <elliott> ^
19:48:42 <elliott> awwwww
19:48:47 <elliott> that kind of thing used to segfault gcc
19:49:00 <ais523> nowadays, you still have stacks growing down and heaps growing up, but the maps have to be placed somewhere in between
19:49:04 <ais523> and it's not quite obvious where
19:49:13 <elliott> ais523: isn't the stack usually allocated with mmap
19:49:16 <elliott> so it's really only two
19:49:36 <ais523> elliott: yes except it's a special case of mmap, there are a bunch of flags; also that's an implementation detail
19:49:40 <oren> how can it segfault the compiler? the compiler doesn't allocate the array...
19:49:52 <ais523> elliott: was that inside a function?
19:50:00 <elliott> ais523: no, top-level
19:50:01 <ais523> if not, the compiler really does allocate the array
19:50:10 <ais523> oren: what do you think a .exe file is?
19:50:10 <oren> but in a file, right?
19:50:16 <shachaf> ais523: I meant what is it set to on your system.
19:50:21 <ais523> and yes, it's allocating space to it in a file
19:50:24 <elliott> maybe you should learn how C compilers work before redesigning them :p
19:50:38 <elliott> ais523: all I remember is it used to segfault gcc if you had a huge array
19:50:44 <shachaf> ais523: But I get the same behavior -- I don't think the page is mapped, at any rate.
19:50:46 <ais523> shachaf: 65536; an address of 1 million (in decimal) worked and read NUL
19:51:29 <ais523> elliott: out of interest, have you read http://nethack4.org/blog/building-c.html ? oren: read http://nethack4.org/blog/building-c.html
19:51:40 <oren> elliott: are you telling me it builds the whole binary file in memory? i dunno how comoilers like gcc work but we made one in one of my classes and it didn't do that.
19:51:49 <ais523> oren: see my link
19:52:08 <ais523> that doesn't really explain how a compiler works, but it does explain what it does
19:56:53 <oren> i don't see how it can crash gcc (or any component of gcc.)
19:57:56 <oren> shouldn't it just output a big file?
19:58:12 <ais523> elliott: I found a reasonably reliable way to segfault mingw ld.exe
19:58:33 <ais523> at least, I assume segfault, hard to tell from the generic Windows dialog box
19:59:06 <coppro> GNU ld is a piece of crap
19:59:15 <coppro> at least, without gold
19:59:46 <ais523> given any valid .o file (say test.o), run: "gcc test.o -Wl,-t,--whole-archive,--allow-multiple-definition"
20:00:05 <ais523> coppro: I've tested aimake with both ld.bfd and gold
20:00:18 <ais523> I was unaware that gold was a GNU ld derivative, I thought it was a rewrite
20:00:23 <coppro> it is
20:00:38 <ais523> what's the main difference between them?
20:00:43 <coppro> but it now ships with ld and there's a flag to pick
20:01:15 <coppro> gold is faster, less memory intensive, and supports plugins
20:01:20 <coppro> those are the three I care about
20:01:31 <coppro> and I don't *really* care about plugins
20:01:33 <ais523> and slightly less featureful because not all the ld.bfd features have been reimplemented in it yet
20:01:47 <oren> ais523: how come my gcc hasn't got those flags available?
20:02:06 <ais523> oren: which gcc is it? (gcc --version)
20:02:19 <ais523> also, pretty much every gcc supports -Wl, which just passes flags to the linker
20:02:22 <oren> 4.8.2
20:02:25 <elliott> less featureful but also more
20:02:27 <ais523> maybe you're using a weird linker
20:02:32 <elliott> for instance llvm lto uses gold plugins
20:02:36 <coppro> yep
20:02:48 <coppro> assuming you don't just compile to bitcode and do the LTO on that
20:02:49 <ais523> did you copy and paste, or try to retype?
20:02:52 <ais523> that's a lowercase l
20:02:52 <coppro> which is iirc better anyway
20:03:06 <ais523> gcc's LTO works by placing its internal representation in the .o file
20:03:22 <elliott> coppro: that's how clang LTO works
20:03:28 <ais523> meanwhile, clang's internal representation is just LLVM, isn't it?
20:03:32 <oren> GNU ld 2.24
20:03:38 <elliott> coppro: it "links" the LLVM bitcode files along with any native .o files with gold + a plugin
20:03:48 <elliott> s/clang LTO/LLVM LTO/, really
20:03:56 <elliott> (IIRC)
20:04:11 <ais523> distinguishing between clang and LLVM is useful, but I suspect the LTO is mostly an LLVM feature here
20:04:14 <elliott> ais523: clang has an intermediate representation before it emits IR, I think
20:04:21 <elliott> I mean, of course it does
20:04:23 <elliott> it needs an AST if nothing else
20:04:52 <ais523> elliott: right, but the question is as to how much it uses those intermediate representations
20:04:56 <elliott> coppro: http://llvm.org/docs/LinkTimeOptimization.html goes into how it benefits from getting information from the linking phase
20:05:04 <ais523> something isn't really a real IR unless you heavily process it
20:05:05 <elliott> ais523: I think clang is relatively simple as these things go
20:05:35 <elliott> in that it's mostly a command-line driver, and a relatively simple frontend that just emits fairly naive IR, letting LLVM do all the hard work
20:05:35 <ais523> is clang a completely separate codebase from llvm-gcc, btw? or is llvm-gcc just a wrapper around clang? or something else?
20:05:38 <elliott> "fairly simple" being relative, of course
20:05:45 <elliott> llvm-gcc is gcc frontend + llvm backend
20:05:56 <elliott> it's also kind of dormant because of licensing stuff?
20:06:00 <elliott> dragonegg is the new version of that idea
20:06:04 <oren> hmm, my ld doesn't crash with thatinput
20:06:10 <elliott> I don't know how it differs
20:06:15 <elliott> I guess by being a gcc plugin rather than a fork or something?
20:06:31 <ais523> hmm, I wonder what licensing problems that could have, given that gcc alone is fine with licensing and LLVM stuff is permissively licensed
20:06:44 <elliott> maybe it's not licensing
20:06:45 <elliott> I don't know
20:06:55 <elliott> it might just be that apple didn't want to update it because they don't want GPLv3
20:06:59 <elliott> and nobody else cared enough about it
20:07:38 <elliott> I'm not sure why you'd even use dragonegg though. I guess for languages that clang doesn't support?
20:07:38 <ais523> which reminds me, the GPL2 actually went to court recently, but I don't know the details
20:07:46 <elliott> I mean, gcc is still a little better at code generation.
20:07:58 <elliott> so replacing the backend is kind of what you don't want.
20:09:21 <oren> wait: elliott i was wrong! on clang you can set optimization level for one function at a time. so my solution isn't needed
20:09:38 <elliott> oh lord
20:09:39 <ais523> oren: you can do that on gcc too
20:09:43 <elliott> that's not really a solution, dude.
20:09:47 <ais523> probably also MSVC
20:10:05 <ais523> I'm wondering what sort of problem you might be having that needs a solution like this
20:10:12 <ais523> note that even -O0 has many optimizations
20:10:27 <fizzie> ais523: I vaguely recall on MSVC you just have a pragma for it, so it's really more of a "per region of source" than "per function", but (a) I might be wrong, and (b) it of course can be used to do per function.
20:10:28 <ais523> I assume, because gcc's internal representation destroys information that would be needed to replicate the original code in asm perfectly
20:10:55 <elliott> -O-1 that just bundles a C interpreter with your source code
20:11:02 <oren> I don't have the problem, but here is someone who explains it: http://pdos.csail.mit.edu/papers/stack:sosp13.pdf
20:12:16 <elliott> hi fizzie it's undefined behaviour hour again
20:12:24 <elliott> except this time it's dead code elimination hour. dead code elimination is also evil now
20:12:57 <oren> it isn;t dead when you don read the result but you want an adversary to
20:12:58 <fizzie> elliott: Oh, would you look at the time, I think I need to be going.
20:13:17 <elliott> I'm going to be dead if this nonsense keeps happening
20:13:21 <elliott> please eliminate me
20:15:13 <oren> http://www.viva64.com/en/d/0208/
20:16:18 <oren> RtlSecureZeroMemory(). for when the memory really must be zero!
20:16:37 <elliott> for when your effect model includes things that C regards as implementation details
20:17:12 <elliott> btw, it's weird to me that you think presenting evidence that C is an unsuitable language for secure systems programming is some kind of gotcha. like, you realise I hate C, right?
20:17:28 <elliott> C is one of my least favourite languages for precisely that reason.
20:18:05 <oren> oh i know you do. but it doesn't have to be that way if compiler writers had different goals in mind
20:18:49 <oren> e.g. "do what the programmer meant" rather than " do the fastest possible interpretation"
20:19:11 <elliott> no
20:19:27 <oren> just no?
20:19:36 <elliott> "C is bad and it is incredibly difficult to use it correctly" is right. everything else you think is wrong
20:20:08 <ais523> C suffers from being too high-level to do the job for which it was designed, while being too low-level for everything else
20:20:16 <Vorpal> oren, oh? Using PVS Studio? How do you find it?
20:20:59 <ais523> oren: by the way, it is impossible to securely zero memory retrospectively
20:21:08 <ais523> you have to announce that you plan to eventually securely zero it in advance
20:21:24 <ais523> otherwise it might get swapped out and swapped back in and you're not going to be able to find the place where it was on disk to zero it
20:21:39 <ais523> also, many OSes have a pretty small limit on the amount of memory you can designate as unswappable
20:21:49 <ais523> because you can use that for denial of service attacks
20:22:00 <elliott> ais523: the language should disable swap
20:22:01 <elliott> and the MMU
20:22:05 <Vorpal> ais523, Unless you are root of course
20:22:12 <ais523> Vorpal: right
20:22:15 <shachaf> pft, just allocate a huge page
20:22:19 <oren> elliott: it should provide the option
20:22:20 <elliott> ais523: to Do What The Programmer Wants
20:22:24 <ais523> and come to think of it, most things that legitimately need to ask for passwords do run as root
20:22:28 <elliott> oren: to disable swap and the MMU?
20:22:28 <elliott> nice
20:22:36 <ais523> unless their only purpose is to send it over a network
20:22:38 <elliott> system("swapoff -a"), a valuable missing C feature
20:22:49 <ais523> in which case, you have bigger problems than just zeroing memory
20:23:19 <oren> how are you supposed to write kernel code without the ability to do lowest-level stuff?
20:23:25 <Vorpal> What are you trying to achieve?
20:24:15 <elliott> Vorpal: arguments
20:24:25 <ais523> oren: well, swap is a kernel feature
20:24:29 <ais523> so the kernel knows how to turn it off, obviously
20:24:31 <oren> oh, run in real mode, write to VGA memory, the usual
20:24:34 <Vorpal> elliott, always fun
20:24:37 <ais523> as for things like MMU management
20:24:45 <ais523> that differs by platform to the extent that it cannot be done portably
20:24:51 <elliott> Vorpal: reminds me of the good old days with us
20:25:12 <Vorpal> Hah
20:25:27 <Vorpal> elliott, you didn't appear to find them fun back then
20:25:49 <J_Arcane> A language usage analysis of the Linux kernel. http://gooby.naurunappula.com/org/36/26/3626c2b7abe07458/0/1240811.png
20:26:13 <elliott> Vorpal: IRC is wearying as ever, and yet I never quit
20:26:22 <Vorpal> Hah
20:27:04 <oren> the linux kernel is compiled with -fwrapv.
20:27:16 <Vorpal> elliott, You know... That sounds almost exactly like a World of Warcraft player I knew
20:27:23 <elliott> ostriches can't fly
20:27:25 <Vorpal> Just replace IRC with WoW
20:27:36 <elliott> *states random facts in an attempt to prove a point I'm not even sure of to someone who disagrees with something else entirely*
20:27:46 <Vorpal> heh
20:27:48 <elliott> Vorpal: such is addiction
20:27:59 <oren> does that not imply that the linux kernel is not written in standard C
20:28:01 <Vorpal> Of course, I know
20:28:01 <elliott> I'd prefer a heroin habit
20:28:03 <elliott> oren: of course
20:28:14 <elliott> the linux kernel does all kinds of unportable things and even gets bit by UB quite a lot (IIRC)
20:28:35 <Vorpal> The kernel is full of GCC specific code too. Well GCC + Clang these days I guess
20:28:38 <elliott> -fwrapv is a perfectly reasonable dialect of C and it's fine and proper that the kernel uses it but it still suffers immensely from C's inadequacy for the task
20:28:42 <elliott> yeah
20:28:47 <elliott> still gcc-only, clang requires patches still
20:29:07 <Vorpal> Oh okay
20:29:17 <oren> elliott: of you were making a new linux kernal what language would youuse
20:29:21 <oren> *if
20:29:31 <zzo38> What does -fwrapv mean?
20:29:38 <elliott> zzo38: defines wrapping as overflow
20:29:47 <elliott> oren: if I made a new kernel I sure as hell wouldn't emulate linux
20:29:50 <Vorpal> Assume signed two complement overflow
20:29:56 <Vorpal> I just looked it up myself
20:30:11 <elliott> oren: the field of C replacements is undeveloped but there are compelling options, some new, some older -- Rust, ATS, D, blah blah blah
20:30:19 <Vorpal> Speaking of that, how well does FreeBSD Linux emulation work these days?
20:30:26 <Vorpal> Can you still run real programs with it?
20:30:56 <elliott> oren: using C for a kernel reliably isn't impossible, though. you just have to be principled and careful
20:31:12 <elliott> and drop down to assembly (inline or otherwise) for truly unportable operations rather than trying to hack them with C that sort of looks like it should do the right thing
20:31:37 <elliott> I think the task of writing correct C isn't one humans are capable of, though.
20:31:39 <Vorpal> elliott, well obviously. Linux and *BSD managed it. Probably Windows and OS X too
20:31:56 <elliott> ideally you write as little as possible in C to support a higher-level language that you write the bulk of the kernel in, if you're going down that route.
20:32:00 <elliott> Vorpal: not really
20:32:06 <elliott> they're not robust in terms of undefined behaviour etc.
20:32:08 -!- nycs has joined.
20:32:15 <elliott> anyway, http://openmirage.org/ is very cool
20:32:34 <Vorpal> elliott, well, they use implementation specific behaviour yes. And extensions.
20:32:39 <Vorpal> Like inline assembly
20:32:42 <elliott> Vorpal: UB is not implementation-specific behaviour
20:32:55 <elliott> I am pretty sure there have been linux exploits due to UB relating to null pointers and the like
20:33:04 <Vorpal> Hm true
20:33:24 <elliott> (of course dereferencing memory address zero is actually potentially perfectly okay in kernel mode -- another deficiency of C for the task)
20:33:26 <Vorpal> Pretty sure the zero page is always unmapped these days because of that
20:33:33 <ais523> elliott: not any more, the gcc devs implemented compiler flags for them to not optimize out null checks
20:33:49 <elliott> ais523: makes sense; clang too, I guess?
20:33:57 <ais523> not sure about clang
20:34:09 <elliott> basically fixing the codebase up after-the-fact to be a kind of ill-specified dialect of C slightly more suitable for kernel code
20:34:11 <ais523> I didn't think it could build the kernel yet
20:34:16 <elliott> it has been able to for years, with patches
20:34:18 <ais523> they're trying to get it to, but it's hard because the kernel's so gcc-specific
20:34:19 <elliott> the patches are rather minor these days
20:34:25 <ais523> right
20:34:27 <elliott> and they keep getting folded in
20:34:33 -!- `^_^v has quit (Ping timeout: 250 seconds).
20:34:35 <elliott> it's basically just stuff like random gcc extensions like VLAs in structs now
20:35:06 <oren> i've never found VLA's at all useful
20:35:12 <ais523> how do VLAs in structs even worK? does it have to be a local struct definition?
20:35:17 <ais523> oren: OK, now you've offended me
20:35:28 <ais523> and I have another link for you to read: http://nethack4.org/blog/memory.html
20:35:33 <oren> i mean in cbviously
20:35:42 <Vorpal> ais523, VLA is not flexible array member is it? I forget...
20:35:43 <ais523> maybe that'll explain why VLAs are so useful (more so than pretty much every other way to allocate memory in C)
20:35:48 <Vorpal> I used both
20:35:53 <ais523> Vorpal: no, flexible member is flexible member
20:35:57 <Vorpal> Right
20:36:01 <ais523> but flexible member is C99 so no way clang doesn't impl it
20:36:05 <ais523> it isn't even an extension
20:36:07 <Vorpal> Indeed
20:36:16 <Vorpal> And VLA is C99 too iirc?
20:36:33 <ais523> yes
20:36:36 <oren> what was wrong with alloca?
20:36:38 <elliott> https://github.com/mirage/mirage-platform/tree/master/xen/runtime/xencaml I think this is the majority of kernel C code in openmirage
20:36:42 <elliott> well, plus the ocaml runtime
20:37:09 <Vorpal> ais523, Also I found VLAs to be less than useful, since they allocate on the stack. Either your allocation is large enough that it can smash the stack, or it is small enough that you can just use the max size always
20:37:20 <oren> in any case stack space is less than heap so you want to use heap space
20:37:37 <ais523> Vorpal: what about for holding strcat returns?
20:37:39 <elliott> of course it's designed to run under xen so it can be a bit simpler than a bare metal OS
20:37:42 <ais523> you don't want an outright max size there
20:37:55 <ais523> because if you have any specific max, people can create a string that's slightly longer
20:38:00 <ais523> however, you also don't expect it to be long
20:38:12 <elliott> oren: lol, yeah, let's just use the heap constantly in all our low-level systems applications and kernels and avoid the efficient, simple reliability of stack allocation
20:38:15 <Vorpal> ais523, and if I don't specify a max size, they can smash the stack instead, which crashes
20:38:17 <oren> ais523: use strncat and chop the string
20:38:18 <Vorpal> Which is worse
20:38:29 <ais523> and VLA's reaction on memory exhaustion (segfault) is pretty much the same as malloc's; you can install a handler for malloc failure but nobody ever does anything but effectively ending the program anyway
20:38:39 <ais523> either not checking and segfaulting on null read; or checking, printing "out of memory", and exiting
20:38:45 <ais523> which is basically the same as a segfault but harder to debug
20:39:12 <elliott> install a handler? you can just check the return value
20:39:18 <elliott> also, no, aborting is far better
20:39:31 <oren> elliott: i agree
20:39:36 <Vorpal> ais523, I do real time programming these days. That has given me a different outlook on things like these. "Works most of the time" is never an option
20:39:39 <elliott> the fewer segfaults the less you have to worry about bizarre exploits
20:39:55 <oren> except in kernel code where there is no way to abort
20:39:56 <ais523> elliott: well it's good to distinguish between a clean segfault, and a dirty segfault
20:40:14 <ais523> a clean segfault is something that always segfaults no matter what, like dereferencing null (given that null page mapping is disallowed in-kernel nowadyas)
20:40:16 <oren> but malloc isn't available inside the kernel iirc
20:40:20 <elliott> ais523: well you're dereferencing a null pointer
20:40:23 <elliott> there's nothing clean about that
20:40:27 <ais523> a dirty segfault is something that happens to have been caught, like dereferencing uninitialized memory
20:40:28 <Vorpal> ais523, I would verify the input to ensure it is not larger than allowed size. Because if the program crashes that means the machine stops and that is bad.
20:40:35 <elliott> ais523: it might even skip the dereference you have there; you know this
20:40:36 <ais523> that happened to form an invalid poitner
20:40:51 <ais523> elliott: oh I was talking about asm level, rather than C level
20:40:51 <oren> Vorpal: strncat!
20:40:59 <elliott> you have to check the return value of malloc because (a) it can, in fact, fail in practice; and (b) if it does, you're going to trigger UB
20:41:21 <Vorpal> oren, nope. wcsncat. Probably
20:41:34 <Vorpal> You have to support non-ASCII remember
20:41:52 <Vorpal> Proper software design :P
20:42:21 <elliott> ais523: fair enough
20:42:21 <Vorpal> (And working directly with UTF-8 data in a char* is just painful. UTF-8 is painful)
20:42:35 <elliott> malloc is part of libc, though :p
20:42:39 <ais523> I agree about wanting a malloc wrapper, though
20:42:39 <elliott> anyway, how is it harder to debug?
20:42:47 <ais523> the message doesn't tell you where the allocation failed, doesn't have a stacktrace, etc.
20:43:57 <Vorpal> ais523, It certainly does in gdb
20:44:26 <ais523> the most common reason to run out of memory on a modern computer (other than running aimake) is that your program is stuck in a tight loop that allocates memory
20:44:35 <ais523> the stacktrace is typically very useful to see what happened there
20:44:41 <elliott> abort() and run gdb on the core dump?
20:44:41 <elliott> that's what they're /for/
20:44:52 <ais523> getting a malloc wrapper to abort on OOM is actually a really good idea
20:44:52 <oren> #define safalloc(n) ({void *p=malloc(n);if(p==0)abort();p;})
20:44:54 <ais523> most of the wrappers I've seen call exit instead
20:44:56 <oren> you want a core dump
20:44:58 -!- AndoDaan_ has quit (Read error: Connection reset by peer).
20:44:59 <ais523> is there an mbscat?
20:44:59 <Vorpal> ais523, anyway a program that crashes is a broken program. What you really should do is use Erlang and use supervisor trees to restart components on failure.
20:45:00 -!- AndoDaan has joined.
20:45:01 <elliott> % cat blah.c
20:45:01 <elliott> #include <stdlib.h>
20:45:01 <elliott> #define safalloc(n) ({void *p=malloc(n);if(p==0)abort();p;})
20:45:01 <elliott> int main() { int p = 123; safalloc(p); }
20:45:01 <elliott> % clang blah.c
20:45:01 <elliott> blah.c:3:36: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'unsigned long' [-Wint-conversion]
20:45:01 <elliott> int main() { int p = 123; safalloc(p); }
20:45:01 <elliott> ^
20:45:02 <elliott> blah.c:2:38: note: expanded from macro 'safalloc'
20:45:02 <elliott> #define safalloc(n) ({void *p=malloc(n);if(p==0)abort();p;})
20:45:02 <elliott> ^
20:45:02 <elliott> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/stdlib.h:152:20: note: passing argument to parameter here
20:45:02 <elliott> void *malloc(size_t);
20:45:02 <elliott> ^
20:45:02 <ais523> elliott: oh right, unhygenic macro
20:45:02 <elliott> 1 warning generated.
20:45:02 <elliott> try again
20:45:02 <elliott> (okay, s/int/size_t/)
20:45:02 <ais523> there is a gcc extensions to fix this
20:45:02 <ais523> but I don't know how to use it, looking it up now
20:45:02 <elliott> ais523: there is a C standard feature to fix this
20:45:02 <elliott> it's called a function.
20:45:02 <ais523> elliott: I know
20:45:02 <ais523> but this is #esoteric
20:45:02 <elliott> yeah iirc gcc has some kind of gensym
20:45:02 <elliott> but I forget how it works
20:45:02 <elliott> I remember it being weird
20:45:02 <ais523> if someone does something the wrong way, am I allowed to have fun trying to make the wrong way work?
20:45:02 <elliott> I bet clang doesn't support it
20:45:13 <Vorpal> Because making a c program that doesn't crash is not easy
20:45:57 <Vorpal> elliott, __COUNTER__?
20:46:01 <elliott> ais523: btw, I suspect #define xmalloc(n) (malloc(n) ?: abort()) works
20:46:03 <Vorpal> Or is that MSVC?
20:46:10 <elliott> which is not actually that bad
20:46:15 <elliott> Vorpal: it has __COUNTER__ but that's not a perfect gensym
20:46:19 <Vorpal> Oh?
20:46:32 <elliott> well you can always just do p_123
20:46:35 <elliott> when __COUNTER__ will be 123
20:46:36 <ais523> it still generates a symbol that could potentially be used elsewhere
20:46:43 <ais523> and no, ?: is gcc for the defined-or
20:46:52 <ais523> err, no
20:46:58 <ais523> it's Perl/Python ||
20:47:02 <elliott> a ?: b is a ? a : b without evaluating a twice
20:47:05 <elliott> so it should be correct for this
20:47:11 <Vorpal> elliott, Anyway ({}) introduces a scope, so what is the issue?
20:47:13 <elliott> since we want p = malloc(n); if (p) p else abort()
20:47:20 <elliott> Vorpal: did you see my program or not
20:47:33 <ais523> Vorpal: lack of hygiene
20:47:34 <Vorpal> Yes I looked at it and it appears to work?
20:47:37 <Vorpal> Hm
20:47:46 <Vorpal> ais523, All C macros have that issues?
20:47:47 <elliott> Vorpal: did you see my compiler warnings.....
20:47:47 <ais523> it confused me for a moment before I saw that elliott had used the same identifier for two different purposes
20:47:55 <ais523> it's the sort of thing which would work really well in the UCC
20:47:59 <ais523> and yes, all C macros have that issue
20:48:02 <elliott> if you don't think not being able to use the variable name p is an issue then, uhhh
20:48:11 <elliott> (this is exactly what lexical scope is for!)
20:48:15 <Vorpal> <elliott> blah.c:3:36: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'unsigned long' [-Wint-conversion]
20:48:17 <Vorpal> That is weird
20:48:21 <elliott> no it's not
20:48:26 <elliott> it expands to void *p = malloc(p);
20:48:26 -!- diginet_ has quit (Quit: diginet has quit!).
20:48:31 <elliott> what do you expect?
20:48:54 <Vorpal> elliott, "p shadows p in outer scope"
20:49:02 <Vorpal> Or something like that
20:49:05 <ais523> elliott: fwiw I don't think you can make that work with dynamic scope either
20:49:05 <elliott> Vorpal: you can use p inside the definition of p
20:49:12 -!- diginet has joined.
20:49:15 <elliott> char *foo = malloc(123 * sizeof *foo);
20:49:17 <elliott> is a common idiom
20:49:24 <elliott> maybe that has to be sizeof(*foo), I forget
20:49:29 <ais523> elliott: it doesn't
20:49:42 <elliott> does void *p = evil(&p) work
20:49:43 <ais523> sizeof needs parens on types, but not on expressions unless it'd associate incorrectly
20:49:46 <Vorpal> Hm
20:49:47 <oren> sizeof with brackets is just common convention
20:49:49 <ais523> and there is only one way to associate there
20:49:50 <elliott> I guess maybe yes as long as evil never dereferences its argument?
20:49:57 <ais523> elliott: I think yes too, not 100% sure though
20:50:08 <shachaf> Parentheses on expressions for sizeof is misleading.
20:50:28 <elliott> ais523: what if void *evil(void *p) { *p = malloc(123); return malloc(456); }
20:50:35 <elliott> I guess that's probably okay too? it's very weird
20:50:44 <elliott> maybe some weirdness with sequence points
20:50:49 <elliott> er
20:50:50 <ais523> elliott: that doens't work
20:50:50 <elliott> *void **p
20:50:53 <elliott> sorry
20:50:58 <elliott> and then doing void *p = evil(&p);
20:51:01 <ais523> yeah, was going to say it had to be a void**
20:51:20 <ais523> and no, I don't think there's sequence point weirdness there
20:51:20 <elliott> btw if you find the gcc gensym thing I'm interested in a link to documentation, since I wanted to look it up recently but couldn't find it again
20:51:33 <fizzie> To put the scope thing more formally, "Any other identifier has scope that begins just after the completion of its declarator", which means before the initializer.
20:51:41 <fizzie> And all I can remember is the counter approach.
20:51:45 <ais523> you have a sequence point between the two mallocs inside the function, and a function call can't violate sequence point restrictions in its own right
20:52:03 <elliott> I remember some weird thing, like it was a built-in macro-y function or something, or something involving $ in variable names?
20:52:07 <elliott> I was definitely very surprised that gcc had gensym.
20:52:08 <ais523> (i.e. in foo(x)+foo(y), the two calls can happen in either order but must happen in some order)
20:52:14 <elliott> maybe I exclaimed as much in the logs and could look it up.
20:52:19 <ais523> elliott: I couldn't find it in the list of extensions
20:52:21 <fizzie> Yes, there was some weird thing.
20:52:25 <ais523> now I'm reading through them individually
20:52:33 <elliott> fizzie: okay, I'm glad we agree the weird thing exists, at least
20:52:37 <elliott> ais523: IIRC it's none of them
20:53:13 <fizzie> 2011-04-29 23:06:44 <elliott> monqy: istr the gcc manual saying they were planning to add gensym or whatever to use with statement expressions in macros
20:53:28 <elliott> maybe they actually did it since then??
20:53:55 <elliott> https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html doesn't mention any gensym plans, at least
20:54:12 <ais523> elliott: also $ is a letter as far as gcc is concerned, but it warns that some assemblers may disagree
20:54:31 <oren> why can't we all jsut get along?
20:54:46 <oren> and not argue about what a letter is?
20:54:54 <fizzie> You could argue that combining the $ extension and the __COUNTER__ extension is more or less a gensym for non-extension-dependent problems, since they won't be using $.
20:55:13 <elliott> "If you use some other kind of statement last within the braces, the construct has type void" hmm, is there any way to get a value of type void in C?
20:55:21 <elliott> you're not actually allowed to dereference a (void *), right?
20:55:26 <elliott> is that a GNU C innovation? :)
20:55:30 <Vorpal> fizzie, what is the $ extension?
20:55:30 <ais523> that's UB, possibly even a constraint variation
20:55:39 <ais523> GNU C allows arithmetic on a void *
20:55:39 <elliott> oh, maybe function_returning_void() has type void
20:55:41 <ais523> but yes
20:55:45 <fizzie> Vorpal: That it's a valid character in identifiers.
20:55:46 <ais523> you can just return void values from a function
20:55:49 <Vorpal> Ah
20:55:52 <fizzie> Vorpal: You can pretend you're writing BASIC.
20:55:56 <oren> can't you just cast any type to void?
20:56:05 <oren> (void)34;
20:56:06 <ais523> oh yes, that too
20:56:16 <elliott> I guess that's an expression, yeah
20:56:17 <ais523> and this is a common way to tell linters to shut up about you not using the return value
20:56:32 <elliott> void main(void) { main(main()); } /* troll C program */
20:56:41 <elliott> *"C" "program"
20:56:50 <Vorpal> fizzie, basic uses $?
20:56:55 <elliott> int main(void x) { ... }
20:56:58 <Vorpal> fizzie, I would assume perl or shell
20:57:17 <oren> it uses $ at the end of words
20:57:17 <ais523> elliott: that troll program is beautiful
20:57:26 <fizzie> Vorpal: It's a typical suffix for strings.
20:57:31 <Vorpal> ah
20:57:46 <fizzie> Vorpal: See "Data-Type Suffixes" at http://gamma.zem.fi/~fis/qbc.html#QEw4MDA4
20:57:49 <elliott> ais523: it's great because every time you think of something to nitpick about it, a far more glaring problem comes up
20:57:51 <fizzie> Vorpal: In some dialects, they're optional.
20:57:54 <ais523> some BASIC impls had 26 float variables, 26 int variables ending in %, and 26 string variables ending in $
20:58:19 <ais523> elliott: OK, you're right
20:58:21 <elliott> ais523: "that prototype for main is wrong" "main can't call itself" "you... you're passing a void argument in. what is wrong with you."
20:58:23 <Vorpal> elliott, pretty sure that won't compile to to main() not returning int?
20:58:26 <ais523> I only saw two, but when you said that, I saw a third
20:58:32 <elliott> what were they?
20:58:43 <Vorpal> Or is that C89 and C++ only?
20:58:50 <ais523> inner call to main has the wrong number of args, but that isn't actually a problem
20:58:53 <ais523> because it doesn't take args
20:58:58 <ais523> I just assumed it did because the outer call did take args
20:59:00 <elliott> Vorpal: that's one of the many things wrong with it, yes
20:59:04 <elliott> ais523: haha
20:59:08 <oren> main can have any signature you want on non-posix i thing
20:59:10 <elliott> ais523: fix(main);
20:59:12 <elliott> oren: no
20:59:23 <ais523> oren: on freestanding, it can have any signature that the impl supports
20:59:30 <elliott> it's true that you can use whatever main signature you want in freestanding up to the impl, IIRC
20:59:33 <elliott> yeah
20:59:35 <ais523> on hosted, there are only three portable signatures, I think
20:59:38 <elliott> most platforms aren't freestanding, though.
20:59:42 <ais523> depending on how you count
20:59:50 <ais523> elliott: gcc -ffreestanding works on a bunch of platforms
20:59:55 <oren> on Windows iirc void main works
21:00:00 <elliott> ais523: void main(void) { void *x = &main(*x); }
21:00:00 <fizzie> ais523: "what the impl supports" works on hosted too, because it implies "not portable".
21:00:05 <ais523> oren: it "works" on gcc, but it complains
21:00:06 <Vorpal> <ais523> some BASIC impls had 26 float variables, 26 int variables ending in %, and 26 string variables ending in $ <-- oh god, so limited
21:00:08 <elliott> ais523: void main(void x) { x = main(&x); }
21:00:17 <elliott> this program is wonderful, it has so many great variations
21:00:24 <elliott> err, x = main(x); } rather
21:00:28 <elliott> *{ x =
21:00:42 <fizzie> On a hosted implementation, "[main] shall be defined [in the two portable ways]; or in some other implementation-defined manner."
21:00:44 <ais523> elliott: I'm actually disappointed that you can't declare void variables for their addresses
21:00:54 <fizzie> (C11 5.1.2.2.1p1)
21:01:00 <elliott> fizzie: hmm, is the environ argument unportable?
21:01:03 <fizzie> Yes.
21:01:03 -!- GeekDude has changed nick to GeekAfk.
21:01:05 <ais523> I'm also disappointed that you can't portably malloc 0 or realloc 0
21:01:07 <elliott> ais523: I think gcc supports "extern void x;" or something?
21:01:13 <elliott> and then you can use a linker script to give it an address
21:01:15 <fizzie> Also there's a really silly related argument there.
21:01:34 <oren> float main(float argc, char(*argv)()){return main(M_PI,&argv())}
21:01:35 <Vorpal> elliott, isn't there yet another argument after environ?
21:01:42 <ais523> elliott: hmm, can you do "struct foo; extern struct foo x"?
21:01:44 <Vorpal> Some ELF vector or something
21:01:45 <ais523> I don't see any reason why that wouldn't work
21:01:51 <ais523> apart from the missing semicolon
21:01:54 <Vorpal> Or is that _start only?
21:02:00 <elliott> ais523: maybe? might x be an incomplete type?
21:02:02 <elliott> *have an
21:02:05 -!- diginet has quit (Quit: diginet has quit!).
21:02:11 <ais523> x /does/ have an incomplete type
21:02:13 <ais523> but it's extern
21:02:13 <elliott> right
21:02:14 <elliott> I guess that's fine
21:02:18 <oren> float main(float argc, char(*argv)()){return main(M_PI,&argv());}
21:02:23 <elliott> hmm, I wonder what kind of error message you get for sizeof on that
21:02:31 <elliott> `! c int main() { printf("%d\n", sizeof(*stdout)); }
21:02:37 <HackEgo> Does not compile.
21:02:40 <elliott> thanks
21:02:41 <oren> `! c float main(float argc, char(*argv)()){return main(M_PI,&argv());}
21:02:42 <elliott> thanks a bunch
21:02:43 <HackEgo> Does not compile.
21:02:45 -!- diginet has joined.
21:02:46 <elliott> `runc int main() { printf("%d\n", sizeof(*stdout)); }
21:02:48 <HackEgo> No output.
21:03:06 <fizzie> The exact text is: "It shall be defined with a return type of int and with no parameters: int main(void) { /* ... */ } or with two parameters --: int main(int argc, char *argv[]) { /* ... */ } or equivalent;" -- and some people, who want to argue against a *definition* of "int main() { ... }" hinge their reasoning on the fact that they parse the "or equivalent" to apply only to the argc-and-argv form, based on where it is in the text.
21:03:23 <ais523> elliott: there was an argument about this in comp.lang.c semi-recently
21:03:26 <elliott> ais523: in fact, "extern struct foo x;" works
21:03:28 <elliott> without the struct declaration
21:03:48 <oren> excellent!
21:03:52 <ais523> apparently, C99 requires sizeof(FILE) to work, and C11 doesn't, but nobody noticed until the thread started because the definition of FILE hadn't changed at all
21:03:57 <ais523> rather, they redefined some of the words in it
21:03:59 <Vorpal> elliott, surely if you try to do something with x though it won't?
21:04:04 <ais523> (in the definition, that is)
21:04:12 <elliott> % cat hmm.c
21:04:13 <elliott> extern struct foo x; extern struct foo y; int main() { return &x == &y; }
21:04:16 <Vorpal> Either that or get a link error depending on what
21:04:17 <elliott> % clang -Wall hmm.c && ./a.out; echo $?
21:04:17 <elliott> 0
21:04:18 <ais523> and everywhere else in the standard, they updated things to the new definitions, but not with FILE
21:04:20 <fizzie> Which is patently silly, because there's a footnote explaining that the "or equivalent" means stuff like "int can be replaced by a typedef name defined as int" and it makes no sense that "typedef int q; q main(void) { ... }" would not be legal, but "typedef int q; q main(q argc, char **argv) { ... }" would.
21:04:22 <oren> taking its address woudl work
21:04:28 <elliott> I guess that program is allowed to compile and do that?
21:04:30 <elliott> nice gotcha that they're equal
21:04:44 <Vorpal> <elliott> % clang -Wall hmm.c && ./a.out; echo $?
21:04:44 <Vorpal> <elliott> 0
21:04:48 <Vorpal> The fuck
21:04:52 <Vorpal> How?
21:04:55 <ais523> that means they aren't equal
21:04:57 <Vorpal> What does GCC do?
21:05:06 <elliott> % cat hmm.c && clang -Wall hmm.c && ./a.out
21:05:06 <elliott> #include <stdio.h>
21:05:06 <elliott> extern struct foo x; extern struct foo y; int main() { printf("%p %p\n", &x, &y); }
21:05:09 <elliott> Undefined symbols for architecture x86_64:
21:05:10 <oren> it optimizes out the whole thing
21:05:12 <elliott> hah
21:05:14 <ais523> if they were equal, it'd have returned 1
21:05:15 <elliott> ais523: err, right
21:05:23 <elliott> I like how it starts breaking as soon as I try printffing it
21:05:29 <ais523> I think oren's explanation is right, though
21:05:33 <ais523> the &x == &y got optimized out
21:05:35 <elliott> yeah
21:05:40 <ais523> then there were no undefined symbols left
21:05:58 <elliott> inb4 oren whines about compilers
21:06:09 <ais523> there was a separate argument on comp.lang.c semi-recently about compilers being inconsistent as to whether two pointers were equal
21:06:09 <oren> i'm done with that
21:06:10 <elliott> bonus, this wasn't with -O
21:06:22 <elliott> ais523: yes, I remember you mentioning something like that
21:06:36 <ais523> it was code of the form "uint32_t x; uint32_t y; return (&x)[1] == &y"
21:06:44 <elliott> fizzie: hah
21:06:50 <elliott> fizzie: do people really advance that argument in seriousness?
21:06:53 <ais523> and various variations on that
21:06:59 -!- diginet has quit (Client Quit).
21:07:01 <Vorpal> elliott, does clang optimize by default then?
21:07:11 <oren> order of things on stack is undefined
21:07:20 <ais523> oren: yes
21:07:28 <ais523> however, the point is, if the two pointers randomly happen to be equal
21:07:30 <oren> when in doubt assume C the code never happened
21:07:30 <elliott> Vorpal: the results are the same for -O0. (I don't think it does, no.)
21:07:35 <Vorpal> Hm
21:07:37 <ais523> which is quite likely for either that way round, or for y and x
21:07:38 -!- diginet has joined.
21:07:46 <Vorpal> elliott, So what does GCC do with that exact program?
21:07:49 <ais523> can they subsequently stop being equal if you use them in a different expression
21:07:59 <elliott> oren: btw, C has a rule that specifically destroys any kind of implementation guarantees or machine correspondence you might expect, on purpose
21:08:02 <elliott> it's called the as-if rule
21:08:15 <Vorpal> elliott, anyway surely x and y can be equal? Depending on the linker script
21:08:26 <elliott> the compiler is allowed to do absolutely anything to a program and compile it in any way whatsoever, with any semantics and any strategy, so long as the observable effects (as specified by the standard) are the same
21:08:30 <Vorpal> So that is a premature optimization
21:08:36 <elliott> implementations don't actually have to do what the rest of the standard says
21:08:37 <Vorpal> Well not in the usual sense
21:08:49 <ais523> I like the as-if rule
21:08:54 <Vorpal> elliott, heh nice
21:08:57 <elliott> they just have to do things that are indistinguishable from that when considering the operation of the program by a definition that excludes things like whether some random memory is zero or not
21:08:58 <ais523> and don't understand why any language /wouldn't/ want it
21:09:13 <ais523> however, the more that's specified by the language, the less the as-if rule can do
21:09:14 <elliott> ais523: I like it too, but it's further proof that C is unsuitable for what people try to use it for
21:09:24 <elliott> (the problem is more that the definition of equivalence is too loose for that)
21:09:27 <elliott> (rather then the as-if rule itself)
21:09:33 -!- Sprocklem has joined.
21:09:43 <ais523> elliott: well it depends on what you use it for
21:09:46 <elliott> (a language focused on safe crypto would include timing and other such side-channels as part of its as-if rule, making it rather less useful for compilers)
21:09:49 <ais523> I don't think it's a terrible language for writing kernels, for instance
21:09:52 <oren> elliott: is C suitable for anything
21:09:59 <elliott> oren: not really
21:10:02 <oren> k
21:10:08 <ais523> it's possible to do better, but there haven't been many attempts to do better
21:10:11 <fizzie> elliott: I've seen it used. A more credible argument is perhaps that "or equivalent" does not apply, because while a definition with an empty () is defined merely to "specif[y] that the function has no parameters", but that's nowhere explicitly stated to be "equivalent" to a (void). (And indeed, they're inherently different forms.)
21:10:12 <elliott> it's suitable for the 70s
21:10:35 -!- GeekAfk has changed nick to GeekDude.
21:10:37 <ais523> I'm really happy at Rust partly just because it's actively trying to displace C in fields where C is traditionally good
21:10:48 <elliott> really, C is suitable for things that are already written in C that are not about to be rewrited, and things for which there is not yet a production-ready alternative to C
21:11:01 <ais523> those make up a huge subset of programs just by themselves, though
21:11:12 <elliott> fizzie: isn't (void) and () the same by C99 or something
21:11:12 <Vorpal> Heh
21:11:17 <ais523> elliott: no, they're the same by C++
21:11:20 <elliott> they're different in C89 due to some kind of varargs bullshit or something I think
21:11:22 <oren> is there a C alternative that interoperates with C libraries?
21:11:23 <elliott> ais523: ah, okay
21:11:24 -!- SopaXorzTaker has quit (Ping timeout: 265 seconds).
21:11:27 <ais523> they're different in C99 and also in C11
21:11:34 <ais523> and the difference is default argument promotions
21:11:42 <elliott> oren: rust, ocaml, haskell, ats, d, whatever
21:11:43 <fizzie> ais523: They're not that much different, when you're talking about definitions.
21:11:52 <elliott> it really depends on what you're doing, what counts as an "alternative"
21:11:59 <fizzie> ais523: In a declaration that is not part of a definition, they're indeed quite different.
21:12:03 <elliott> most programs written in C don't need to be written in a language anywhere near as low-level as C
21:12:22 <oren> brb learning rust
21:12:26 <elliott> some people even still write entire mundane end-user applications in C!
21:12:28 <ais523> well my problem is that most high-level languages suck too
21:12:32 <elliott> even ones that require high levels of security!
21:12:44 <elliott> ais523: I'll take programs written in them over C running on my box any day
21:12:47 <Vorpal> ais523, um doesn't C11 require prototypes already?!?
21:12:59 <fizzie> Vorpal: No.
21:13:02 <ais523> so here's a question to you (that I've been thinking a bunch about): if you rewrote NetHack, what language would you rewrite it in?
21:13:02 <Vorpal> Wow
21:13:13 <fizzie> "An empty list in a function declarator that is part of a definition of that function specifies that the function has no parameters. The empty list in a function declarator that is not part of a definition of that function specifies that no information about the number or types of parameters is supplied." (C11 6.7.6.3p14)
21:13:18 <elliott> I'm annoyed that I can't find the gensym thing
21:13:32 <elliott> maybe they removed it
21:13:34 <oren> maybe the gcc people went sane
21:13:38 <Vorpal> ais523, the problem is using ncurses from anything but C/C++ is fucking annoying. So is there an alternative to ncurses?
21:13:41 <elliott> what? gensym is useful
21:13:44 <fizzie> Whether the former case is "the same" as foo(void) is up to your definition of "the same".
21:13:53 <ais523> Vorpal: you do realise I /wrote/ an alternative to ncurses, right?
21:13:59 <elliott> ais523: does it need to be as portable or as fast?
21:14:01 <ais523> although, due to being an alternative to ncurses, it has mostly the same API
21:14:16 <Vorpal> ais523, nope I didn't know, give me a link
21:14:17 <Vorpal> I want this
21:14:23 <elliott> i.e. do I still need to be able to run it on my commodore 64 at full speed :P
21:14:35 <ais523> elliott: it needs to run on all commonly used OSes but not really niche ones, and it has to be as fast as the original from a user's point of view, but if it's orders of magnitude that doesn't matter so long as it's not human-perceptible
21:14:50 <elliott> ais523: it depends on my mood then, I guess
21:14:52 -!- SopaXorzTaker has joined.
21:14:54 <ais523> (all this is negotiable, but if you want a starting point)
21:15:03 <elliott> ais523: picking a favourite language is hard but I don't see any reason to discard any of them
21:15:13 <ais523> this isn't so much favourite language, as most appropriate language
21:15:14 <elliott> maybe an ML family language, maybe learn rust or something
21:15:18 <ais523> IMO, most of them would work
21:15:20 <elliott> I think they're pretty much all appropriate
21:15:23 <ais523> but none are really ideal
21:15:26 <elliott> any memory safe language that supports a good level of abstraction
21:15:43 <elliott> it would probably come down to "what language do I feel like playing with and getting to know better?"
21:15:49 <ais523> this is what inspired me to start writing TCTOE, incidenally, which also isn't ideal due to being eso
21:15:58 <ais523> I just tried to figure out what features I'd want that no existing language had
21:16:00 <elliott> I'm convinced that C is pretty much the worst common language to write NetHack in :)
21:16:01 <ais523> then, working out what those were
21:16:02 <zzo38> I still happen to like C
21:16:09 <elliott> probably even C++ would be better
21:16:11 <zzo38> Another alternative is to write it in LLVM with macros
21:16:16 <zzo38> Although, LLVM doesn't have macros.
21:16:23 <Vorpal> what, LLVM IR!?
21:16:31 <zzo38> Yes
21:16:33 <ais523> decided to make an esolang with /just/ those features
21:16:35 <Vorpal> Ouch
21:16:53 <elliott> ais523: hmm, I haven't heard of TCTOE before, go on
21:16:55 <fizzie> LLVM IR is so phi.
21:17:03 <ais523> elliott: I'm still working on it, it's an ais523 vaporware esolang
21:17:22 <ais523> but luckily, the core mostly works designwise, just some of the details are giving me problems and I only have a vague idea how to impl it
21:17:28 <elliott> ais523: I was asking for a description :)
21:17:30 <ais523> shall I just pastebin what i have so far
21:17:39 <ais523> might be easier than trying to describe over IRC
21:17:40 <elliott> sure
21:17:58 <ais523> http://sprunge.us/Wcbd
21:18:48 <Vorpal> ais523, speaking of which, what happend to Feather? Gave up on it?
21:19:04 <Vorpal> ais523, anyway what is this ncurses alternative?
21:19:16 <Vorpal> Presumably it supports reading terminfo?
21:19:17 <ais523> Vorpal: http://nethack4.org/blog/portable-terminal-codes.html to the last question
21:19:48 <ais523> I hope you can guess why I didn't answer the others
21:19:53 <ais523> and no, it doesn't use terminof
21:19:55 <ais523> *terminfo
21:19:57 <ais523> that's the whole point
21:20:30 <oren> Secretary of the Supreme Soviet, Georgiy Terminoff
21:20:37 -!- Patashu has joined.
21:20:50 <oren> *not a real person
21:21:37 <Vorpal> ais523, oh? My problem with ncurses is the API, unprefixed lower case macros and crap like that
21:21:57 <oren> what's wrong with them?
21:22:02 <ais523> sadly, this is the same because I wanted to be able to swap it out behind daniel_t's nethack interface without a lot of rewriting
21:22:05 <ais523> oren: namespace pollution
21:22:25 <oren> isn't memcpy and crap also macros?
21:22:44 <ais523> Vorpal: I've been considering putting a prefix on the identifiers in the ABI, then allowing a customizable or no prefix on the identifiers in the header
21:22:54 <ais523> but I'm not sure that's technically possible in the C preprocessor
21:23:06 <elliott> ais523: why wouldn't it be?
21:23:09 <oren> it is, it just needs a lot of directives
21:23:19 <ais523> elliott: you need #define X Y when X is the result of a macro expansion
21:23:26 <elliott> oh, for #defines too
21:23:29 <elliott> no hope then
21:23:39 <ais523> * of a token paste
21:23:39 <Vorpal> ais523, well also it doesn't do what I need of ncurses. Which is basically ncurses with prefixed ABI and non-macro API so I can access it via FFI from a high level language
21:23:43 <elliott> try not using cpp, then
21:23:46 <ais523> perhaps you could do a wrapper function or the like
21:23:57 <ais523> non-macro ABI may be possible, at least
21:24:03 <ais523> most of the macros are thin wrappers anyway
21:24:09 <Vorpal> ais523, I still want full 256 color support if the terminal has that and so on
21:24:21 <Vorpal> I'm not interested in the replay feature for my needs
21:24:42 <ais523> well, libuncursed doesn't do that (the 256 color support), but in my defence, curses doesn't really either
21:25:05 <oren> Vorpal: why not use a graphics library and sprites that look like letters
21:25:27 <Vorpal> What and doing a GUI program?
21:25:34 <Vorpal> Useless over ssh for example
21:25:42 <oren> ssh -XC
21:25:47 <Vorpal> oren, the lag
21:25:59 <Vorpal> Also it needs working X11
21:26:10 <Vorpal> Which may not exist on the remote server
21:26:11 <ais523> oren: libuncursed can also do that (the graphics library + sprites)
21:27:10 <oren> hmm ok what about using your own client server model
21:27:42 <Vorpal> oren, well, that still assumes a working X11 on the local end.
21:27:53 <oren> no it doesnt?
21:28:15 <Vorpal> I still need to deal with ncurses at the local end?
21:28:17 <oren> you just write the whole thing in Python on server and Javascript
21:28:30 <Vorpal> oren, what I'm looking for is a general purpose ncurses replacement that has a sane API
21:28:40 <Vorpal> For use in all my projects
21:28:45 <oren> i have never heard of one
21:29:15 <Vorpal> Which includes stuff running on machines without X, stuff written in high level languages where ncurses is a pain to use and so on
21:29:30 <oren> um, google says termbox?
21:31:03 <Vorpal> Well that looks limited
21:31:30 <Vorpal> Also it is python??
21:31:44 <oren> i dunno man 256 colors is really the point at which i'd just write a graphics program
21:31:45 <Vorpal> Wait no, the build system is
21:32:09 <Vorpal> oren, I also want the terminal mouse support thing if it exists
21:32:20 <Vorpal> Like with xterm or a linux vt with gpm
21:32:46 <oren> really how many real programs even use 256 colors?
21:32:51 <Vorpal> ais523, does your library support that btw?
21:32:57 <Vorpal> ais523, I assume not?
21:33:20 <ais523> Vorpal: mouse? it supports mouse but with a different API to ncurses
21:33:27 <ais523> and better one, IMO
21:33:38 <ais523> basically, being mouse-sensitive is like a font style or a colour
21:33:51 <ais523> and mouse-sensitive text is translated into a keypress of your choice when clicked
21:33:57 <Vorpal> Ah ok, that is nice
21:34:13 <ais523> including nonexistent keycodes, say if you want coordinates from a map directly
21:34:17 <oren> ais523 that is an amazing idea
21:34:19 <Vorpal> ais523, so you can't get x,y though?
21:34:46 <Vorpal> Just clicked area?
21:35:07 <ais523> Vorpal: you can get x,y by using a different keypress for every square, if that's what you need
21:35:10 <oren> make one clickable area on every character on screen
21:35:14 <ais523> different "keypress"
21:35:29 <ais523> I also support right clicks and the mousewheel
21:35:30 <Vorpal> ais523, can I tell key presses apart from actual key presses though?
21:35:42 <ais523> not if you specify the same code
21:35:47 <ais523> but you have a whole int's worth of codes to use
21:35:51 <Vorpal> Ah
21:35:53 <oren> put the codes out of range
21:37:12 <oren> oh i see Vim has 256 color support
21:37:22 <oren> or rather can use it
21:39:09 <Vorpal> ais523, what about setting the terminal title for X-based terminals?
21:39:20 <Vorpal> I know gnome-terminal and konsole supports this
21:39:21 <ais523> not supported yet, and I don't think you can do that portably
21:39:42 <Vorpal> Ah
21:39:44 <ais523> as in, not without producing junk on at least some terminals
21:40:10 <Vorpal> ais523, why not do the replays pre-rendering instead?
21:40:27 <ais523> I do, but postrendering is common in actual practice
21:40:32 <ais523> so I wanted it to work
21:40:32 <Vorpal> Ah
21:45:11 <Vorpal> ais523, what about windows? Doesn't that cmd.exe work completely differently?
21:45:48 <ais523> Vorpal: cmd.exe is not a terminal renderer, it runs /in/ a terminal, it isn't one
21:45:58 <ais523> but the Windows terminal does work completely differently
21:46:03 <ais523> uncursed has a separate backend for it
21:46:17 <ais523> but the Windows terminal also has terrible performance, so I normally use the oren method of just rendering a terminal myself
21:46:26 <Vorpal> ais523, ah, so that polyglot didn't work in the end then
21:47:00 <Vorpal> ais523, if someone records cmd.exe it can't be replayed (assuming you can even record that)
21:47:25 <ais523> Vorpal: the windows terminal's basically impossible to record
21:48:00 <ais523> it's so separate from the rest of the system that Microsoft couldn't get drag-and-drop to work in it, at all
21:48:35 <ais523> basically, it makes more sense to consider it part of the kernel than it does to consider it part of userspace
21:48:44 <ais523> it isn't strictly part of the kernel, but it's that sort of distance from everything else
21:48:51 <Vorpal> ais523, I have dragged and dropped paths into it and it worked, assuming it isn't running as admin, but drag and drop to programs running as admin doesn't work anyway
21:49:02 <ais523> Vorpal: on XP?
21:49:08 <Vorpal> ais523, oh, 7
21:49:14 <ais523> oh
21:49:16 <ais523> it shouldn't work on 7
21:49:21 <ais523> maybe Microsoft finally found a way
21:49:44 <Vorpal> It does, drag and drop a file into it and it works, assuming it isn't running with elevated privileges
21:50:30 <Vorpal> ais523, why is it not a normal user space program?
21:50:50 <ais523> because everything is 100% more complex on Windows than it should be
21:51:23 <ais523> you won't believe how hard it is to accomplish this task: "wait for user input on standard input or incoming network packets on a network socket"
21:51:28 <elliott> the GUI is still like half in the win32 subsystem right
21:51:36 <elliott> not quite kernel code but not quite userspace either...
21:51:47 <ais523> the console has its own subsystem, AFAIK
21:51:49 <elliott> ais523: even with threads?
21:52:00 <ais523> it's much easier with threads
21:52:05 <ais523> that's the solution I used eventually
21:52:56 <ais523> but the basic problem is that Windows has multiple equivalents of select() and they all only wait on a subset of waitable things
21:53:35 <Vorpal> Heh
21:54:45 <Vorpal> ais523, btw it turns out gcc as cross compiler is not quite the same as gcc as native compiler
21:55:19 <Vorpal> specifically __attribute__((weak,visibility("hidden"))) doesn't work if it is a cross compiler. Which breaks lttng-ust
21:55:25 <Vorpal> Just a fun fact
21:59:54 <int-e> gah. http://lttng.org/ ... why does this little information take up 3 screens worth of space?
22:00:26 <J_Arcane> int-e: welcome to the new world of 'design languages'.
22:00:34 <oren> because graphic designers like to eat your screen
22:00:43 <oren> and your brain
22:00:51 <ais523> I'm annoyed that styling is still normally done server-side
22:01:00 <ais523> maybe I should see if I can just turn off CSS altogether in the browser
22:01:03 <ais523> like I did with JS
22:01:08 <Vorpal> Heh
22:01:17 <oren> use w3m
22:01:22 <Vorpal> well it is basically kernel and user space low overhead tracing
22:01:36 <Vorpal> Useful for real time system programming
22:01:39 <Vorpal> (Which is my job)
22:02:05 <Vorpal> I used it to debug a priority inversion last week for example.
22:02:36 <oren> they need to hire a better web designer
22:02:55 <oren> that site is very advanced but stillusgly
22:02:56 <Vorpal> We have a really good proprietary program at work to analyze the trace logs
22:03:01 <ais523> I do use w3m sometimes
22:03:06 <int-e> Vorpal: the "documentation" page is a bit better, and with CSS disabled the information density is quite reasonable. Unfortunately, that destroys the diagrams on the page.
22:03:45 <Vorpal> Heh
22:03:49 <int-e> (with CSS we have a navigation bar on the side and it doesn't use the whole screen width ... I can almost excuse the latter but not the former.)
22:05:53 <Vorpal> int-e, using the entire screen isn't always good, text is harder to read if it is too wide. That is one reason why you use multiple columns on paper. A bit harder to do that on a web page
22:06:33 <oren> i wish websites would let me be their pro-bono eeb designer
22:06:42 <int-e> Vorpal: as I said I can almost excuse the latter.
22:06:57 <int-e> Vorpal: But having the text not centered because of the navigation bar is annoying.
22:07:26 <int-e> Vorpal: also I use windows; if the text is too wide I'll make the window smaller :P
22:07:58 <Vorpal> int-e, what if the user is on a tablet?
22:08:06 <Vorpal> (in landscape mode)
22:08:27 <oren> so many people run browsers fullscreen by default that web disgners forget that windows existed
22:08:28 <int-e> Vorpal: What saddens me is that these low information density designs (I'm not back to the starting page) are also being used on pages who are targeted at programmers, people who
22:08:38 <int-e> 're used to dealing with lots of information.
22:08:57 <oren> int-e good point.
22:09:24 <oren> source code (in the best languages) has a lot of information density
22:10:00 <oren> and people usually don't put one statement every page
22:10:05 <Vorpal> oren, I tend to use one window full screen on each monitor for the simple reason that I like my IDE and text editor and so on large. I generally have a terminal with several tabs on one monitor. Sublime on one display and a a browser / whatever on the third monitor
22:10:29 <Vorpal> (Yes I use 3x 24" 16:10 displays)
22:10:34 -!- nycs has quit (Quit: This computer has gone to sleep).
22:10:57 <oren> i just down the font size when i want more density
22:11:28 <Vorpal> I have been considering switching to a tiling WM
22:11:59 <oren> the first version on windows was one, i read that somewhere
22:12:10 <oren> and win8 is basically one
22:12:55 <int-e> Actually http://lttng.org/features/ is not too bad (the oversized icons add little information, but at least there is some usefuly information there). But it should be the starting page.
22:13:26 <Vorpal> oren, not a good one though
22:14:08 <Vorpal> int-e, anyway I don't care about the page design. I care that it produce useful trace data
22:15:28 <int-e> Vorpal: I'm not blaming you. I simply wanted to figure out what lttng *is*, and that lead me to the website, which at first didn't tell me anything useful at all. That's the complaint.
22:15:43 <elliott> let me just say that I find the lttng site far more readable and accessible for me than the average programming tool's website.
22:16:15 <ais523> because you like it, or because the average programming tool's website is even worse?
22:16:34 <ais523> also that page is using some sort of common framework, I think
22:16:38 <ais523> I've seen many that look almost exactly like it
22:16:54 <elliott> ais523: just because it is better than average, for me.
22:17:04 <oren> yeah the real problem is these cookie cutter designs that everyone slaps up
22:17:07 <Vorpal> int-e, well there is always wikipedia
22:17:12 <HackEgo> [wiki] [[Special:Log/upload]] upload * Tastyfish * uploaded "[[File:Flow chart math library example.png]]"
22:17:22 <elliott> so you don't want pages to have custom styles but you also don't want them to have standard styles?
22:17:38 <ais523> github, that's what it reminds me of
22:17:44 <int-e> Vorpal: true. didn't think of that, wikipedia is a secondary resource.
22:17:50 <elliott> or you want them to have standard styles as long as they're how browsers happened to render things circa the 90s that is kept for backwards compatibility
22:17:56 <Vorpal> int-e, it tends to show up in google results
22:18:00 <elliott> ais523: I think it's bootstrap or something.
22:18:01 <ais523> I don't mind the concept of standard styles, I just want control over which standard style it is
22:18:02 <elliott> it doesn't look like github
22:18:04 <elliott> github is much less flat
22:18:05 <oren> we want the styling to be user-specified hth
22:18:20 <ais523> I just loaded github to compare
22:18:23 -!- Sprocklem has quit (Ping timeout: 264 seconds).
22:18:26 <Vorpal> int-e, anyway for my particular needs lttng is far superior to systemtap, perf, ftrace and so on
22:18:35 <ais523> they look similar in style, but github's breaks under noscript and lttng's doesn't
22:18:39 <ais523> so they must be different frameworks
22:22:35 <Vorpal> Fuck pulseaudio
22:24:40 <Vorpal> I need to do "pactl load-module module-bluetooth-discover" every time to get my bluetooth headset to be work. And then manually enable the output
22:24:47 <Vorpal> Why does it need to be so complicated
22:25:06 <ais523> Vorpal: I need to do "sudo killall pulseaudio" to get sound output to work at all
22:25:12 <Vorpal> ouch
22:25:12 <ais523> it's fine after I've killed it and it's automatically reloaded once
22:25:22 <ais523> so I'm guessing a missing boot-time dependency or similar
22:25:29 <Vorpal> Is it running as user as opposed to root then?
22:26:13 <oren> audio on linux has always been a trainwreck
22:26:21 <oren> it's better now
22:26:27 <Vorpal> not really
22:26:28 <ais523> I guess it's running as not-me, because I need sudo to kill it
22:26:52 <int-e> ais523: can't you uninstall pulseaudio...
22:27:02 <ais523> int-e: well pulse is handling my sound right now
22:27:09 <ais523> killing it just causes the process to restart
22:27:13 <ais523> but in a way that actually works
22:27:34 <int-e> (I have done that, not looking back. Plain alsa works fine for me.)
22:28:06 <Vorpal> And bluetoothd crashed...
22:29:15 <int-e> (Otoh I'm not using any USB or Bluetooth or whatever devices; the sound setup is static, always going through the same audio device(s).)
22:29:58 -!- azazel_ has joined.
22:30:09 -!- azazel_ has changed nick to Solace.
22:30:31 <oren> my dad says he once had to compile alsa 10 times befroe it actually worked
22:30:47 <Vorpal> Heh
22:30:49 <Solace> Your dad sounds awesome
22:30:55 <ais523> presumably not with the same setup
22:31:02 <Vorpal> Solace, agreed
22:31:35 <Vorpal> ais523, some issues... I swear recompiling it on a configuration you tested earlier suddenly works...
22:31:41 <HackEgo> [wiki] [[Flow chart]] http://esolangs.org/w/index.php?diff=41520&oldid=41460 * Tastyfish * (+749)
22:31:44 <oren> he says it was different build options. back then autodetecting your hardware was... screwed
22:31:51 <Vorpal> Not with alsa as such
22:32:26 <ais523> if it's any help, I had severe audio problems with early windows XP
22:33:11 <Solace> Ok so like i want to be able to actually know how to use haskell, but im a bit lazy also any recomendations on a new language i should try?
22:33:21 <Vorpal> I never had issues with jack on linux. But I never used it with bluetooth so not sure
22:33:40 <oren> my problems with winXP were purely a result of downloading and running any damn thing
22:33:59 <zzo38> Solace: Did you try learning Forth programming, or 6502 assembly language programming?
22:34:09 <elliott> Solace: esme
22:34:33 <oren> Solace: racket
22:34:46 <oren> no wait, heresy
22:34:49 <Vorpal> ais523, what is NHGPL?
22:34:51 <Solace> no i havent tried learning those. Do i need any skiol requirements to learn them?
22:34:52 <ais523> Solace: what sort of languages do you know atm?
22:34:59 -!- GeekDude has quit (Quit: {{{}}{{{}}{{}}}{{}}} (www.adiirc.com)).
22:35:14 <elliott> not sure what skills are required to learn esme, but I certainly don't have them
22:35:18 <ais523> if you want to learn Haskell but your thought processes are too far from it, I'd recommend OCaml as something that has the less controversial half of Haskell's features while remaining vaguely familiar
22:35:26 <ais523> Vorpal: typo for NGPL, NetHack's license
22:35:36 <ais523> (I think NHGPL is a better name, but NGPL is "official")
22:35:37 <Vorpal> ais523, so what is NGPL?
22:35:46 <Vorpal> What is the extension to GPL
22:36:13 <ais523> it predates GPL
22:36:22 <ais523> it's the Bison license with one word changed
22:36:35 <Solace> Java, C, Bash, Lua, XML, And python
22:36:36 <Vorpal> I'm not familiar with the bison license either
22:36:38 <oren> GPL should be a programming language
22:36:40 <Vorpal> :/
22:36:44 <Solace> I just want a harder thing to learn
22:36:45 <ais523> annoyingly, I haven't been able to find a copy of the Bison license to find out which word it is
22:36:49 <ais523> but IIRC it was mostly irrelevant
22:36:51 <Solace> :[
22:36:55 <ais523> Solace: I recommend OCaml, then
22:37:04 <Vorpal> ais523, so what sort of license is it?
22:37:06 <Solace> Ok ill go find it
22:37:12 <ais523> Vorpal: the Bison license is basically the version of GPL before GPL1
22:37:17 <ais523> the GPL was based on it
22:37:44 <Vorpal> Heh
22:38:03 <ais523> but the problem is, Bison doesn't use it any more, and so the only reason to keep it around is historical interest
22:39:56 <Vorpal> ah
22:42:52 -!- boily has joined.
22:48:18 <oren> I am going to see Riot: Christmas Edition.
22:50:11 <oren> pkill -9 firefox
22:50:15 <oren> goddamnit
22:52:11 <Solace> What is pkill
22:52:38 <ais523> killall with different option names
22:52:59 <Solace> Cant you just have it close background/applications after its not used for like 5 min
22:53:56 <Solace> Also im sad today ;(
22:55:38 <elliott> me too
22:55:39 <oren> firefox basically starts freezing my computer every 8 hours
22:56:16 <Solace> What why?!
22:56:54 <Solace> Also one of the servers i ran off of was shut down cuz i didnt pay this month ;-; i was gonna do it
23:21:04 -!- oerjan has joined.
23:22:54 <oerjan> `date
23:23:02 <HackEgo> Fri Dec 19 23:21:53 UTC 2014
23:24:13 <oerjan> `date
23:24:14 <HackEgo> Fri Dec 19 23:23:06 UTC 2014
23:24:56 <oerjan> @tell Gregor the codu log clock is about a minute late (curiously HackEgo is unaffected)
23:24:56 <lambdabot> Consider it noted.
23:26:24 <oerjan> well i guess not that curious, they are different servers
23:26:47 <elliott> didn't you already tell him that
23:26:55 <oerjan> i don't think i used @tell
23:27:04 <oerjan> also i didn't check it properly then
23:28:59 -!- S1 has joined.
23:30:26 <oren> what is tell?
23:30:50 <oerjan> lambdabot's messaging service...
23:31:17 <oren> isn't irc a messaging service?
23:30:47 <oren> so it hold the message and repeats it later?
23:30:55 <Taneb> Not really
23:31:00 <oerjan> irc's not very reliable for people not physically present
23:31:10 <elliott> uh...
23:31:11 <Taneb> lambdabot saves the message for later
23:31:17 <oerjan> they might ping out, not bother to check old backlogs...
23:31:20 <elliott> I *have* talked to physically present people on IRC, but mostly not.
23:31:26 <elliott> oh, I guess you mean physically present at their computers.
23:31:31 <oerjan> yes :P
23:31:41 <Taneb> I've talked to physically present people on IRC a lot
23:31:46 <ais523> I've talked to people in the same real-life room over IRC, but mostly when there was a reason not to make audible noise
23:32:00 <oerjan> and experience has told me that Gregor tends to be away for longs periods, especially in weekends
23:32:00 <Taneb> I have a house IRC channel
23:32:09 <oren> AOL IM is what we used in high school
23:32:15 <oren> for studyperiods
23:32:57 <oren> is AIM still available?
23:33:32 <zzo38> ais523: You can use sign language not make noise even not making noise of typing on the computer.
23:33:44 <ais523> zzo38: that requires both people to know sign language
23:33:47 <zzo38> Or if you can't use sign language, writing on the paper
23:34:08 <oren> don't let teacher catch you passing notes
23:34:57 <Sgeo> shachaf: funded
23:35:05 <zzo38> Some people have passed notes by using a calculator link cable, but then someone might trip over it.
23:36:06 <oren> oh yeah i remember those ridiculous TI calculators!
23:36:20 <oren> like why not just use a computer?!
23:36:28 <oerjan> *-s
23:36:36 <oerjan> what _is_ with my spelling these days...
23:37:03 <oren> scrwe spling!
23:37:07 <zzo38> A computer is certainly faster but the calculator is more portable and will turn on more quickly than most computers, the battery also last longer.
23:37:34 <zzo38> I have a TI-92 calculator.
23:37:46 <oren> zzo38: good point about the battery and startup time
23:38:04 <oren> nowadays do they at least have color screens?
23:38:13 <oerjan> Sgeo: is there a celebration?
23:38:17 <oerjan> ^celebrate
23:38:17 <fungot> \o| c.c \o/ ಠ_ಠ \m/ \m/ \o_ c.c _o/ \m/ \m/ ಠ_ಠ \o/ c.c |o/
23:38:18 <myndzi> | c.c.c | ¯|¯⌠ `\o/´ | c.c.c | `\o/´ ¯|¯⌠ | c.c.c |
23:38:18 <myndzi> |\ c.c >\ /´\| | /< c.c /| | /`\| |\ c.c /<
23:38:19 <myndzi> /'\ (_|¯´¯|_)
23:38:19 <myndzi> (_| |_)
23:38:19 -!- AndoDaan_ has joined.
23:38:29 <zzo38> TI-92 doesn't have a color display, at least.
23:38:35 <zzo38> But I think some do.
23:38:43 * oerjan swats AndoDaan_ for ruining myndzi's graphics -----###
23:39:26 <oren> for me it is full of yen signs
23:40:14 -!- AndoDaan has quit (Ping timeout: 245 seconds).
23:40:18 <zzo38> A color display would be helpful for plotting multiple functions at the same time, you can tell the difference by colors; it also help for telling the difference of the data and the axis, and possibly some kinds of game programming might also be help by color graphics too.
23:42:23 <zzo38> TI-92 is capable of doing 3D graphics; if you have a color display then possibly it can even be made to work by colored glasses red and blue.
23:43:08 <oren> so it is like a tiny matlab! and its syntax can't possibly be any worse than matlab
23:44:00 <zzo38> It does 3D graphics pretty slowly though
23:44:10 <oren> so it is like matlab
23:45:08 <oren> or at least like the version of matlab i am familiar with
23:46:11 <fizzie> They made a "TI-84 Plus C SE" with a color screen, yes.
23:50:26 <fizzie> (It is an upgrade of the "TI-84 Plus SE". I think it's the only color screen in the series so far.)
23:50:33 <oren> does it cost less than matlab?
23:50:56 <oren> or is it comparable
23:51:31 <oren> why does wikipedia have all information on a product except its price?
23:52:18 <fizzie> Because who would keep that up to date? Anyway, yes.
23:53:42 <fizzie> MATLAB individual license is 2000/500 eur (normal/academic), the calculator is around 120 maybe. Depends on where you get it.
23:55:46 <fizzie> I wonder if I should get the free MATLAB now that I'm still employed by the university for a few more days. I hear it'll keep working for a year or two.
23:56:01 <oren> matlab stinks why bother
23:57:01 -!- AndoDaan_ has quit (Ping timeout: 250 seconds).
23:57:03 <oren> wow compiling the rust compiler is taking a long time
23:57:03 <fizzie> It stinks less than Octave in some contexts.
23:58:17 <oren> well actually it's about average for a large C++ program
23:58:31 <fizzie> (And also sometimes less than some other comparable tools, like SciPy. Depending, of course.)
23:59:58 -!- GeekDude has joined.
←2014-12-18 2014-12-19 2014-12-20→ ↑2014 ↑all