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