00:10:02 \me was going to repeat his assertion that any decent language should be parsable in o(n) time with o(n) space. 00:10:58 * boily suspects that orin has \ and / on the same key... 00:11:01 but obviously many widely used languages aren't 00:11:19 orin: well that certainly includes LR(1) languages 00:11:20 quintopia: today I slept! 00:12:02 or LR(k) for that matter 00:14:52 hmm, what about INTERCAL before the fix that made it possible to parse 00:14:58 IIRC that's type 2 but not LR(k) for any k 00:15:05 also it's ambiguous, which doesn't help 00:15:18 charming 00:16:08 -!- Phantom_Hoover has quit (Read error: Connection reset by peer). 00:16:10 it takes some effort to construct an expression with two parses but you can do it 00:16:23 ais523: does it involve rabbit ears and/or sparks? 00:16:27 yes, and arrays 00:17:38 I am fairly certain that Perl cannot be parsed. 00:17:57 orin: actually Perl is parsed by YACC 00:18:14 the only thing that's awkward is that Perl has a construct that runs as soon as it's parsed, and it can change the way that the rest of the file parses 00:18:19 and you can put arbitrary TC stuff in there 00:18:35 which makes parsing Perl undecidable, but in a rather mundane way 00:18:51 -!- magician has joined #esoteric. -!- Guest3780 has quit (Ping timeout: 252 seconds). -!- magician is now known as Guest3780. <-- I THINK E'S DOING IT WRONG HTH 00:18:55 Oh... so that's why only perl can parse perl 00:19:27 You need the whole language in the parser 00:19:35 yep 00:19:47 -!- vodkode_ has joined. 00:21:28 I thought it just had an ambiguous grammar with a lot of cases that are settled in an arbitrary way 00:21:53 Or is that C++ 00:23:34 C++'s grammar is not ambiguous. It's not context-free. It's not even context-sensitive 00:23:49 like Perl, parsing C++ is generally undecideable 00:25:56 Are templates turing-complete? 00:26:09 coppro: i think ambiguous is not inconsistent with undecidable hth 00:26:45 no wait they don't even need to be 00:27:19 in fact i think those are pretty orthogonal 00:27:57 coppro: er, really? 00:28:00 You just need to be able to make one that takes O(n^2) or worse time to decide whether some token A is a type or a value, 00:28:06 isn't template computation limited 00:28:14 I can't imagine what else you could exploit for that 00:28:17 elliott: constexpr 00:28:26 isn't constexpr sub-TC 00:28:28 no 00:28:33 okay 00:28:37 there's usually a recursion limit on templates, but except for that I think they are TC 00:28:37 how can you use it to mess with parsing? 00:28:51 also what olsner said 00:29:00 the limit is often "compiler's available memory" though 00:29:19 yeah but it's limited so. 00:29:21 as I understand it the "typename X" stuff is supposed to allow parsing to continue without template expansion 00:29:33 olsner: right, but that only works inside a template 00:29:45 coppro: can you show me an example of some C++ whose parsing does not terminate 00:30:32 So i guess that's me question. is it possible to make a C++ string which cannot be parsed in O(n) time 00:31:01 template struct foo { typedef int bar; }; template <> struct foo { static int bar; }; void fail() { int i; { foo::bar * i; } } 00:31:51 aha 00:33:29 the clang testsuite includes a UTM written with constexpr 00:39:25 it was more the implemention of does_TM_halt I was curious about, but 00:39:32 I guess constexpr is just underrestricted? 00:39:45 are you sure the standard doesn't specify some arbitrary implementation limit :p 00:39:49 I think constexpr is just "do arbitrary stuff at compile time" 00:39:51 (...are you sure C++ is actually TC) 00:41:53 C++ is not directly TC at run time 00:42:22 ais523: it wasn't intended to be TC; people who are bad at computer science theory were involved in the design and thought that they'd managed to make a version of constexpr which was powerful but not problematic. 00:42:28 but it was actually TC 00:42:33 ah right 00:42:49 powerful but sub-TC is a difficult line to walk 00:42:55 C/C++ are not TC only due to the limitation in memory 00:42:58 maybe aiming for primitive recursive is the best bet 00:43:24 and C is potentially TC because of the file API, nothing in C limits files to any particular arbitrary size 00:43:37 ah, right. But I mean without files. 00:43:59 and you can sort of consider it in a meta approach 00:44:14 where every time you get a memory error, you double the pointer size and retry 00:44:28 VLAs and recursion let you allocate arbitrary amounts of memory up to the size of the largest integer or size_t, whichever is smaller 00:44:48 actually you don't even really need recursion 00:51:14 coppro: is constexpr really more TC than runtime C++ 00:51:23 that is so dumb 00:51:53 not really, many languages are designed to require more power to compile than they do to run 00:52:11 just not normally in the "undecidable vs. TC" sense 00:57:25 elliott: Well, C++ is straight TC because of templates too. 00:57:38 those are limited though 00:57:50 so any portable C++ program can't use them to demonstrate TCness 00:58:16 Well yes, a C++ compiler can just bail on it. Alas. 00:58:46 But then a C compiler only has to handle a fairly small number of blocks. 01:03:57 I'm back 01:04:01 Dang nabt it 01:04:08 One entity is getting annoying 01:24:06 pikhq: really, thy don't have to heandle arbitrary nesting depth? 01:26:09 -!- vodkode_ has quit (Ping timeout: 256 seconds). 01:48:21 orin: Nope. 01:52:38 -!- hjulle has quit (Ping timeout: 264 seconds). 01:56:55 -!- boily has quit (Quit: CARDINAL CHICKEN). 02:05:37 -!- longbyte1 has joined. 02:05:38 -!- longbyte1 has quit (Remote host closed the connection). 02:13:57 -!- orin has quit (Ping timeout: 246 seconds). 02:30:57 -!- orin has joined. 02:34:13 -!- vodkode_ has joined. 03:53:22 I remember that my grandfather once told me he would call the President on the telephone and tell him to remove the word "I don't want" from the dictionary. (And yet we both live in Canada, eh?) 03:56:13 -!- ais523 has quit (Read error: Connection reset by peer). 03:56:20 -!- ais523 has joined. 03:58:37 I don't think the president has any authority with the dictionary 03:59:48 did you know that “( i+=2 < 3 )” means “( i+=(2 < 3) )” ? 04:00:29 yes 04:00:55 Yes 04:00:55 assignment has very low precedence 04:01:15 Taneb: Yes, I know, that isn't his job 04:01:52 i didn't... i just wrote a loop that never ended because of that >.> 04:03:50 -!- variable has quit (Ping timeout: 256 seconds). 04:04:17 Oh. yes, you can't replace i++ with i+=1 in the general case 04:04:21 [wiki] [[Special:Log/newusers]] create * 0x0dea * New user account 04:04:37 -!- barrucadu has quit (Ping timeout: 265 seconds). 04:06:33 apparently it's Greek Orthodox Easter 04:07:00 O, I didn't know when Greek Orthodox Easter was this year; now I can know! 04:09:11 I can tell because outside the window, they are having a ceremony with candles and singing 04:10:05 and a lot of bell ringing 04:10:41 seems like they've gone inside now though 04:20:22 [wiki] [[Beatnik]] http://esolangs.org/w/index.php?diff=42364&oldid=42363 * 0x0dea * (+419) Add alphabet program 04:20:41 -!- doesthiswork has quit (Quit: Leaving.). 04:30:04 izabera: I think the problem here is that you wanted to write an expression like (i+=2) < 3 in the first place 04:31:43 it's not like it's undefined behavior 04:32:04 I was assuming in a while statement 04:32:27 like while(i++ < n) 04:32:45 he changed it to while(i+=2 < n) to go two at a time 04:33:03 and was surprised when it didn't work 04:34:14 the pronouns people guess for some nicks will never cease to surprise me 04:36:38 Elliotte 04:36:43 i'm a girl 04:36:44 interesting. i bet it changes when people are asked what pronoun they'd use as opposed to writing with out thinking 04:39:31 -!- dianne has joined. 04:39:43 we should ask dianne what his opinion is 04:39:47 * oerjan runs away 04:41:32 ...? ^^; 04:41:34 Ok. dianne, do you think it's bad to write an expression like i += 2 < 3 in C? 04:42:26 This can be confusing because it means i += (2 < 3) instead of (i += 2) < 3 04:42:28 Someone's mistering the point here 04:43:17 ah, I personally wouldn't put an assignment there at all, but I'd rather not argue code aesthetics 04:43:27 `cc main(i){while(i+=2<3);} 04:43:44 No output. 04:43:59 `cat bin/cc 04:44:00 ​#!/bin/sh \ echo "$@" > /tmp/a.c && gcc /tmp/a.c -o /tmp/a.out && /tmp/a.out 04:44:05 it probably looped around 04:44:55 `` echo 'main(i){while(i+=2<3);}' >/tmp/a.c && gcc -c -std=c99 -Wall -Wextra /tmp/a.c 04:44:58 ​/tmp/a.c:1:1: warning: return type defaults to ‘int’ [enabled by default] \ /tmp/a.c: In function ‘main’: \ /tmp/a.c:1:1: warning: type of ‘i’ defaults to ‘int’ [enabled by default] 04:45:26 `` echo 'main(i){while(i&&i||i);}' >/tmp/a.c && gcc -c -std=c99 -Wall -Wextra /tmp/a.c 04:45:33 ​/tmp/a.c:1:1: warning: return type defaults to ‘int’ [enabled by default] \ /tmp/a.c: In function ‘main’: \ /tmp/a.c:1:1: warning: type of ‘i’ defaults to ‘int’ [enabled by default] \ /tmp/a.c:1:1: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] 04:46:01 um... also. I'm not a "he". 04:46:39 dianne: oerjan was making a joke because we were discussing how people guess pronouns 04:47:06 because I guessed "he" for "izabera" and I was wrong 04:47:18 heh it's np 04:47:40 * oerjan whistles a merry tune 04:48:08 oh, alright. I'm not really bothered, was just a bit confused. since, well, I didn't really see how, with my name... 04:48:16 I went a day without third-person pronouns once, just for fun 04:48:28 it's quite doable, I don't think anyone even noticed how weird the sentence structure gets sometimes 04:48:46 ais523: In Japanese they don't really have them 04:49:11 ais523: did you use a script to make sure not to slip up? 04:49:14 ais523, I use third-person pronouns exclusively. You might think it is quite odd, but I find it fun 04:49:35 oerjan: no, it was a spur-of-the-moment-thing 04:50:14 There's あの人 and あの奴 etc. but those are just phrases like "that person" or "that dude" 04:50:59 IIRC Hungarian doesn't have gendered third-person pronouns? which is why b_jonas' pronoun usage is so weird on occasion? 04:51:30 i haven't noticed anything wrong with b_jonas's usage... 04:52:03 but yes, there's only ő 04:52:12 finnish too 04:52:25 (hän iirc) 04:52:51 finnish merges them all into "it", right? 04:53:32 elliott: apparently, no, wiktionary claims it's only for humans 04:53:41 huh 04:53:44 oklopol lied to me, I guess 04:54:44 Oh, right there is 彼 and 彼女 but you don't hear people say it often, because they also mean "boyfriend" and "girlfriend" respectivley 04:55:29 Which is really weird, that a pronoun can shift in meaning like that 04:58:55 -!- barrucadu has joined. 04:59:08 http://shop.fsf.org/product/usb/ did you know they sell these? 04:59:44 Oooh, I did not 04:59:45 the english and swedish wiktionaries disagree on whether hungarian ő includes "it" 04:59:46 cute 04:59:56 "they" as in USB RNGs in general, or the FSF specifically? 05:00:08 well in this case fsf 05:00:21 i didn't know anyone sold these 05:00:24 I mean, I knew that USB RNG things were a thing, but not that the FSF sold them. 05:03:10 (norwegian/swedish/danish have four third person pronouns, because in addition to "natural" gendered pronouns, the _inanimate_ pronouns have _grammatical_ gender.) 05:03:19 http://shop.fsf.org/product/stuffed-baby-gnu/ 05:03:35 (well, singular) 05:03:51 stallman went to italy last september 05:03:57 he auctioned a stuffed baby gnu 05:04:01 have you recovered yet? 05:04:03 sold it for 80$ 05:04:05 Do they know speaking Italian? 05:04:09 http://shop.fsf.org/category/stuffed-gnu/ lots of things in the stuffed gnus category 05:04:19 zzo38: he spoke english 05:04:44 well he did that saint ignucius thing :D 05:04:54 it was fun 05:05:01 https://www.youtube.com/watch?v=YqgPyqyh4X4 05:05:05 If I want to go to Italy, I would want to learn speaking Italian though. 05:06:03 well it was just a trip for a conference o_o 05:06:29 i mean i'd like to visit japan eventually but i'm not going to spend 15 years learning japanese 05:07:55 that's not very much dedication, izabera 05:08:16 how will you understand what people are saying if you don't master japanese before going there 05:08:27 my dedication stops at watching subbed anime <.< 05:08:39 what's the plural of anime? 05:08:40 animes? 05:08:56 is anyone fansubbing literal real life japan 05:09:09 I too watched some sub anime such as Kaiji 05:09:18 I think it's "anime" if you don't want to be silly, "animes" if you do. 05:09:27 (I guess pedantically it'd be "anime series" or something in the first place anyway.) 05:09:48 hm that video was about twice as long as necessary. although more topical than expected. 05:10:00 I am (somewhat half-heartedly, I admit) trying to learn Italian for a trip I am planning later this year 05:10:02 Do you like to watch Akagi and Kaiji? 05:10:39 I watch anime without subtitles sometimes... I'm not good at it yet so I have to keep rewinding 05:10:46 * izabera teaches Taneb all her italian: pizza pasta mamma mia 05:11:00 izabera, that is not much italian 05:11:05 D: 05:11:05 izabera: bonjour 05:11:11 elliott: croissant 05:11:15 just kidding. that's spanish 05:11:19 elliott, that is less Italian 05:11:24 * oerjan swats elliott -----### 05:11:29 spanish is at least 14% italian. 05:11:33 cappuccino espresso latte macchiatto 05:11:59 elliott: if boily were here you'd be in for a mapole as well. 05:12:01 Buongiorno, donne e uomini (I think) 05:12:05 i'm sure. 05:12:05 elliott: actually 90% of the italians share that opinion 05:12:23 elliott, Italian and Spanish are at times mutually intelligible 05:12:32 izabera: I only say facts!! and true things 05:12:33 Taneb: that's very formal 05:12:41 Taneb: ciao ragazze e ragazzi 05:12:56 izabera, I am a very formal person, I sometimes even wear a tie 05:12:56 that's very informal 05:12:59 you lied, none of those words are pizza, pasta, or mamma. or mia. 05:13:09 omg ties are so 1800 05:13:44 I have never worn a tie in my entire life. 05:14:10 I have several ties, but I've mostly only worn them to operas 05:14:22 operas D: 05:14:23 and weddings I guess 05:14:42 well, on the good side, this channel makes me feel young 05:14:51 on the bad side, this channel makes me feel too young 05:15:01 Taneb is probably younger than you? 05:15:07 well idk maybe Taneb is old now 05:15:08 i'm 22 05:15:13 I am younger than yu 05:15:16 * elliott 19. 05:15:16 aww 05:15:17 *you 05:15:18 I am 20 05:15:20 fuck you :C 05:15:24 izabera: I was born may 10 1993 05:15:33 I am also younger than orin 05:15:35 ash holes ;-; 05:15:43 I'm sorry! 05:15:47 am I still the youngest person here? that would be weirder now than when I was 11 05:16:06 why have I been in this godforsaken channel for eight years 05:16:31 nothing better to do? 05:16:41 cheap internet? 05:16:49 free food? 05:16:50 elliott: maybe you're a supergenius 05:16:52 the former was true for a depressing number of years, more or less 05:16:58 you get free food here?? 05:17:10 elliott, there's a buffet by the mapole 05:17:19 I don't go near the mapole. 05:17:21 it's too dangerous. 05:17:21 izabera: 's ok i'm 44 05:17:30 *_* 05:17:37 thanks *.* 05:18:27 anyway I have been to like at least 8 operas 05:18:46 do they sell popcorn? 05:18:48 That is like, 8, more operas than I have been to 05:18:54 I went to an Operetta once 05:18:58 isn't cpressey older than you oerjan? 05:18:59 maybe not 05:19:10 Isn't monqy younger than you, elliott? 05:19:30 izabera: no, you're not allowed to eat during an opera, eating is noisy 05:19:47 bummer 05:19:47 elliott: i dunno... 05:20:03 Taneb: monqy was I think, yeah 05:21:16 if we're mentioning people who aren't _present_, i suspect Lil^WHe of a dozen names is also younger than elliott 05:21:56 maybe one of the people joining for esoterica stuff for like five seconds was, like, 60 05:21:59 am I helping, izabera 05:22:11 allot 05:22:25 elliott: don't you remember that COBOL guy? he was older than me 05:22:47 btiggins or something like that 05:22:56 wasn't Rugxlo or whatever his name was too 05:22:57 i don't know cobol but i know sed and sed is older :( 05:23:00 (with different actual letters) 05:23:28 sed older than COBOL? i'm skeptical. 05:23:29 just saying but I'm actually an immortal being who has been alive for ten thousand years and you're all whippersnappers 05:23:40 elliott, you too? 05:23:43 sed is the oldest language on unix 05:23:43 it's even older than unix actually 05:23:44 I thought I was the only one! 05:23:50 Taneb: get off my turf. 05:24:00 izabera, COBOL is, too 05:24:08 oh 05:24:14 COBOL dates to 1959 05:24:26 And is considerably older than sed 05:24:32 ok o_o 05:24:34 sorry then 05:24:46 that's like paleo-it 05:25:10 do you know lisp 05:25:13 that's from 1958 theoretically 05:25:33 only emacs users do 05:25:34 kind of like saying you know BCPL because you know C though 05:25:34 and i'm not 05:25:40 I use vim and know lisp :( 05:25:49 elliott, there's a buffet by the mapole <-- beware of the poutine 05:26:12 oerjan, what about the gazspacho? 05:26:41 okay sometimes I use emacs but rarely 05:27:02 i can C-x C-c 05:27:02 I know a little lisp but I am not very good at it 05:27:14 Ah, C-x C-c. the :wq of emacs 05:27:27 not sure if it's also w 05:28:10 it isn't 05:28:20 Taneb: that tastes szupérb 05:29:39 Taneb: i don't understand why they teach :wq instead of :x 05:29:51 or :xa 05:29:51 oerjan, I don't use vim, I am afraid 05:30:29 is :x like ZZ 05:30:52 if you guys use bash and its vi mode, you may like this 05:30:53 if shopt -oq vi; then 05:30:55 alias :{x,{,w}q}{,a}=exit :e=vim :h=man info='info --vi-keys' 05:30:58 fi 05:31:29 so that you can type :wq in your shell to exit 05:31:30 do you ever :wqa bash as opposed to just :qing it 05:31:31 elliott: ah indeed 05:31:46 elliott: actually _often_ 05:32:15 it's just a musclar reflex at this point 05:32:20 fair enough 05:33:08 http://shop.fsf.org/product/gnu-emacs-reference-mugs/ http://shop.fsf.org/product/signed-rms-photo-print/ 05:39:53 I am not one million years old 05:43:08 now I'm wondering if C-x C-c works in bash 05:43:11 it knows a lot of Emacs bindings 05:43:51 zzo38, very few people are 05:43:58 None, at a guess 05:45:18 -!- mbrcknl_ has joined. 05:46:02 binding C-c in bash is kinda hard since stty gets in the way 05:46:08 -!- edwardk_ has joined. 05:48:58 this does the job... stty intr ''; bind -x '"\C-x\C-c":exit' 05:49:21 i can't make it work without unsetting it for stty :\ 05:50:13 Did you ever win a Ig Nobel prize for proving that it is impossible to use complex numbers in accounting? 05:50:36 ...not yet 05:52:06 -!- sebbu has quit (*.net *.split). 05:52:09 -!- mbrcknl has quit (*.net *.split). 05:52:09 -!- skarn has quit (*.net *.split). 05:52:10 -!- edwardk has quit (*.net *.split). 05:52:10 -!- skarn_ has joined. 05:53:57 but soon? 05:54:10 eventually 05:54:19 -!- mbrcknl_ has changed nick to mbrcknl. 05:55:16 right after you learn japanese 05:55:21 I had proven such thing, but now I forgot how. Nevertheless it isn't what I was trying to do; I was trying to figure out how to use complex numbers in accounting, but instead I concluded it is impossible and also invented matrix accounting too due to that. It is possible to try to make one thing but you can make something else instead. 05:55:31 -!- edwardk_ has changed nick to edwardk. 06:25:16 -!- Sprocklem has quit (Ping timeout: 246 seconds). 06:31:33 -!- zadock has joined. 06:49:55 -!- Patashu has quit (Ping timeout: 265 seconds). 06:59:06 -!- CADD has quit (Ping timeout: 265 seconds). 06:59:44 -!- copumpkin has quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…). 07:00:34 [wiki] [[Beatnik]] http://esolangs.org/w/index.php?diff=42365&oldid=42364 * 0x0dea * (+327) Add infinite loop example 07:26:00 -!- zadock has quit (Ping timeout: 256 seconds). 07:40:56 "13 Pop a number and skip ahead n (actually n+1) words if the number is zero." 07:41:02 so... what n? 07:42:03 -!- sebbu has joined. 07:42:42 -!- sebbu has quit (Changing host). 07:42:42 -!- sebbu has joined. 07:43:30 off by one horror 07:44:40 that too 07:44:53 but what is n if it's not "the number" 07:46:26 the one thing i can think of is that possibly he means the +1 to be the "normal" word increment after any instruction 07:47:07 * oerjan paranoidly checks author name, whew looks male 07:47:18 yeah, but as i said: that's not what bothers me 07:47:28 oh 07:47:35 i don't get what the hell n is 07:47:59 if n is in fact "the number", 13 is just a nop 07:48:22 oh hm 07:48:25 "Note that the commands corresponding to values 5, 13, 14, 15, and 16 each read an extra word and use it as a parameter (then skip it)." 07:48:37 ah 07:48:48 maybe it's that skip that's the +1, then 07:50:45 hm "but it ought to be able to simulate any Push-down automaton" 07:51:45 i'm suspicious that it might not be able to do sufficiently complicated flow control because the size limits also affect jump distance 07:52:47 what size limit 07:53:23 well in this case, the max scrabble score, i guess 07:54:00 the examples mad3 me think you could do arbitrary long words 07:54:35 but longer programs might not quite look like real sentences 07:54:55 hm the interpreter doesn't enforce dictionary words 07:55:09 but the examples are, aren't they? 07:55:38 what you _could_ do is jumping backwards to a position that jumps backwards 07:56:26 you just have to jump over them if you read forward 07:56:46 yes, but you'd get a traffic jam, essentially, if you had too many paths 07:57:45 indeed 07:58:01 but i am not quite sure if this is really not tc 07:58:26 tc it is not. there is no infinite memory other than the stack. 07:58:40 the question is whether you can get all pushdown automata. 07:58:54 (deterministic) 07:59:13 8 is , and 9 is .; 5 1 7 is + and 5 1 10 is - 07:59:54 [ and ] _should_ be able to translate into 13-16 07:59:54 myname: |ill-formed number 08:00:03 the problem is > and < 08:00:16 if you had a second stack, it could be tc 08:00:31 oh for the other size limit, "and since data items are finite (integers from 0 to 255)" 08:00:58 well, that holds true to bf too, doesn't it? 08:01:31 yes in many versions 08:01:58 but the thing is, without a cell limit you don't need unlimited number of cells 08:02:07 isn't .,+-[] enough for a push-down automaton? 08:03:06 but you don't have general [] if you don't have arbitrary long words 08:03:14 if you do, then probably. 08:06:01 http://cliffle.com/esoterica/beatnik.html looks a bit different from the esolang description 08:06:31 and explains your original question clearly 08:08:08 i like the second paragraph 08:14:37 -!- MoALTz has joined. 08:22:10 -!- dianne has quit (Quit: byeannes). 08:22:26 [wiki] [[Beatnik]] http://esolangs.org/w/index.php?diff=42366&oldid=42365 * Oerjan * (+189) /* Computational class */ Quibble on PDA 09:00:38 -!- Phantom_Hoover has joined. 09:06:13 -!- roman2 has joined. 09:06:20 fnord morning everybody 09:07:09 -!- vodkode_ has quit (Remote host closed the connection). 09:11:38 ais523: in ayacc, consider making it possible to have multiple start symbols to choose from when you start the parser, at least in the non-compatibility interface? I believe currently you have to emulate that by injecting an extra terminal symbol at the start from the tokenizer, which is fine for theory but ugly. 09:12:00 it shouldn't be too hard to implement, at least 09:12:15 yep 09:12:31 the problem is that that would require some sort of syntax extension, or else to compile all possible start symbols 09:13:01 the syntax extension could be a new declaration type 09:13:15 or even just multiple copies of %start declarations 09:13:24 hmm no, it's not so easy 09:13:39 it's not clear how you'd decide from them in the C entrance interface 09:16:45 of course, all these extra features are less important. the most important thing is that ayacc should always generate correct output, even for unusual grammars. 09:18:00 -!- zadock has joined. 09:18:20 -!- ais523 has quit (Read error: Connection reset by peer). 09:18:31 -!- ais523 has joined. 09:20:28 if it can do that, than this will probably already be worth to use over bison 09:20:36 [wiki] [[User:Rdococ/Esolangs]] M http://esolangs.org/w/index.php?diff=42367&oldid=22963 * Rdococ * (+129) Updated user page. 09:22:45 ais523: oh by the way, how will the license of this work? if I have a constant grammar, can I put the C code output under public domain? 09:23:11 and is the generated C code output portable, not depending on specifics of the system, so this can be done usefully? 09:23:32 b_jonas: unlike flex, the output is going to be direct-coded and have hardly any verbatim copies from the input file 09:23:36 err, unlike bison 09:23:44 so the output will probably be licensed the same way as the input 09:23:50 good 09:24:37 (even if it does have verbatim copies from a template, that template could be in public domain while ayacc as a whole is licensed differently. that's how autotools works I think.) 09:25:36 -!- hjulle has joined. 09:25:45 autotools works vaguely like that but unnecessarily complicated, I think 09:29:24 07:54 < elliott> finnish merges them all into "it", right? ← well, kinda. there's hän which is only for humans and se which is for everything 09:29:42 generally using se for humans is less formal 09:34:24 incidentally, normal parsing theory seems to make a distinction between shift actions and goto actions 09:34:33 I consider them to be the same, and they are in many cases 09:34:40 but added a few of my own for optimization purposes 09:34:50 shift_and_reduce actions, degenerate reduce actions, cast actions 09:35:19 and indirect actions, which basically just combine the common code of two states that are almost but not quite identical 09:35:37 wow, so many optimizations 09:35:48 now you'll need a big testsuite for this, which isn't easy 09:37:18 I'm using C-INTERCAL ;-) 09:37:35 also, it seems that there's a name for the sort of implementation I'm using: https://en.wikipedia.org/wiki/Recursive_ascent_parser 09:37:48 but the optimizations make it look less messy than what's shown there 09:38:18 oh, C-intercal is a nice idea 09:38:34 INTERCAL is a pain to parse 09:38:39 so it makes for a good parser testsuite 09:38:50 um yes, but some of that pain is in the lexer, isn't it? 09:38:57 or the non-yacc part in general 09:40:12 hardly any 09:40:32 the only help the grammar needs from the lexer is to identify whether a spark/ears is necessarily opening, or could be closing 09:41:43 (in the case of "could be closing", it's assumed that it isn't ever opening; this is the hack that removes ambiguity and makes the language LALR(1) in the first place, and it's mentioned in the INTERCAL-72 manual) 09:42:41 don't you have to disambiguate between overlapping keywords like DO NOT GIVE UPLEASE ,3 <- #0 09:43:31 possibly technically we have to, but we don't currently 09:46:01 oh, btw, here's a sample warning message: 09:46:07 ayacc: warning: shift/reduce conflict on symbol ELSE at t.y line 8 09:46:08 ayacc: info: conflict is reached after, e.g., IF expr THEN IF expr THEN stmt . ELSE 09:46:10 ayacc: info: to resolve the conflict: specify a precedence for ELSE and THEN 09:46:18 so much better than bison :-) 09:46:45 nice 09:46:48 indeed much better 09:46:57 [wiki] [[Folder]] N http://esolangs.org/w/index.php?oldid=42368 * Rdococ * (+1274) New esolang! 09:47:10 does posix yacc or bison or ayacc guarantee to not read the lookahead token if you can decide which rule to run without the lookahead? 09:47:42 the example is sometimes badly wrong in the case of a reduce/reduce conflict, but that's because due to deficiencies of LALR(1), sometimes there is no example and the conflict's completely spurious 09:48:05 yeah 09:48:15 and yes, there's a guarantee to not read into the lookahead token if the current state unconditionally reduces and always by the same rule 09:48:18 that's when the grammar is LR(1) but not LALR(1) 09:48:20 although I'm optimizing those states out entirely 09:48:24 [wiki] [[User:Rdococ/Esolangs]] M http://esolangs.org/w/index.php?diff=42369&oldid=42367 * Rdococ * (-46) 09:48:28 that's what a shift_then_reduce action is for 09:48:44 because you aren't reading the lookahead token anyway, no need to actually run the logic of the state in question 09:48:47 ais523: good, but guarantee in what? posix yacc too, or only ayacc? 09:48:52 guarantee in posix yacc 09:48:56 ok 09:49:51 took me a while to find where it says that (it's near the end), but it does 09:50:02 I assume that guarantee exists because it's practically useful 09:50:06 because it does make things less consistent 09:50:27 you'd think rules would prefer to know that the lookahead token had always been read, rather than sometimes being read and sometimes not 09:50:38 yes, it's practically useful, both for reading interactive input, and for crazy stuff like that seeking tokenizer I've shown yesterday 09:50:40 [wiki] [[User:Rdococ]] M http://esolangs.org/w/index.php?diff=42370&oldid=40356 * Rdococ * (+121) 09:50:54 (actually just a head seeking in the tokenized stream) 09:51:08 and no, I wouldn't prefer it always read 09:51:29 (that would be even worse in that hypothetical LALR(2) mode) 09:51:34 -!- rdococ has joined. 09:51:50 indeed 09:51:55 that would just lead to kludges like emitting two tokens when a newline is read interactively 09:52:54 hi guys 09:55:10 uh... I have an article about an esolang -- it explains everything while being a really short stub... what should I do? 09:56:18 post it anyway and put {{stub}} at the start 09:56:32 unless the esolang is the sort of esolang that's impossible to spend more than a couple of sentences describing 09:56:33 okay 09:56:38 in which case it should probably be on the joke languages list 09:57:06 it's possible to program in, it's equivalent to a finite state automaton. However, it does only take a couple of sentences to describe it. 09:57:19 should I add it to the joke language list anyway? 09:57:35 I'm pretty sure 'joke' means something other than just 'really short stub'... 09:57:43 anyway, I'm rambling now, thanks 09:58:13 if it's possible to program in, it's not a joke 09:58:14 rdococ: maybe add some example programs to make it longer? 09:58:20 [wiki] [[Folder]] M http://esolangs.org/w/index.php?diff=42371&oldid=42368 * Rdococ * (+9) 09:58:22 or well, if it's possible to program in /and/ possible to implement 09:58:42 it's a bit like Text in the fact it's already implemented. 09:58:42 oh yeah, add an implementation too 09:58:44 note that this is sufficient to not be a joke, but not necessary, some non-joke languages would be hard or impossible to program in 09:58:48 or to implement 09:59:36 you know Text, where there are already programs to interpret it? well my esolang is like that, but it's got better computation power. 09:59:51 *not saying it's better, I should've reworded that 10:00:03 Text probably counts as a joke 10:00:31 rdococ: then add links to implementations to the description of the language 10:00:32 I don't think mine is a joke... not too much of one, anyway 10:01:34 b_jonas: but the point is, everyone already has an implementation - the language's like Text in that way 10:02:00 Text -> most OSes already have an implementation. Folder -> same thing. 10:04:50 [wiki] [[Beatnik]] http://esolangs.org/w/index.php?diff=42372&oldid=42366 * Oerjan * (-175) I convinced myself I was wrong about unlimited word length being needed 10:16:58 -!- ais523 has quit (Read error: Connection reset by peer). 10:16:58 -!- callforjudgement has joined. 10:17:02 -!- Patashu has joined. 10:17:30 [wiki] [[Folder]] M http://esolangs.org/w/index.php?diff=42373&oldid=42371 * Rdococ * (+10) Some people have to double-click to open stuff, so 'any user can click one of the transitions' is technically incorrect and might cause confusion. 10:18:31 that language works much better with symlinks/junctions 10:19:08 at that point, it's basically just a funky encoding for an FSM, or is it a PDA? 10:19:56 -!- callforjudgement has changed nick to ais523. 10:20:04 rdococ: actually this is much more complex than it looks 10:20:31 because symlinks don't work quite the same way as shortcuts, and I think it may make a difference to computational power 10:20:46 to be honest, I've never heard of symlinks. 10:20:53 but continue, I'm intrigued. 10:21:17 well, a "shortcut" isn't a filesystem feature, it's a feature of the Windows graphical shell 10:21:49 and when you follow a shortcut, Explorer opens up a specific file or directory or other shell object for you (the internal name is "shell links") 10:22:08 a symlink, meanwhile, is a filesystem feature, it basically forms an asymmetrical alias 10:22:42 ais523: why is it a difference in computational power; and the shell can treat symlinks in at least two ways in some operations I think 10:23:21 e.g. if I create a symlink "a" pointing at "../b/c" in "/d/e", then "/d/e/a" is a different name for the same file as "/d/b/c" 10:23:31 however, the two names are treated as distinct for some purposes 10:23:50 and knowing what those purposes are is probably important to know if this is an FSM or PDA, and I can't remember offhnad 10:24:16 b_jonas: basically, you can't construct unboundedly long paths with shortcuts 10:24:19 you can with symlinks 10:24:34 so the PDAness is based on whether there's some way to /read/ the path using only the basic operation of Folder 10:25:18 or, I mean, it's above FSM because you can just use shortcuts to .. to do bracket matching 10:25:27 but I'm not sure if you get an actual PDA stack, or just a coutner 10:25:36 bracket matching? 10:25:40 I'm leaning towards PDA at this point 10:25:54 rdococ: given a string consisting only of ( and ) characters, determine whether they match correctly 10:26:05 an FSM can't do that, but it's trivial for almost any PDA implementation 10:26:13 so you're saying my esolang could be a PDA instead of an FSM? 10:26:16 yep 10:26:19 but it may depend on the oS 10:26:21 *OS 10:26:27 well this is interesting 10:26:36 proving languages that people think are FSMs are actually PDAs is one of my hobbies 10:26:42 e.g. Keymaker-Splinter 10:27:03 are you entirely sure, or is it going to be controversial? 10:27:12 hehe “< ais523> proving languages that people think are FSMs are actually PDAs is one of my hobbies” 10:27:21 can we add this to a quotation bot? 10:27:32 if you want to 10:27:35 I don't see why it would be a PDA though 10:27:37 rdococ: I'm not 100% sure 10:27:53 I currently think it's more than 50% likely but can't be much more confident than that 10:28:09 but this is mostly based on deficiencies in my understanding of symlinks, rather than in my understanding of PDAs 10:28:16 I don't think languages can be FSMs or PDAs. They can be capable of expressing FSMs or PDAs, sure, but a language is not a program 10:28:20 directory hardlinks add an extra layer of complication 10:28:29 Taneb: I elided "equivalent in power to" 10:28:30 sorry 10:29:32 -!- copumpkin has joined. 10:29:43 what if I use shortcuts only? 10:29:47 but directory hardlinks shouldn't exist 10:30:09 wait, you said... 10:30:11 okay 10:32:47 ais523: what's your username on the wiki? I want to credit you on the talk page 10:33:11 ah, found it 10:34:31 I still don't see how it could be more powerful than a fsm. 10:34:31 should I call you a he or a she? 10:35:03 Speaking of symlink-related computing, http://www.linusakesson.net/programming/symlinks/index.php 10:35:05 i was about to say 'his name is alex, so...' and then i realised that doesn't help at all 10:35:16 if it could do the stuff a PDA can do, I wonder if it could combine the computational power of both. 10:35:54 from what I think, he might be male. But maybe that's just a cultural bias, and I don't really mind. 10:36:08 maybe I should use the singular 'they' 10:38:06 uh... tell me 10:38:21 he's very definitely male, though 10:38:33 okay, I'll trust you 10:40:06 [wiki] [[Talk:Folder]] N http://esolangs.org/w/index.php?oldid=42374 * Rdococ * (+376) My esolang is more interesting now, I guess...? 10:43:14 -!- oerjan has quit (Quit: Something). 10:45:15 [wiki] [[Folder]] http://esolangs.org/w/index.php?diff=42375&oldid=42373 * Rdococ * (+586) Updated definition a bit, updated computational class. 10:46:09 [wiki] [[Folder]] M http://esolangs.org/w/index.php?diff=42376&oldid=42375 * Rdococ * (+0) Fixed incorrect link. 10:47:28 rdococ: I tend not to use gendered pronouns when talking about myself in the third person 10:47:40 but yes, my gender is possibly too well-known by now 10:48:48 usually I'm not that fussed about revealing my gender... 10:49:47 when do you talk about yourself in third person? writing a cv or something? 10:50:01 * ais523 talks about themself in the third person 10:50:35 oh, so self-referencing statements 10:50:54 "talking about myself" tends to be self-referencing. 10:53:07 wait... can't you add flags to a shortcut link like -r for shutdown - atleast in windows? 10:54:10 (ik it's not limited to shortcuts, but it sounds interesting) 10:54:56 rdococ: you can, because Windows shortcuts are kind-of complex 10:55:01 and badly designed in many ways, too 10:55:47 well, they're sort of a carry-on from windows 95, and in some ways maybe even from windows 3.1 10:55:58 they probably made sense back then 10:56:03 huh... does that add any extra computational power or can you just emulate the behavior in an FSA? 10:56:29 -!- Koen_ has joined. 10:57:07 -!- nszceta has joined. 11:01:21 I still don't know what 'use shortcuts to do bracket matching' means 11:05:27 -!- rdococ has quit (Ping timeout: 246 seconds). 11:09:41 -!- rdococ has joined. 11:12:48 -!- zadock has quit (Ping timeout: 264 seconds). 11:13:20 rdococ: maybe set your text editor up to automatically insert a matching ')' after the cursor when you type '(' 11:13:58 ? 11:14:38 -!- vodkode_ has joined. 11:15:22 why? 11:18:05 I don't know that would be a shortcut 11:20:02 [wiki] [[Folder]] M http://esolangs.org/w/index.php?diff=42377&oldid=42376 * Rdococ * (-387) Simplified explanation a little 11:20:30 huh? chrome messed up on me, so I can't see the chat history 11:20:42 still don't know what you mean 11:21:52 anyway, do you know if my programming language is a FSA or a PDA? 11:25:35 -!- zadock has joined. 11:36:03 -!- zadock has quit (Ping timeout: 265 seconds). 11:44:14 Any tips on draining an ocean 11:45:59 orin: there is no spoon 11:46:05 I guess I need to have as much drain bandwidth as there is water coming in? 11:46:26 is this dwarf fortress? 11:46:33 orin: don't rush it, start slowly, then speed up but not much 11:47:16 -!- AndoDaan has joined. 11:47:33 -!- AndoDaan has left. 11:47:50 Yeah in DF. 11:48:15 -!- AndoDaan has joined. 11:48:19 I'm trrying to drain an underground ocean to get at some rare minerals 11:48:34 -!- zadock has joined. 11:52:12 -!- yump has joined. 11:53:43 -!- yump has quit (Client Quit). 11:57:43 orin, cavern lakes fill from any open tiles at the edge of the map 11:57:54 draining them entirely is very hard and will kill your fps 11:58:14 probably the most practical way of making an area accessible is to pour magma over it 11:59:18 -!- zadock has quit (Ping timeout: 250 seconds). 12:00:58 -!- vodkode_ has quit (Ping timeout: 256 seconds). 12:01:57 -!- AndoDaan has quit (Ping timeout: 256 seconds). 12:09:45 [wiki] [[Hello world program in esoteric languages]] http://esolangs.org/w/index.php?diff=42378&oldid=42362 * SuperJedi224 * (+263) 12:12:23 -!- zadock has joined. 12:14:34 -!- Patashu has quit (Quit: Soundcloud (Famitracker Chiptunes): http://www.soundcloud.com/patashu MSN: Patashu@hotmail.com , AIM: Patashu0 , YIM: patashu2 , Skype: patashu0 .). 12:21:00 [wiki] [[Folder]] M http://esolangs.org/w/index.php?diff=42379&oldid=42377 * Rdococ * (-35) Not sure, with the requirements and specifications, that the argument for PDA holds. However, there's still discussion. 12:21:56 [wiki] [[Talk:Folder]] M http://esolangs.org/w/index.php?diff=42380&oldid=42374 * Rdococ * (+17) 12:21:57 -!- zadock has quit (Ping timeout: 256 seconds). 12:25:30 [wiki] [[Talk:Folder]] http://esolangs.org/w/index.php?diff=42381&oldid=42380 * Rdococ * (-137) Rewritten the talk message 12:27:23 [wiki] [[Folder]] M http://esolangs.org/w/index.php?diff=42382&oldid=42379 * Rdococ * (+0) capitalized 'F' in 'Folder program' and 'Folder programming language' 12:33:06 [wiki] [[Folder]] M http://esolangs.org/w/index.php?diff=42383&oldid=42382 * Rdococ * (+92) Changes to the computational class section 12:34:00 [wiki] [[Folder]] M http://esolangs.org/w/index.php?diff=42384&oldid=42383 * Rdococ * (+0) Minor change to the link to the talk page. 12:34:38 -!- zadock has joined. 12:46:12 -!- zadock has quit (Ping timeout: 252 seconds). 12:50:15 “probably the most practical way of making an area accessible is to pour magma over it” -- hehe, sounds strange 12:57:44 -!- izabera has changed nick to greybera. 12:58:47 -!- zadock has joined. 13:02:21 -!- idris-bot has quit (Ping timeout: 245 seconds). 13:02:51 -!- Melvar has quit (Ping timeout: 264 seconds). 13:09:16 b_jonas: dwarf fortress? 13:10:18 -!- zadock has quit (Ping timeout: 265 seconds). 13:11:10 -!- Melvar has joined. 13:11:41 -!- idris-bot has joined. 13:12:50 -!- greybera has changed nick to izabera. 13:17:47 !!science!! 13:18:57 "The Black Buoy has been painted yellow to avoid collisions." 13:19:28 Still called the Black Buoy, apparently. 13:20:37 -!- ais523 has quit (Read error: Connection reset by peer). 13:20:45 -!- ais523 has joined. 13:23:20 Well, it's going well so far. I haven't got down to magma yet, so I'm digging large width drainage channels 13:24:41 Later if I get magma, I'll pour it over the edges where the water comes in, so I can excavate more 13:27:09 So far some of the seabed is at 1-2 13:29:58 The next one I'm opening is 15 squares wide 13:32:22 -!- dianne has joined. 13:36:44 (that is, the entring wter is 15 wide, so the drain needs to be nearby and 15 wide) 13:38:42 -!- nszceta has quit (Quit: Textual IRC Client: www.textualapp.com). 13:39:53 -!- nszceta has joined. 13:42:30 -!- ais523 has quit. 13:43:39 I guess if magma is !!SCIENCE!! then what I'm doing is !!ENGINEERING!! 13:49:16 uhm... 13:49:47 Anyway if all goes well I'll soon have acess to a green ore called "garnierite" which I assume can be smelted into shampoo 13:55:15 -!- copumpkin has quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…). 13:59:57 http://snag.gy/gHJOc.jpg 14:01:55 [wiki] [[User talk:Esowiki201529A]] http://esolangs.org/w/index.php?diff=42385&oldid=41658 * Esowiki201529A * (+41) /* vandalismScript */ new section 14:04:00 [wiki] [[User talk:Esowiki201529A]] http://esolangs.org/w/index.php?diff=42386&oldid=42385 * Esowiki201529A * (+45) /* vandalismScript */ 14:08:02 [wiki] [[User talk:Esowiki201529A]] http://esolangs.org/w/index.php?diff=42387&oldid=42386 * 101.226.125.113 * (+150) /* VandalismScript */ 14:11:54 [wiki] [[User talk:Esowiki201529A]] http://esolangs.org/w/index.php?diff=42388&oldid=42387 * Esowiki201529A * (+0) /* Hello, World */ 14:17:02 [wiki] [[User talk:Esowiki201529A]] http://esolangs.org/w/index.php?diff=42389&oldid=42388 * Esowiki201529A * (+36) /* VandalismScript */ 14:22:44 [wiki] [[User talk:Esowiki201529A]] http://esolangs.org/w/index.php?diff=42390&oldid=42389 * Esowiki201529A * (+28) /* Cat Program */ 14:26:56 [wiki] [[User talk:Esowiki201529A]] http://esolangs.org/w/index.php?diff=42391&oldid=42390 * Esowiki201529A * (+14) /* Hello, World! */ 14:36:45 [wiki] [[Folder]] http://esolangs.org/w/index.php?diff=42392&oldid=42384 * Esowiki201529A * (-1528) 命名冲突 14:40:03 [wiki] [[Folder]] http://esolangs.org/w/index.php?diff=42393&oldid=42392 * Esowiki201529A * (+1528) Undo revision 42392 by [[Special:Contributions/Esowiki201529A|Esowiki201529A]] ([[User talk:Esowiki201529A|talk]]) 14:49:52 -!- bixnode has quit (Ping timeout: 276 seconds). 14:53:56 -!- EVANGELIS has joined. 14:55:31 mk 14:56:01 :-$ 14:57:45 -!- EVANGELIS has left. 15:10:22 -!- codeitagile has joined. 15:40:52 -!- copumpkin has joined. 15:52:58 -!- GeekDude has joined. 16:21:45 [wiki] [[Hexadecimal Stacking Pseudo-Assembly Language]] http://esolangs.org/w/index.php?diff=42394&oldid=42339 * 0x0dea * (+236) Add Ruby interpreter 16:35:54 Forensic I.T.! My mother lost a ring, so I pointed out we can tell when she lost it by looking at her numreous facebook pictures 16:38:22 !!! wut, some vandal deleted my article and put it back? 16:41:23 I translated the weird comment on the person that deleted the stuff on my article. Translated, it's "Naming conflicts"... Was he meaning to make a language called 'Folder' too?! 16:47:39 I wouldn't worry about it... maybe it was a mistake 16:50:15 esowiki201529a makes a lot of weird edits 16:50:41 I'm not sure what they're doing. 16:51:03 they don't seem to be an obvious vandal. maybe just a non-native speaker with some weird ideas about the wiki >_> 16:51:33 what's that emote at the end for?! 16:51:51 it's not his fault he's a foreign speaker 16:52:00 I didn't mean to imply that, sorry. 16:52:11 okay 16:52:41 it was more a >_> of "they tried to rename my language out of the blue by editing the page and moving it once" :P 16:53:38 (I also didn't think that they might be a non-native speaker before that edit, since all their previous edits were in English if anything.) 16:54:35 huh... 16:57:51 I suspect the "naming conflict" thing was pointing out that there was already a language called "Folder", anyway. 16:57:54 not that that's a problem 16:58:07 there was? 16:59:04 I don't think there's a uniqueness requirement for esolang names. 16:59:18 oh right... 'Folders'... 16:59:33 no problem about that 16:59:59 they're pretty different... but this is interestin 17:00:01 g 17:00:52 er, "Folders", sorry. 17:00:54 I meant to type that. 17:04:45 well that's certainly interesting 17:09:20 [wiki] [[Folder]] M http://esolangs.org/w/index.php?diff=42395&oldid=42393 * Rdococ * (+24) added distinguish tag because of naming conflicts 17:11:10 [wiki] [[Folder]] M http://esolangs.org/w/index.php?diff=42396&oldid=42395 * Rdococ * (+19) So there's no distinguish tag... 17:15:04 -!- copumpkin has quit (Ping timeout: 244 seconds). 17:15:50 -!- codeitagile has quit (Remote host closed the connection). 17:16:42 uh... is that 'not to be confused with' necessary? 17:21:30 -!- copumpkin has joined. 17:22:16 [wiki] [[POGAACK]] http://esolangs.org/w/index.php?diff=42397&oldid=41281 * 92.81.166.144 * (+31) 17:29:30 probably not 17:29:38 it doesn't hurt and might be useful but if you really don't want it there you can remove it 17:30:03 I guess it could be confusing because they both have broadly similar concepts. 17:32:34 true 17:35:20 [wiki] [[Folder]] M http://esolangs.org/w/index.php?diff=42398&oldid=42396 * Rdococ * (-43) 17:35:38 probably should've done some kind of undo function 17:35:47 if there is one, but nevermind 17:36:52 I have an idea... File! 17:38:49 -!- nszceta has quit (Quit: Textual IRC Client: www.textualapp.com). 17:58:29 hmm 18:03:04 History book titles from the future 18:04:05 Folder is such an easy programming language... now I just need a hard one 18:04:09 ``Trigger Warning, Don't like don't look: The subjective reality of the early 2000s 18:04:39 ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: `Trigger: not found 18:05:22 God damn it those are opening quotes not... agh 18:05:27 I wonder, could a language based on algebra and logic be turing complete - or even an unknown computational class? 18:05:50 Uh, Is prolog turing complete, I forget 18:06:12 I think so, because I read somewhere datalog was supposed not to be 18:06:42 'pure' prolog, whatever that would mean, yes 18:08:58 !! I know! functional bf? 18:08:58 How exciting! 18:08:58 thanks egobot 18:09:41 -!- nszceta has joined. 18:14:24 -!- variable has joined. 18:16:12 what other definitions of programming languages could already be interpreted by applications everyone has? 18:17:25 wait... if you can go on hyperlinks to go to other web pages, could you put links to other program states in a program state written as a .html file?! 18:18:11 so a folder containing HTML files can simulate an FSA. 18:18:26 even if it has no JS, or CSS, etc. 18:18:34 there are like ten languages identical to https://esolangs.org/wiki/Text on the wiki 18:18:37 if you count that 18:18:58 can you show me one 18:19:05 I just did; the one I linked. :p 18:19:08 https://esolangs.org/wiki/Wiki_Cyclic_Tag is more interesting 18:28:18 [wiki] [[Object oriented thue]] http://esolangs.org/w/index.php?diff=42399&oldid=40557 * 4D enthusiast * (+263) /* stdio */ added HexOutput & HexInput classes 18:29:33 [wiki] [[Object oriented thue]] M http://esolangs.org/w/index.php?diff=42400&oldid=42399 * 4D enthusiast * (+0) /* stdtime */ corrected spelling of "hexadecimal" 18:56:01 -!- copumpkin has quit (Ping timeout: 264 seconds). 19:09:54 -!- GeekDude has quit (Remote host closed the connection). 19:14:04 [wiki] [[Talk:Folder]] M http://esolangs.org/w/index.php?diff=42401&oldid=42381 * Rdococ * (+296) updated discuss page... why did nobody post here 19:24:58 can i ask a stupid question about brainfuck? 19:25:14 give it a shot and we'll see 19:25:22 izabera: that was an excellent try 19:25:28 lol 19:26:00 well i'm trying to learn it, just what happens when you move the pointer before the 0th cell? 19:26:22 is the tape supposed to be infinite in both directions? 19:26:37 ah. lovely undefined behavior 19:26:57 originally, the tape was onesided. but it depends on the implementation. 19:27:27 I wonder if that makes a difference in the computational class of bf 19:28:17 well what's the most common implementation? 19:28:24 rdococ: It's Turing-complete either way (assuming an infinite tape). 19:28:38 are you sure it's infinite, or do you mean unbounded? 19:29:25 it would be interesting to see a programming language using infinite tape, such that there's an address 'infinity' 19:29:37 izabera: I would treat it as an error 19:29:41 I think that is the usual behaviour, too. 19:29:50 ok thankies 19:30:01 "right-infinite tape, 8-bit values in cells, 0 on EOF" is what I would consider most standard, personally 19:30:04 izabera: I believe most commonly stepping off the tape to the left is either an error, or does really funny things (the implementation used on the anagol site puts input data there...) 19:30:14 rdococ: I meant infinite 19:30:16 izabera: in some implementations going < lets you access your own source code and modify it(!!) 19:30:26 yeah, like int-e said. 19:30:30 rdococ: that's fine, because the Turing machine is a theoretical construction. 19:30:50 (I'm not sure if the modifications actually take effect, but I think they do.) 19:31:49 hmm 19:32:21 would it be ok for an implementation to only have 2**63-1 cells? 19:32:38 it wouldn't be TC but it'd be fine yes 19:32:40 (the unbounded/infinite distinction is a silly computer science one; it's silly because in practice, one still runs into address space limits with things of "unbounded" size.) 19:32:42 the original only had 30k cells 19:33:01 not like there's many people with more than 64 bits of addressable memory 19:33:05 hmm 19:33:11 (current CPUs can't even address that much if they wanted to) 19:33:30 I wonder if there's such thing as an infinite state automaton, whether it's turing complete or not 19:34:30 a turing machine :p 19:35:23 you would use regular expressions to define an infinite number of states, and then you could use those regexp-caught areas to transition to another one of many states 19:37:15 e.g. string [x] --- concatenate [y] ---> string [x][y] where [x] and [y] are wildcards 19:37:24 Hmm, 48 bits addresses everywhere. (Even ATA addresses 512 byte blocks with 48 bit addresses) 19:37:50 so if the state was 'string derp', going 'concatenate herp' would change the state to 'string derpherp'. 19:39:39 izabera: note that if you had a program which went > 2^63-ish times and then did some random stuff it'd "only" take ~97 years to run 19:39:49 but since it wouldn't store anything in the cells on the way technically you could run it on a normal machine 19:40:02 (e.g., one that uses a hash table to store the tape sparsely, omitting 0s) 19:40:24 so there are programs which address a cell past 2^63 without requiring that much addressable memory that we can feasibly run today if we really, really want to 19:40:24 i'm writing an interpreter to learn it 19:40:27 in bash 19:40:28 (this is beyond irrelevant) 19:40:39 (~97 years assuming we can move right on the tape at 3 GHz) 19:40:52 okay well what about all the people who want to spend 100 years running a useless brainfuck program using bash, izabera. :( 19:41:10 fuck them \o/ 19:41:11 | 19:41:11 >\ 19:41:40 my enterprise will not be investing in your software product 19:45:53 true, even bitcoins might be a better investment than that... 19:46:12 it would be interesting to see a programming language using infinite tape, such that there's an address 'infinity' 19:46:28 easy enough, the interesting part is how you get to infinity 19:47:03 "^ -- change address to omega^" 19:47:16 2*omega 19:47:58 think of it like having unboundedly many unbounded tapes - one starts from 1, another starts from omega, another starts from 2omega^3. 19:48:10 (the real problem is that with no way of going down, the operation amounts to just clearing the tape) 19:48:40 you could change address to /omega 19:49:12 so you'd have omega+1, 3omega, 65omega+23, etc. I don't know about exponents though. 19:49:31 in other words, 2d tape 19:49:36 (bitcoins, I'm somewhat amazed that the hashing rate is not dropping. oh well...) 19:50:02 hmm 19:50:08 that gave me an idea 19:50:43 if a machine is a feedback system, user --input--> machine --output--> user, why not describe it like that 19:51:14 that could be like an equation or something: y = 3x^2 -- the user puts in a number x, and comes out 3x^2 19:51:15 elliott, in the moving right 2^63 times while doing nothing scenario, if you're going to admit hashmaps for tape storage you have to allow for optimisation too 19:51:35 so it's probably feasible to do it on a modern machine 19:51:42 Phantom_Hoover: sure, but then you get into sticky details of how to actually write a program that does that 19:51:46 without it being too big to reasonably store 19:51:56 I guess it wouldn't be that hard 19:52:06 but you need to leave a trail of 0s behind 19:52:22 (basically you wil lneed enough memory to store a 63-bit integer where you are, I guess) 19:52:31 but then you're doing fancy stuff and it's harder to optimise away 19:52:39 look. let me be a pedant in peace ;_; 19:53:05 hmm, leaving a trail of 0s behind isn't so easy... +[->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+] 19:53:25 (note loop unrolling for extra efficiency) 19:53:33 lol extra 19:59:18 int-e: how will that stop à 2^63? 20:01:28 [wiki] [[Pyth]] http://esolangs.org/w/index.php?diff=42402&oldid=42290 * SuperJedi224 * (+0) 20:01:51 will you beta test my interpreter when it's ready? 20:05:34 Koen_: why would it stop? 20:15:58 elliott: actually we may have to be careful, because state-of-the-art optimizing brainfuck compilers will turn sequences of > signs into a single addition instruction. 20:16:11 int-e: hahaha 20:16:16 well they also use finite tapes I think 20:16:36 izabera: there are some good test programs like mandelbrot.b you can use to test it 20:16:42 (will probably be sloooow in a bash interpreter) 20:16:49 I think there are some programs that specifically try to test edge-cases, not sure though 20:23:05 what happens if i have [ but no ] ? 20:23:22 and vice versa 20:23:45 well the program shouldn't compile 20:24:04 oh, you're making an interpreter 20:24:21 well, you should probably get a runtime error, then 20:24:37 unless there's some preprocessing before the actual interpreting 20:25:36 you could also implement some non-error behaviour in this case, for instance assume there are an unlimited amount of virtual [ at the beginning of the program and ] at the end, to match the unmatched brackets in the program 20:25:46 but I don't think any brainfuck interpreter does that 20:26:08 ok 20:26:10 thanks 20:27:03 * int-e knows implementations where an extra ] terminates the program 20:27:29 Another way is if there is an extra ] then the first extra ] it will treat the rest as input to the program, at the end of the file then it starts reading in the actual input instead. 20:27:44 and now that I think about it, missing ] might crash the thing. 20:28:11 (If the program uses the same input stream then the part after ] is the actual input.) 20:28:25 int-e: well, symmetrically, an extra [ should start the program again 20:30:37 -!- Koen_ has quit (Quit: The struct held his beloved integer in his strong, protecting arms, his eyes like sapphire orbs staring into her own. "W-will you... Will you union me?"). 20:32:11 -!- zzo38 has quit (Remote host closed the connection). 20:36:22 are the cells supposed to be chars? 20:36:44 let me rephrase that: does [ loop if the current value is 256? 20:42:10 [wiki] [[Folder]] M http://esolangs.org/w/index.php?diff=42403&oldid=42398 * Rdococ * (-1) /* Interpreter */ 20:42:48 izabera: do whatever seems convenient. 20:43:08 it's fine either way, just tell me what most other implementations do 20:43:43 I don't know. Originally they were chars, but there are plenty of implementations using int, and some using unbounded natural numbers... 20:44:40 -!- AnotherTest has joined. 20:46:05 izabera: they are usually 0-255 20:46:13 or -128 to 127, whichever interpretation you prefer (they are equivalent) 20:46:23 they usually wrap on overflow and underflow 20:46:29 though plenty of implementations have bignum cells with no limit 20:46:41 and some rarer ones have 16-bit or 32-bit etc., or 8-bit but under/overflow is an error 20:46:54 8-bit wrapping is the most "classic" though 20:46:58 ok 20:47:19 the strictest implementation I've seen made decrementing 0 and incrementing 255 errors. (some brainfuck golf competition) 20:47:26 generally if you have 8-bit wrapping cells, a right-infinite tape, and , sets the cell to 0 on EOF, then you should be able to run pretty much any program people have written unless they're weirdos 20:48:07 but if you're writing a program and want to be really portable and boring, it's probably best to assume that cells are 0-255 and you can't go outside that, and that , either sets to 0 or does no change on EOF 20:48:16 (eith they idea that this is the least common denominator of virtually all existing implementations) 20:49:41 Oh yes, the three flavors of EOF behavior. 20:49:52 (the third is -1 on EOF) 20:50:48 * int-e wants a 9 bit Brainfuck (so that -1 can be distinguished from 255). 20:54:11 -!- nszceta has quit (Quit: Textual IRC Client: www.textualapp.com). 20:54:15 -!- rdococ has quit (Quit: Page closed). 20:56:51 int-e: yeah, but you can't be portable to both -1 and 0 on EOF, I don't think 20:56:55 or, I guess you can? 20:56:59 zero it and then check for 0 or -1 20:57:04 but of course you rule out both 0 and 255 bytes in the input 20:57:24 what's the easiest way to loop while not 0 or -1 20:57:44 ,[-[+.[-],]]? 21:02:48 no, that's not right 21:03:09 it's too tedious, I think you need auxilliary cells. 21:03:12 -!- copumpkin has joined. 21:05:04 Ah, "auxiliary", my old nemesis. 21:06:07 copumpkin: is codualization the same as dualization? 21:15:01 can you give me a concise hello world or something that prints stuff? 21:15:33 ++++++++++ ++++++++++ ++++++++++ ++++++++++ ++++++++++ ++++++++++ +++++ . 21:15:38 should that print A ? 21:16:08 (it does in my interpreter) 21:17:37 ok i think i just broke the [ ] but the rest is fine 21:21:44 -!- Naprecks has quit (Quit: ZNC - http://znc.in). 21:25:31 ++++++[->+++++++<]>... should print three asterisks 21:25:31 !bf ++++++[->+++++++<]>... should print three asterisks 21:25:31 *** 21:25:31 ​*** 21:47:44 it prints *** 21:47:47 ^.^ 21:48:04 it works it works 21:49:18 Do we have duplicate !bf's? 21:50:36 !bf [ 21:53:13 tada http://arin.ga/hpExIX 21:54:17 ^bf [ better error reporting 21:54:17 Mismatched []. 21:54:19 See. 21:54:32 -!- oerjan has joined. 21:54:37 .) printf -v output %o "${tape[cell]}" 21:54:37 printf "\\$output" ;; 21:54:43 isn't that the same as printf %o "${tape[cell]}"? 21:55:22 -!- AnotherTest has quit (Remote host closed the connection). 21:55:24 nope 21:56:17 well it probably needs to be printf -v output %o "$(( tape[cell] % 256))" 21:56:37 it prints the octal in the var "output" 21:56:47 the it actually prints it 21:56:52 then* 21:57:16 `` printf -v output %o 65; printf "\\$output" 21:57:17 A 21:59:19 `` printf "\\$(printf %o 65)" # arguably slightly streamlined 21:59:23 A 21:59:52 The whole go-via-octal-escape thing seems silly, but I can't think of anything better offhand either. 22:00:40 $() is inefficient 22:00:44 it's a fork + exec 22:02:41 !bf ok so this is fine, i guess? same code as above but i added <> ++++++[->+++++++<]>... 22:02:41 *** 22:02:41 ​*** 22:04:16 izabera: you have a , in there but it doesn't matter for the demonstration 22:04:28 oh 22:04:30 sorry 22:04:32 lol 22:04:36 didn't notice it :D 22:04:51 a danger of bf commenting 22:07:00 izabera: I don't think it's a fork + exec when the argument is a builtin. Compare http://sprunge.us/PQRO 22:07:09 fizzie: it is 22:07:13 well not exec 22:07:15 still fork 22:07:39 forks are cheap, aren't they 22:07:44 no lol 22:08:10 `` echo $(var=3; echo $var); echo $var 22:08:11 3 22:08:12 * oerjan thought they did copy-on-write sharing 22:08:19 see? ^ only once 22:09:04 oerjan: There's cheap and then there's cheap. 22:09:30 i will have none of your relativism. 22:09:40 (And okay, there's a clone.) 22:09:44 `` time for i in {1..1000}; do printf -v output %o 65; printf "\\$output"; done >/dev/null 22:09:45 ​ \ real0m0.041s \ user0m0.100s \ sys0m0.000s 22:09:50 awww no time? 22:09:58 `` ( time for i in {1..1000}; do printf -v output %o 65; printf "\\$output"; done >/dev/null ) 2>&1 22:09:59 ​ \ real0m0.045s \ user0m0.000s \ sys0m0.000s 22:10:03 oh come on 22:10:23 What do you mean, no time? 22:10:53 `` TIMEFORMAT='real: %lR, user: %lU, sys: %lS'; ( time for i in {1..1000}; do printf -v output %o 65; printf "\\$output"; done >/dev/null ) 2>&1 22:10:54 real: 0m0.044s, user: 0m0.210s, sys: 0m0.000s 22:10:56 thanks 22:11:00 stupid bot 22:11:05 It looked just fine earlier, too. 22:11:10 I mean, sure, there were some raw tabs. 22:11:22 `` TIMEFORMAT='real: %lR, user: %lU, sys: %lS'; ( time for i in {1..1000}; do printf "\\$(printf %o 65)"; done >/dev/null ) 2>&1 22:11:35 real: 0m12.386s, user: 0m1.980s, sys: 0m9.940s 22:11:42 0.044s vs 12s ?? 22:11:56 wow fork is cheap 22:12:06 It's not quite fair to do that particular comparison on the UML box. 22:12:23 I get 0.022s vs 0.364s locally. 22:12:42 wow it's sooo cheap 22:13:04 that's only 15(?) times as much 22:13:21 `time time time 22:13:22 ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: time: not found 22:13:37 `run type time 22:13:38 time is a shell keyword 22:13:43 Mmhmm. 22:13:44 `run time time 22:13:45 ​ \ real0m0.000s \ user0m0.000s \ sys0m0.000s 22:14:02 `run time time time 22:14:02 ​ \ real0m0.000s \ user0m0.000s \ sys0m0.000s 22:17:39 if you want an expensive fork, try cygwin 22:17:40 no COW 22:18:40 D: 22:19:36 * oerjan is getting ambiguous readings on his sarcasm meter 22:20:36 elliott: it just uses Ordinary Exec, no? 22:20:44 cygwin has a slow fork. 22:20:54 sorry, eXec 22:21:27 i meant for izabera 22:21:27 I must be missing a joke. 22:21:46 compare `on` acronym 22:21:54 o.o 22:22:02 :3 22:22:53 * oerjan now is getting ambiguous readings on his confusion vs. groaning meter 22:24:35 well i implemented an interpreter in 3 hours 22:24:37 is that a lot? 22:24:54 i finished it now and it's purrrfect 22:25:22 wait is this brainfuck i'm not up to the logs yet 22:25:45 clearly 3 minutes should be enough for a bf interpreter 22:25:48 * oerjan runs away 22:25:48 :( 22:26:05 but this was my first try :( 22:26:20 i didn't even know brainfuck before 22:26:39 i made a brainfuck interpreter once, it took me several days i think. 22:26:54 *possibly* because i made it in Fueue. 22:27:18 like i know what it is D: 22:27:28 ^wiki Fueue 22:27:28 http://esolangs.org/wiki/Fueue 22:28:27 i don't think i've ever made one in a normal language. 22:29:21 although i've implemented at least one brainfuck derivative 22:30:22 dammit it doesn't work :( 22:30:28 my stupid interpreter 22:30:28 * oerjan is a pretty slow programmer and would never make a time estimate in earnest btw 22:30:38 izabera: Doesn't the handling of [ leave extra stuff in the 'loop' array when []s are skipped? 22:31:00 err... possibly? 22:31:03 got an example? 22:31:07 damn ventilation is making that noise again 22:32:01 izabera: Um. Not really, or at least one where it'd make a difference. But I still think you want to do loop+=(i) only in the else of the if (( tape[cell] % 256 == 0 )) test. 22:34:34 poor izabera 22:34:48 ^bf +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++[-<.>>[]<] 22:34:48 AAAAA 22:34:52 elliott: eh? :( 22:34:52 I think that might be an example. 22:35:06 ok lemme see 22:35:17 izabera: everyone picking on you :P 22:35:24 well fizzie is helping 22:36:05 fizzie: it breaks :( 22:36:26 Yes, I assume it's jumping to the opening [ of the []. 22:36:52 (It will be easy to fix.) 22:37:02 (Because I just fixed it.) 22:39:19 thanks 22:39:24 a lot 22:40:37 izabera: so when will you do an optimising BF compiler in bash >_> 22:40:40 That might be the longest bash script I've ever seen that doesn't actually execute any commands. 22:41:08 elliott: are you talking about that optimizing compiler written in sed? 22:41:13 Or I guess in bash terminology the builtins are still "commands", but you know what I mean. 22:41:21 which optimizes x+=5 ? 22:41:35 izabera: not about one in sed in particular 22:41:42 ok 22:41:48 a compiler is out of reach for now :P 22:41:50 there's tons of optimising BF copilers, some of them are quite impressive (can compile a hello world make with loops to just printf("Hello, world!\n");) 22:42:44 it's actually easier to write a non-optimising BF compiler than an interpreter 22:42:53 since you can just turn [ into while (tape[ptr]) or whatever, it's string substitution 22:42:57 i'm still trying to fix something, it stops at the first NUL byte it reads with cat :( 22:42:59 not very interesting though 22:43:02 izabera: that's inherent 22:43:12 oh 22:43:16 since EOF is 0 22:43:19 the problem is cat 22:43:21 dammit 22:43:23 it's unfixable 22:43:26 :( 22:43:30 you can set EOF as -1 (255) but then it fails on other binary data 22:43:36 ok 22:43:38 nice 22:43:44 it's purrfect \o/ 22:43:44 | 22:43:44 /< 22:44:04 it's purrfect because it runs cat, right? 22:44:16 I hope that wasn't your joke because it's a good one and I want to be the one to make it. 22:44:21 it's purrfect because it runs +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++[-<.>>[]<] 22:44:33 that does not look like a cat. I doubt it purrs. 22:44:39 shush :P 22:45:02 you just don't appreciate my jokes. 22:45:18 haha 22:45:56 izabera: I think you should probably try LostKng.b, it's the standard stress test for brainfuck stuff. 22:46:09 -!- llue has quit (Quit: That's what she said). 22:46:10 izabera: everyone picking on you :P <-- the bastards! 22:46:15 does LostKng actually use wrapping? 22:46:19 -!- llue has joined. 22:46:34 can you link these? 22:46:48 " izabera: I think you should probably try LostKng.b, it's the standard stress test for brainfuck stuff. -!- llue [~gnomebad@unaffiliated/lleu] has quit [Quit: That's what she said]" she made recommendations as to what brainfuck programs to try, I guess 22:47:06 izabera: https://github.com/graue/esofiles/tree/master/brainfuck/src 22:47:11 thanks 22:47:12 oh that doesn't have lostkng 22:47:23 And http://web.archive.org/web/20111031121638/http://jonripley.com/i-fiction/games/LostKingdomBF.html for that. 22:47:33 But the other archive is quite nice too. 22:47:34 https://raw.githubusercontent.com/rdebath/LostKingdom/gh-pages/LostKng.b 22:47:36 yeah 22:47:37 is that something that takes a while? 22:47:43 cause my interpreter is _slow_ 22:47:48 LostKng.b shouldn't be too slow 22:47:53 mandelbrot.b is 22:48:00 but also pretty! 22:48:01 It's a biggish program, though. 22:48:04 Two megabytes or so. 22:48:21 (It wasn't written by hand.) 22:56:09 -!- vodkode_ has joined. 22:59:10 is this slow? https://raw.githubusercontent.com/graue/esofiles/master/brainfuck/src/rot13.b 22:59:25 $ time echo xyz | ./bf rot13.b 22:59:27 klm 22:59:29 real: 0m16.023s, user: 0m15.983s, sys: 0m0.013s 22:59:33 only 16s 22:59:35 not bad 23:06:03 16 seconds to rot-13 one line? 23:06:04 nice 23:06:08 I didn't know bash was THAT slow 23:06:26 it's rot13ing only 4 characters XD 23:06:28 would it be faster if you compiled to bash and then evalled it 23:07:14 hey it works u_u 23:08:46 that was a sincere question! 23:09:42 not sure 23:10:09 I guess I don't know how bash's interpretation works 23:10:17 does it do any kind of pre-parsing at all? 23:10:28 what do you mean? 23:11:32 like, does bash parse functions into an AST? 23:11:52 or does it store them as strings/lists of tokens and parse/execute them token by token every time you execute a function 23:12:17 no it's parsed when it's read 23:12:18 if it parses into an actual AST or bytecode data structure that can be interpreted more efficiently then I guess compile-and-eval would be faster 23:12:41 that's why you basically can't use aliases in functions 23:12:54 oh interesting 23:13:07 does it use the aliases you had at the time of parsing, or? 23:13:08 aliases are expanded when the definition is read, not when it's called 23:13:13 * elliott nods 23:13:14 Forth-y 23:13:27 you know too much about this horrible language :P 23:13:40 it's ok-ish 23:14:19 i'd rather have a faster interpreter but heh 23:14:24 i mean bash's interpreter 23:14:33 not my bf interpreter :P 23:15:12 bash JIT 23:15:48 also there are errors in the parser... 23:16:04 no kidding, those errors get CVEs :p 23:16:17 not only those onese 23:16:34 i mean sure, shellshock got famous but there are other errors 23:17:19 like, ${var[0] i basically can write whatever i want here and bash will never complain} 23:18:55 `` printf "%(%H:%M)" 23:18:55 bash: line 0: printf: warning: `.': invalid time format specification \ bash: line 0: printf: `H': invalid format character \ %( 23:19:04 `` printf "%(%H:%M)T" 23:19:05 00:00 23:19:16 `` printf "%(%H:%M and now let's escape a left parentheses \) )T" 23:19:17 bash: line 0: printf: warning: ` ': invalid time format specification \ bash: line 0: printf: `H': invalid format character \ %( 23:19:46 this one shouldn't produce an error but bash basically shuts its brain in %()T 23:19:51 hehe 23:21:37 well, there's no spec other than bash itself, right 23:21:41 so I guess anything it does is okay by definition 23:21:51 there are specs for posix sh 23:22:27 bash does a good job about those :) 23:22:48 too bad posix sh sucks 23:23:11 i'll just throw a link in here for you to star <.< https://github.com/izabera/bf 23:25:34 I haven't logged into github in, like, years. 23:25:40 :( 23:25:40 :( 23:26:49 can you even write a bf interpreter in pure posix sh? 23:26:54 without anything that can be a non-builtin 23:27:17 posix sh has no arrays other than the positional parameters 23:27:27 you could store the tape in a string if you could mangle the format enough, I guess? 23:27:39 or just use positional parameters. there's probably some rather low guaranteed limit on those though 23:28:24 parsing a line character by character is painful... 23:29:02 well, nobody said it would be easy >_> 23:29:17 -!- variable has quit (Quit: 1 found in /dev/zero). 23:29:47 does your ] jump back to the [ or the instruction after the [? 23:30:01 if the former, then I guess it'd be wasting time looking for the ] every iteration? and that could explain why rot13 was so slow 23:30:36 o_o lemme try 23:30:52 -!- variable has joined. 23:31:00 no <.< 23:31:09 i'm already jumping after the [ :( 23:32:22 hmm 23:32:28 I don't suppose bash has a profiler :p 23:32:41 there's a "debugger" 23:32:55 no profilers yet i'm afraid 23:33:34 izabera: your interpreter doesn't do - on 0 -> 255 23:33:37 (underflow wraparound) 23:33:38 which is common 23:34:05 why not? 23:34:07 it does 23:34:12 oh hmm 23:34:13 ouch 23:34:15 okay but it doesn't support -- on 0 23:34:15 it doesn't 23:34:20 (it's probably easiesr to store the cells pre-moduloed; I think your way will also break once you exceed bash's numerical limts?) 23:34:32 (as in just do x = (x +- 1) % 256 for both) 23:35:23 *easier 23:35:36 the problem is that $(( -1 % 256 )) == -1 23:35:38 :( 23:35:50 ok i'll just add 256 before the modulus 23:36:23 ugh, yeah, that's annoying 23:36:28 you can also condition on 0 and 255 which might be easier 23:37:42 I admit that ${INTEGERCELLS-% 256} is cute though 23:37:50 INTEGERCELLS="* 2" ... 23:38:06 # set it to an empty value if it's set to avoid messing with the math expansion 23:38:06 -!- vodkode_ has quit (Ping timeout: 255 seconds). 23:38:08 if [[ $INTEGERCELLS ]]; then INTEGERCELLS= ; fi 23:38:14 oh, cheating :p 23:38:20 you cheating XD 23:38:24 don't you want an extensible program?? 23:38:37 not that way XD 23:38:42 you could use INTEGERCELLS to implement, like, boolfuck :P 23:38:54 wtf is boolfuck 23:39:05 like brainfuck with a tape of bools 23:39:12 oh 23:39:19 it's "the obvious thing", modulo IO being a bit of a fuss since it's bitwise 23:39:20 doesn't sound too useful 23:39:26 + and - get merged into a flip operation 23:45:10 izabera: if you do +, say, 2^32 + 1 times, does it still work with your implementation? 23:45:13 like does bash have bignums 23:45:18 if not then it could break with long-running programs 23:45:30 bash has 64 bit ints 23:45:37 probably fine then :p