00:02:21 -!- boily has joined. 00:11:39 -!- augur has quit (Remote host closed the connection). 00:19:50 -!- drdanmaku has joined. 00:21:31 -!- LordCreepity has quit (Ping timeout: 272 seconds). 00:22:53 -!- Bicyclidine has quit (Ping timeout: 258 seconds). 00:48:38 -!- aretecode has joined. 00:55:22 -!- aretecode has quit (Remote host closed the connection). 01:17:08 -!- ais523 has joined. 01:37:05 what's snprintf's behaviour on buffer overflow? 01:37:24 specifically, does it use the last remaining character for a NUL. or is it like strncat? 01:39:27 I couldn't figure it out from the docs 01:42:47 -!- Phantom_Hoover has quit (Remote host closed the connection). 01:46:04 ais523: the docs are quite clear 01:46:08 if by docs you mean standard 01:46:14 it always adds a null 01:46:28 I was using the man page 01:46:31 thanks, anyway 01:46:36 (was checking chasonr's pull request) 01:46:41 man c 01:48:49 new golf, and _all_ the haskellers have 2 less chars than the obvious impl... 01:50:01 If you play Pokemon Card, what is most number of cards you have in your draw pile left over at the end of the game if your opponent has none (if you can remember)? Just now I ended up with forty cards and no side cards, while opponent has no more cards left and still has six side cards. 01:50:13 I think I haven't done more than forty, though. 01:50:28 zzo38: are there any trainer cards that let you put cards back into your draw pile? 01:50:43 or better, Pokémon Powers 01:50:47 Yes; MAINTENANCE and GAMBLER and RECYCLE and MR.FUJI are a few. 01:50:48 or just attack effects 01:50:55 I don't know of any powers or attacks that do, though. 01:51:19 However, I didn't use any such cards this time, as it turns out. 01:51:48 I think there's probably going to be a way to end up with 57 in the draw pile, 2 in play (your active Pokémon and one Energy), and one in hand (the Prize Card you drew as you won the game) 01:52:19 oh wait just one less char 01:52:29 actually, if you win by decking, you don't need the Energy, although then you'd have a Prize Card (none in hand, though) 01:52:35 so 57 because I miscounted first time 01:52:48 Yes 01:53:06 anyway, going to get antilunch 01:53:09 I'll be back later 01:53:09 Although I don't know if anyone has ever managed that 01:53:15 -!- ais523 has quit (Quit: antilunchtime). 01:53:38 interesting ['A'..'Z'] is longer than "POCKET", so it isn't obviously better to cheat. 01:53:46 (And it was my opponent's own fault for running out of cards) 01:55:15 for a language like sed the cheat is obviously better, though. 01:56:13 (basically you're supposed to remove the letters POCKET from each line, but there are no other upper-case chars) 01:58:03 and the obvious sed cheat is precisely the length everyone has on that 01:59:06 Do the programs only get tested against the listed sample inpust? 01:59:11 yep 01:59:16 so you can cheat 01:59:34 although ideally you should mark your answer if you do 02:00:34 it's remarkable how many haskell options get thrown out immediately because of the length of import statements. 02:00:45 Yes. 02:00:59 lambdabot is a somewhat more interesting golf environment for that reason. 02:02:06 also, they are using ghc 7.4, which means you don't even have the (->) monad by default. 02:02:19 whoa, 7.4 02:02:31 it's just 2 years ago or so? 02:03:55 i am not quite sure if 7.10 will include applicative syntax in the prelude, or just the class names 02:04:01 maybe i could check 02:04:14 You mean ApplicativeDo? 02:04:23 if it does, then 7.10 should be a _lot_ more golfable 02:04:36 shachaf: no, i mean simply that <*> <$> operators 02:04:38 *the 02:04:40 Oh. 02:04:52 Who knows? I've washed my hands of caring about Haskell. 02:05:01 People are messing it up. It'll be getting steadily worse forever. 02:05:10 the jerks 02:05:17 yep 02:05:25 um these are supposed to be improvements. 02:05:51 also, you sound like trolling. 02:06:21 I'm exaggerating. 02:07:17 i've told you a million times not to do that. 02:08:29 "exec is denied" means you can't use the system call? 02:08:36 i assume 02:09:10 people still manage in bash 02:10:25 although maybe that's excluded, because that length everyone has is the same as for tr -d A-Z 02:10:26 OK, 38 characters for POCKET is easy enough. I wonder if everyone's solution cheats. 02:10:57 "Exec is denied" means there is a limit to number of executing external programs; it doesn't apply for shell scripts though 02:11:13 ah 02:11:22 (And usually the limit is just enough to get the interpreter to start, although sometimes there is a bit more) 02:11:45 The source-codes are available so that you can see how it is working. 02:12:02 zzo38: this one isn't closed yet 02:12:20 No, I mean the source-codes for the service 02:12:25 oh right 02:12:40 Is there a way to submit a program for testing without submitting it for use? 02:12:46 -!- boily has quit (Quit: ANDROÏDOÏD CHICKEN). 02:13:01 shachaf: There is a testing form 02:14:12 Oh, wait, I can make my solution non-cheating easily enough. 02:14:20 ARGH 02:21:00 Looking at source-codes, it look like you can use the "broken keyboard" scoring by making the problem name ending with " broken keyboard". 02:24:07 Wait, it's still cheating. 02:24:14 Oh well. 02:37:06 -!- ais523 has joined. 02:42:00 does Haskell have an equivalent to OCaml's (|>) by default? 02:42:02 :t (|>) 02:42:03 Snoc s s a a => s -> a -> s 02:42:10 no 02:42:13 hmm, that's a different |> 02:42:15 Is (|>) = flip ($)? 02:42:19 shachaf: yes 02:42:21 lens calls it (&) 02:42:29 Apparently it got into base for the next version of GHC. 02:42:38 ah it did? 02:42:40 What a disaster. 02:42:47 I find it pretty useful for writing things in an order I can actually read 02:42:57 now i think shachaf is just being exaggerating again 02:43:04 I find I have to read Haskell right to left 02:43:12 although they could have had a better naming scheme 02:43:19 basically I read in the order a language would evaluate, if it were strict 02:43:21 I would be more inclined to accept (&) if there was a reversed composition operator. 02:43:40 shachaf: um >>> hth 02:43:58 tdnh hth 02:44:10 People write (x & h & g & f) even though they wouldn't write (f $ g $ h $ x) 02:44:25 If anything & would be a good name for reversed composition. 02:44:41 shachaf: is (f . g . h) more idiomatic for that? 02:44:51 err, (f . g . h) x 02:44:51 Yes. 02:45:02 Yes, that. Or f . g . h $ x 02:45:08 in OCaml, the equivalent of f $ g $ h $ x is definitely more idiomatic 02:45:08 If nothing else then because it can be eta-reduced. 02:45:51 oerjan: I'm only moderately exaggerating. 02:46:22 I got so annoyed about (&) that I left almost all the Haskell channels I was in. 02:46:37 (but it was only a proximate cause) 02:52:34 you were planning to leave anyway, but (&) was what helped you make up your mind? 02:52:42 offtopic conversation's like that for me in some channels 02:53:25 Oh, come on, you started this one. 02:55:21 shachaf: I'm not complaining about this one 02:55:30 also I'm not even sure it's offtopic 02:55:32 just observing 02:56:26 #esoteric hasn't been obnoxiously offtopic for a while 02:56:31 and even talks about esolangs sometimes 02:57:50 Is Rice's theorem about the connectedness of some topological space? If so, which one? 02:59:45 -!- shikhout has joined. 03:01:54 Is it possible in Linux to use escape codes to access the number of columns of the screen? 03:03:00 -!- shikhin has quit (Ping timeout: 260 seconds). 03:03:33 rice's theorem can never be off topic here hth 03:03:41 (also, no clue) 03:03:45 (also, pizza) 03:04:13 zzo38: the method you're "meant" to use is an ioctl; however, I think it might be possible to move the cursor to the bottom-right, then ask for the cursor position 03:04:14 and find out that way 03:05:01 if nothing else, you could move the cursor to the top left, ask for the position; move one column to the right, ask again; repeat until the cursor doesn't move any more 03:05:26 * shachaf wonders what happens when you have a scrolling region set. 03:05:27 I suppose then you have to disable line wrapping mode 03:05:38 Until just now I completely forgot about scrolling regions. 03:06:23 zzo38: well if the cursor position goes back to 1, it probably wrapped 03:06:28 Wikipedia says the codes CSI 5i and CSI 4i are used to turn on and off the printer. How commonly is this implemented? 03:06:39 ais523: Yes, I could do that too 03:06:43 in general, though, terminals are quite inconsistent: http://nethack4.org/blog/portable-terminal-codes.html 03:06:51 wrt the printer, I think most terminals ignore it, some log to a file 03:33:29 [05:16:38] But there's at least one documented case of an intentional trap. 03:33:29 [05:16:40] https://en.wikipedia.org/wiki/User:Sgeo/null-edit-detector 03:33:32 I'm documented! 03:34:58 Sgeo: why do you have a trap for null edits? just because you can, or is there a better reason? 03:35:05 Because I can 03:35:18 I think 03:35:34 I made it over 8 years ago 03:39:50 https://bots.wmflabs.org/~wm-bot/logs/%23mediawiki/20140526.txt 03:40:01 I am very curious how the unintentional stuff came into existence 03:42:11 huh, #mediawiki dislike Wikia too, interesting 03:53:28 If local echo is on will it print the local echo too if CSI 5i is activated? 03:57:27 -!- GeekDude has quit (Quit: {{{}}{{{}}{{}}}{{}}} (www.adiirc.com)). 03:58:41 The fact that entry text != result text kind of creeps me out 04:04:41 -!- Sprocklem has quit (Ping timeout: 272 seconds). 04:17:36 -!- augur has joined. 04:21:38 -!- drdanmaku has quit (Quit: Connection closed for inactivity). 04:36:20 be afraid 04:38:41 -!- AndoDaan has quit (Ping timeout: 260 seconds). 04:59:30 -!- bb010g has joined. 05:26:48 Oh, Prelude exports the scan* functions ... useful, but somehow I wasn't aware of that. 05:26:57 (Haskell) 05:27:43 `quote lens 05:27:43 895) Taneb: STOP TRYING TO GET LENS INTO EVERYTHING Bike: You should use lens! NEVER shachaf: i'm getting mixed messages here \ 984) Bike: I think you're ready to learn about lens. oh god fiora help somebody help anybody \ 1186) in that thread Taneb admits to his sins 05:27:57 `quote 1186 05:27:58 1186) in that thread Taneb admits to his sins. i know this because that comment showed up in my friends list oerjan, today I pushed 217 lines of documentation into lens [...] Say 10 Hail Marys and make 3 more lens commits and your sins shall be forgiven. 05:28:22 why is being scared of lens a #esoteric meme? 05:28:25 why am i in two different quotes about some library i've never used 05:28:27 `quote 217 05:28:27 or is it just Bike? 05:28:28 217) HELLWORLD! It's like HELLO WORLD, except not *quite*. There is more agony. 05:28:43 ais523: because whenever people talk about it they sound like spivak and write about as clearly 05:28:50 ais523: because lens is not idiomatic Haskell, it's its own language 05:28:55 Bike: Weren't you saying Spivak was supposed to be clear the other day? 05:29:00 in a math way 05:29:03 i'm not good at math 05:29:21 Bike: I,I http://math.mit.edu/~dspivak/teaching/sp13/ 05:29:23 isn't spivak just a few pronouns? 05:29:23 oh it's just adiffeomorphism on the chu space of reverse topological dynamics 05:29:32 ais523: he also wrote some math textbooks 05:29:37 ah right 05:29:41 spivak the person, not the language 05:29:43 I think I'm good at math, but lens scares me. 05:29:54 it's actually the same person behind the language and the math 05:30:06 lens is a large library based on relatively few important ideas 05:30:51 A lot of it is boilerplate in a sense. 05:31:07 http://31.media.tumblr.com/92d0f2626cc975a59a8c7457f79a3ce9/tumblr_nbnhwdTI7c1r7tprao1_1280.jpg 05:31:33 It's also very bad at abstractions for a few reasons -- the insides are all over the exposed interface. 05:31:44 (Right, lens as a dependency is way too heavy-weight for my taste. I understand how it got there (edward takes implementing lenses for common libraries upon himself rather than coercing maintainers into providing lenses for their stuff), but it still seems wrong.) 05:32:34 I also think that the basic lens type has been abstracted beyond recognition. 05:32:59 lens is a trade-off between a lot of different forces 05:33:23 A lot of the complexity is my fault. :-( But it was worse beforehand, really. 05:33:57 and of course the sheer number of infix operators is intimidating. 05:34:35 concepts, too. Ok, so there are lenses and prisms ... wth is a bazaar? 05:34:55 A Bazaar is a traversal applied to a structure. 05:35:20 ...but I just wanted to access record fields elegantly... 05:35:21 ;-) 05:35:22 Traversals are the central concept of lens. Or they were before profunctors got involved. 05:35:29 You don't need to know about Bazaar to use lens. 05:35:37 -!- AndoDaan has joined. 05:35:49 (Yes, that's my fault, trying to understand the library in details rather than following tutorials.) 05:36:04 ais523: well, that should explain tings nicesly 05:36:04 No, understand Bazaar is good. 05:36:23 ing 05:36:23 Bike: right 05:37:17 shachaf: I still have not used lens; I'm warily eyeing it from a distance (except maybe once trying to decipher some golfing on #haskell) 05:37:54 Do you know what Traversal is? It's pretty straightforward. 05:38:18 Not in so many words. 05:39:04 At least my vague memory resembled "A Traversal a b c d is a generalization of traverse from Traversable." (which doesn't explain so much, yet) 05:39:17 Yes. 05:39:29 If I'm going to talk about lens I probably shouldn't drown out this channel... 05:39:37 But I guess the generalisation has a similar motivation as giving lenses four parameters instead of two. 05:40:23 Four parameters is pretty natural. 05:40:37 I can talk about it in #haskell-overflow if you're interested. 05:40:43 Bike can come too! 05:41:03 busy watching people silently play video games in the dark 05:41:08 yes it is, after banging your head against a wall a few times ;-) 05:44:09 * int-e s t a b s shachaf from behind. 05:44:26 Hmm, I guess you could've been in #-overflow all along. 05:45:27 "s t a b" is my fault too. It was a b c d before that. 05:46:38 I'm usually not there. 05:46:51 Too many lenses ;-) 05:47:00 . o O ( shards ) 05:47:16 and please don't tell me that the lens library has shards. 05:47:40 No. It does have bokehs. 05:47:53 Maybe you can't pluralize that. 05:48:01 Oh, I guess you can. 06:02:24 shachaf: you just love hearing yourself type?! *ducks* 06:03:17 int-e: I'm trying to gather my thoughts for an introduction that I'm going to write someday. 06:03:26 I think you might know all this too well to be a target audience for it, though. 06:10:30 hm bitcoin looks crashy 06:11:42 have you ever, like, really looked at your bitcoins 06:14:40 all zero of them. 06:14:57 i just like looking at the graph occasionally. 06:30:41 i only like it if these bitcoin fanboys start to cry 06:31:14 Even 2600 uses bitcoins now. 06:36:07 Do you like the music for staffroll in Pokemon Card GB2? 06:38:05 no, it's too tall 07:11:39 -!- AndoDaan_ has joined. 07:13:03 -!- AndoDaan has quit (Ping timeout: 258 seconds). 07:13:04 -!- AndoDaan_ has changed nick to AndoDaan. 07:30:17 -!- conehead has quit (Quit: Computer has gone to sleep). 07:36:40 Have you heard of the following quotation before? "Satanism is a Christian's way of becoming enlightened." 07:46:12 nope 08:02:07 It seems that it might have a Zen kind of correctness. (maybe) 08:02:53 Law = X/0 08:09:54 i don't know if i'd trust the satanists on that, _even_ if the christians need enlightenment. 08:10:43 I wouldn't, but that isn't what I think of it at all, at least. 08:27:53 -!- AndoDaan has quit (Ping timeout: 240 seconds). 08:28:45 -!- AndoDaan has joined. 08:30:58 oh no, more golf. 08:35:12 -!- shikhout has quit (Ping timeout: 245 seconds). 08:37:08 oh well, I made a first effort, now waiting for henkma to overtake me. 08:37:31 -!- shikhin has joined. 08:38:33 -!- MoALTz has joined. 08:41:45 `quote 1222 08:41:45 1222) we have today opened a smoking zone behind the hemicycle 08:42:36 `run sed -i '1222s/we/[...] we/;1222s/$/ [...]/' quotes 08:42:37 No output. 08:42:39 `quote 1222 08:42:40 1222) [...] we have today opened a smoking zone behind the hemicycle [...] 08:44:27 int-e: what's with this pattern 08:45:45 oh, i misread the beginning 08:47:33 `quote 08:47:33 931) ais523: I'm not sure my grasp of the English language is getting better by visiting this channel.. 08:47:43 `quote 08:47:43 38) Reality isn't a part of physics 08:47:45 `quote 08:47:45 201) mtve, now he's an expert idler. mtve: kitty kitty kitty 08:47:47 `quote 08:47:48 155) How much do mainframes cost these days? I mean, they're obsoleteish, right? My notebook's much more powerful? So surely, they're cheap? 08:47:49 `quote 08:47:50 423) cigaretes and drunking "lame highs for lame people" yeah if it doesn't make you go crazy and shoot at people, it's not worth it. take it from a norwegian. 09:04:03 Are there any extensions turned on for this golf thing? 09:28:29 I guess not, extrapolating from BangPatterns, which are not available. 09:38:43 A file without a final newline is valid, right? 09:39:17 Well, the obvious approach isn't anywhere close to int-e's 85 so a few characters here and there won't save me. 09:45:18 and here again i'm stuck at int-e+1 09:50:05 ooh 09:51:33 84 >:D 09:52:12 now to wait for the competition to trounch me again 09:52:21 * shachaf wonders what the clever trick is. 09:53:05 also, how is trounch actually spelled 09:53:22 trounce? 09:53:35 sounds plausible 09:54:31 The special case for the first line is annoying. Perhaps there's a way to do without it. 10:02:46 I think "trounce" is probably the word you're looking for 10:02:54 o 10:03:54 what is the pattern for that hello hello world puzzle? 10:04:01 trinary counting 10:04:14 *ternary 10:04:23 I thought it looked like ternary 10:04:26 It looked like a bizarre sort of base 3 until I remembered how 0 works. 10:04:27 but not quite 10:05:33 bleh, Perl doesn't have a function for converting numbers to an arbitrary base 10:05:49 although, hmm, I have an evil idea 10:05:58 haskell has, but not without a verbose import 10:06:21 It's verbose even after the import. 10:06:40 i suppose 10:06:45 :t showIntAtBase 10:06:46 (Show a, Integral a) => a -> (Int -> Char) -> a -> ShowS 10:07:10 Hmm, maybe that actually works well for thise use case. 10:07:11 also, sadly it has that fixed Char type 10:07:21 Oh, so it does. What a scow. 10:08:03 putStr, putStrLn, unlines, unwords, etc. are so verbose 10:08:34 i had an idea that i thought would shave off 3 more chars, but sadly my output started sprouting extra whitespace 10:09:14 I had all sorts of whitespace problems and dealt with them in awful ways. 10:13:31 -!- AndoDaan_ has joined. 10:13:55 I'm on the leaderboard! 10:15:08 -!- AndoDaan has quit (Ping timeout: 260 seconds). 10:15:08 -!- AndoDaan_ has changed nick to AndoDaan. 10:19:42 my Perl is apparently ten characters better than your Python 10:20:03 For which problem? 10:20:25 hello hello world 10:20:34 err, your Haskell 10:20:55 well i've no intention of trying to compete against other languages 10:21:18 no, that doesn't really work, indeed 10:21:34 you'd think golfscript would do better than that, though 10:22:30 it's leading but only by about half 10:22:34 -!- AndoDaan_ has joined. 10:23:05 -!- AndoDaan has quit (Ping timeout: 260 seconds). 10:23:05 -!- AndoDaan_ has changed nick to AndoDaan. 10:23:09 i guess the same could be said of burlesque *ogles AndoDaan* 10:23:36 the strange thing, though, is that this is pretty close to idiomatic Perl 10:23:37 hey, it's the first burlesque code 10:23:47 well i guess there's an amount of incompressible text in the problem 10:23:50 i've written over 10 characters 10:24:09 apart from the compiler warning and the normal trick where you replace one numeric constant with $$ 10:24:36 I have no idea how not to use "world" and "world!" in my code. 10:24:58 there should be a way to copy and modify it, but i don't know how. 10:25:08 I'll have to ask mroman_ 10:25:19 What's $$? 10:25:33 Oh, I guess it's the pid. What's the trick? 10:25:37 i have an annoying duplication that i cannot see how to remove without making it longer 10:26:02 shachaf: basically ensuring that the PID is the number you happen to want 10:26:09 people used to run lots of junk programs to do that 10:26:24 then shinh implemented a PID setting script in order to reduce the server load 10:26:34 :D 10:26:35 Oh, ugh. 10:27:45 also, reducing the duplication of "world" isn't worth it; it costs me three bytes because the deduplication machinery is quite heavy and "world" is only five characters long 10:28:18 In one case I have it saving nothing. 10:28:23 oh hm... 10:28:23 are you interested in my algorithm, btw, in case it translates to Haskell? or would you prefer no spoilers? 10:28:38 But that's only when I use m=[" world"," hello"," world!"] in order to avoid unwordsing. Which is probably not worth it. 10:28:48 maybe i could actually shorten my code by _removing_ the effort to construct "world!" 10:29:35 I don't think I mind spoilers at this point. I'm probably not going to submit a solution. 10:29:45 um i mind 10:30:20 this algo almost certainly doesn't translate well to Haskell anyway 10:30:34 could translate well to GolfScript, though 10:31:52 actually, no, it's missing relevant builtins 10:32:43 Do you have a special case for 0? 10:33:01 yeah, perl has that only in some modules 10:33:08 does golf.shinh still limit you to 3 input/output pairs when submitting problems? 10:34:24 shachaf: no, I don't 10:34:49 Patashu: a common workaround is to give hundreds of input lines and hundreds of matching output lines 10:34:53 then force the program to run in a loop 10:35:00 `perl -e $t="x";for(1..99){$t++;$t=~y/a/x/;print" $t"} # there's some tricks but they're too long 10:35:00 ​ y z xx xy xz yx yy yz zx zy zz xxx xxy xxz xyx xyy xyz xzx xzy xzz yxx yxy yxz yyx yyy yyz yzx yzy yzz zxx zxy zxz zyx zyy zyz zzx zzy zzz xxxx xxxy xxxz xxyx xxyy xxyz xxzx xxzy xxzz xyxx xyxy xyxz xyyx xyyy xyyz xyzx xyzy xyzz xzxx xzxy xzxz xzyx xzyy xzyz xzzx xzzy xzzz yxxx yxxy yxxz yxyx yxyy yxyz yxzx yxzy yxzz yyxx yyxy yyxz yyyx yyyy yy 10:35:35 b_jonas: ooh, that's clever; I was considering a solution that worked along those lines 10:35:51 probably want to start with $t at w 10:36:03 I don't think that algo will beat mine for the actual puzzle, though 10:36:24 -!- Phantom_Hoover has joined. 10:36:45 how does Burlesque typically compare to GolfScript? 10:37:25 i'm not well versed enough, but I say it can compete. 10:37:28 `perl -e $t="x";for(1..99){$t=~y/a/x/;print$t++,$"} 10:37:28 x y z xx xy xz yx yy yz zx zy zz xxx xxy xxz xyx xyy xyz xzx xzy xzz yxx yxy yxz yyx yyy yyz yzx yzy yzz zxx zxy zxz zyx zyy zyz zzx zzy zzz xxxx xxxy xxxz xxyx xxyy xxyz xxzx xxzy xxzz xyxx xyxy xyxz xyyx xyyy xyyz xyzx xyzy xyzz xzxx xzxy xzxz xzyx xzyy xzyz xzzx xzzy xzzz yxxx yxxy yxxz yxyx yxyy yxyz yxzx yxzy yxzz yyxx yyxy yyxz yyyx yyyy yyyz 10:37:48 the average score is maybe a little lower than golfscript's though 10:38:43 http://golf.shinh.org/lranking.rb 10:39:37 ais523: I know like lots of different solutions if you wanted to use base conversion in actual perl programs, but they don't work in golf 10:39:51 hmm burlesque's average is 4th only to golfscript, flogscript and gs2 10:39:58 I noticed there wasn't a base conversion in standard library 10:40:02 so I came up with something else 10:41:03 yep. there's conversion only for some particular bases. you can do 10, 26, and most powers of 2 easily. 10:41:43 If you go to programs somewhat longer than what typically comes up in golf, you can do pretty nice arithmetic in concise perl 10:41:48 I have some examples on perlmonks 10:42:17 like, I can arithmetic GF(128) values in three lines of perl 10:43:35 in http://www.perlmonks.com/?node_id=849259 I do hexadecimal bignum arithmetic in pure perl 10:43:42 there's like lots of modules as well 10:43:55 http://www.perlmonks.com/?node_id=863110 does the GF(128) computation 10:45:22 and it's easier if you only want to increment numbers, not add them 10:47:19 made it shorter /and/ fixed the warning, nice 10:48:31 of course, you should always consider straightforward solutions like repeated division/multiplication for conversion and doing the arithmetic with ordinary numbers 10:49:01 we know since the roman numbers golf that it's always the best to do the arithmetic with builtins and convert both ways 10:50:48 -!- oerjan has quit (Quit: leaving). 11:14:31 -!- boily has joined. 11:58:56 ais523: Golfscript is usually at an advantage due to shorter built-ins 11:59:23 so for stuff where Golfscript and burlesque solutions are very similar (in how they work) 11:59:29 the Golfscript one will be only 50% in size 12:00:13 right 12:00:24 i.e. duplicate stdin, reverse, append 12:00:28 is probably three bytes in gs 12:00:33 where it's at least 6 in blsq 12:00:47 which means blsq will only receive 5k points 12:02:40 -!- AndoDaan has quit (Ping timeout: 244 seconds). 12:09:48 -!- sebbu has quit (Ping timeout: 250 seconds). 12:12:17 -!- Patashu has quit (Ping timeout: 260 seconds). 12:18:04 -!- AndoDaan has joined. 12:27:51 Although the average of a language with < 100 submissions isn't really saying anything 12:29:29 gs2 really decreased the averages of pretty much every language :) 12:29:45 blsq was in the 9k range with golfscript, flogscript I think 12:29:59 golfscript is now at 7.8k 12:30:21 the problem is for example gs2 has a 1 byte built-in for certain challenges 12:30:26 where other languages need 30B 12:30:28 which means 12:30:33 gs2 get's 10k at that challenge 12:30:42 and every other language scores 0.5k 12:41:38 -!- LordCreepity has joined. 12:49:37 -!- AndoDaan has quit (Ping timeout: 258 seconds). 12:50:21 -!- boily has quit (Quit: TARRAGONIFIED CHICKEN). 12:50:54 -!- AndoDaan has joined. 12:55:37 -!- LordCreepity has quit (Ping timeout: 245 seconds). 13:00:10 I am now really glad I have a backup keyboard 13:18:30 -!- GeekDude has joined. 13:20:14 -!- drdanmaku has joined. 13:22:52 -!- Deewiant has joined. 13:25:33 -!- AndoDaan has quit (Ping timeout: 260 seconds). 13:26:47 -!- King2218 has joined. 13:28:38 oh, golf.shinh.org allows garbage on stderr... 13:28:45 nasty. 13:31:18 yep 13:39:29 -!- Vorpal has joined. 13:44:29 so what's all this about? 13:45:05 -!- LordCreepity has joined. 13:46:56 -!- AndoDaan has joined. 13:48:01 `welcome King2218 13:48:02 King2218: 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.) 13:48:19 rello, king 13:49:05 `felcome 13:49:06 ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: felcome: not found 13:50:41 -!- King2218_ has joined. 13:51:22 -!- King2218 has quit (Ping timeout: 246 seconds). 13:53:40 woops 13:53:40 -!- King2218_ has changed nick to King2218. 13:58:01 -!- King2218 has quit (Ping timeout: 246 seconds). 13:58:08 `/bin/sh 13:58:38 No output. 13:58:59 lol, that actually worked 13:59:27 do you guys have a playground for this thing? 14:04:56 what do you mean by "playground"? 14:05:49 Our bots are free-range 14:06:30 -!- sebbu has joined. 14:06:36 !blsq_uptime 14:06:36 3d 19h 8m 11s 14:07:07 -!- sebbu has quit (Changing host). 14:07:07 -!- sebbu has joined. 14:20:42 -!- AndoDaan has quit (Ping timeout: 272 seconds). 14:29:55 lol 14:30:14 `uptime 14:30:15 ​ 14:30:02 up 0 min, 0 users, load average: 0.00, 0.00, 0.00 14:30:16 -!- MoALTz_ has joined. 14:30:22 wat 14:30:33 oh, i get it 14:30:38 `ls /proc 14:30:38 1 \ 10 \ 2 \ 281 \ 285 \ 286 \ 287 \ 288 \ 289 \ 290 \ 291 \ 292 \ 3 \ 4 \ 47 \ 49 \ 5 \ 51 \ 6 \ 68 \ 7 \ 76 \ 77 \ 8 \ 9 \ buddyinfo \ bus \ cgroups \ cmdline \ config.gz \ consoles \ cpuinfo \ crypto \ devices \ diskstats \ driver \ execdomains \ exitcode \ filesystems \ fs \ interrupts \ iomem \ ioports \ irq \ kallsyms \ kcore \ kmsg \ kpageco 14:30:42 or not. 14:32:51 LordCreepity: Did you see anything in the reply to `uptime ? 14:33:06 no 14:33:07 -!- MoALTz has quit (Ping timeout: 245 seconds). 14:33:30 -!- Sprocklem has joined. 14:33:36 Not sure what’s up there, since idris-bot saw “14:30:02 up 0 min, 0 users, load average: 0.00, 0.00, 0.00”. 14:34:08 yeah, thats what i don't get 14:34:26 how cna you start up 0 seconds before a command 14:34:28 *can 14:34:55 the kernel might just have a habit of lying to you if you ask for privileged/confidential infomraiotn 14:34:57 *information 14:34:59 `hostname 14:34:59 umlbox 14:35:11 this is in the nature of sandboxes 14:35:11 `uname -a 14:35:12 Linux umlbox 3.13.0-umlbox #1 Wed Jan 29 12:56:45 UTC 2014 x86_64 GNU/Linux 14:35:21 ah, its using user-mode-linux 14:35:26 that explains it 14:35:47 i've never actually gotten that thing to work correctly 14:37:27 `date 14:37:27 Sun Oct 5 14:37:15 UTC 2014 14:37:42 um, but the uptime isn't really confidental information for a process on Linux. they know that anyway from the monotonous clock which starts from zero on Linux, except maybe there could be a difference if the system's been hibernating. 14:37:48 yeah 14:38:00 on my system i can run uptime as a normal user just fine 14:38:23 -!- shikhin has quit (Ping timeout: 240 seconds). 14:40:39 umlbox is a little weird about what it lets you do, sometimes 14:41:45 -!- AndoDaan has joined. 14:42:22 well, it might just be an implementation thing. I believe uptime reads the uptime from an old /proc file that gives the uptime only to seconds precision 14:43:43 cat /proc/sys/kernel/random/uuid 14:43:45 `cat /proc/sys/kernel/random/uuid 14:43:45 c03e16c4-a27c-470d-bd76-2faa903a7ff1 14:43:47 `cat /proc/sys/kernel/random/uuid 14:43:48 930154b8-2b97-47c2-ad5f-2e0e55f9a9d4 14:43:56 hmm, it is different each time, at least 14:44:01 would be amusing if it wasn't :-) 14:45:01 oh god 14:45:21 i could troll really badly right now with a cat /dev/random 14:45:29 but i'm not 14:45:40 meh, the bot's meant to be impossible to break 14:45:43 `cat /dev/random 14:45:53 i mena 14:45:55 hmm, that's an interesting approach 14:45:55 *mean 14:46:02 `? welcome 14:46:03 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.) 14:46:06 it would mess with the clients 14:46:13 No output. 14:46:22 the bots are meant to filter out implausible output 14:46:30 ah. 14:46:30 in this case, I think it just timed out 14:46:41 there was a bot who wasn't sanitizing its output recently 14:46:51 oh god 14:46:52 which caused a bit of a row, but we brought it under control 14:46:57 all the messed up terminals 14:47:19 the worst things you can do are terminal control codes, but the only person it actually affected was Melvar (who's using some sort of custom framework for idris-bot) 14:47:21 `od -tx1 -N16 /dev/urandom 14:47:22 od: invalid character ` ' in type string `x1 -N16 /dev/urandom' 14:47:36 `cmd od -tx1 -N16 /dev/urandom 14:47:36 ​/home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: cmd: not found 14:47:40 b_jonas: you mean `run 14:47:42 `run od -tx1 -N16 /dev/urandom 14:47:43 0000000 37 90 97 8f de b8 00 9d cb b4 82 ff 49 9c cc 17 \ 0000020 14:47:46 there 14:47:55 that's probably random, but of course you can't tell 14:48:01 (that's the point of randomness) 14:49:02 -!- AndoDaan has quit (Ping timeout: 244 seconds). 14:49:54 ais523: Not sure what you mean by custom framework … it’s straight off hackage. 14:50:26 hmm, in that case, it's a framework that isn't used widely enough for protection against terminal control codes to have been implemented 14:51:13 Um, it’s simpleirc with debug logging turned on, and the debug log puts out literal raw messages. 14:51:36 right, and the fix would be for the debug log to escape control codes 14:51:41 So it messes up the terminal, but the bot itself is not affected. 14:56:42 hmm, perhaps we need another bot to send terminal reset codes, to put the terminal back to normal 14:57:02 Melvar: the bot has to filter CR and LF, because those can affect the bot itself, eg. steal its nickserv password 14:57:24 ... 14:57:31 * LordCreepity formulates an evil plan 14:57:41 i kid 14:58:41 `whoami 14:58:42 whoami: cannot find name for user ID 5000 14:58:44 -!- AndoDaan has joined. 14:58:44 I don't think it can steal the password. 14:58:47 lol 14:58:54 i know, i was joking 14:59:15 `cat /etc/shadow 14:59:15 cat: /etc/shadow: No such file or directory 14:59:23 `cat /etc/passwd 14:59:23 cat: /etc/passwd: No such file or directory 14:59:29 hmm, that's going to break a few things 14:59:36 ah crap 14:59:41 who's up for that? 14:59:48 `su 14:59:49 su: Cannot determine your user name. 15:00:06 `cat cat 15:00:06 Meow~~ 15:00:10 it would be hilarious if su was defeated via the means of not giving it any way to figure out a name/number mapping 15:00:18 lol 15:00:18 because it doesn't accept numbers as arguments 15:00:20 `cat 15:00:23 `kill -9 1 15:00:24 kill: invalid option -- '9' \ \ Usage: \ kill [options] [...] \ \ Options: \ [...] send signal to every listed \ -, -s, --signal \ specify the to be sent \ -l, --list=[] list all signal names, or convert one to a name \ -L, --table list all sig 15:00:27 `run kill -9 1 15:00:28 bash: line 0: kill: (1) - Operation not permitted 15:00:35 `run kill -9 * 15:00:35 bash: line 0: kill: :-(: arguments must be process or job IDs \ bash: line 0: kill: a.out: arguments must be process or job IDs \ bash: line 0: kill: bdsmreclist: arguments must be process or job IDs \ bash: line 0: kill: bin: arguments must be process or job IDs \ bash: line 0: kill: binpipes: arguments must be process or job IDs \ bash: line 0: k 15:00:37 `run kill -9 $$ 15:00:38 Killed 15:00:46 `run kill -9 1 2 3 4 5 15:00:47 bash: line 0: kill: (1) - Operation not permitted \ bash: line 0: kill: (2) - Operation not permitted \ bash: line 0: kill: (3) - Operation not permitted \ bash: line 0: kill: (4) - Operation not permitted \ bash: line 0: kill: (5) - Operation not permitted 15:00:51 No output. 15:00:59 `ps 15:01:00 ​ PID TTY TIME CMD \ 286 ? 00:00:00 init \ 288 ? 00:00:00 sh \ 290 ? 00:00:00 ps \ 291 ? 00:00:00 cat 15:01:03 `run kill 0 1 2 3 4 5 6 7 8 9 10 11 12 13 15:01:04 No output. 15:01:07 `kill -9 288 15:01:07 kill: invalid option -- '9' \ \ Usage: \ kill [options] [...] \ \ Options: \ [...] send signal to every listed \ -, -s, --signal \ specify the to be sent \ -l, --list=[] list all signal names, or convert one to a name \ -L, --table list all sig 15:01:12 `run kill -9 288 15:01:12 No output. 15:01:13 err 15:01:16 `run kill -0 1 2 3 4 5 6 7 8 9 10 11 12 13 15:01:16 bash: line 0: kill: (1) - Operation not permitted \ bash: line 0: kill: (2) - Operation not permitted \ bash: line 0: kill: (3) - Operation not permitted \ bash: line 0: kill: (4) - Operation not permitted \ bash: line 0: kill: (5) - Operation not permitted \ bash: line 0: kill: (6) - Operation not permitted \ bash: line 0: kill: (7) - Operation no 15:01:18 what was the command that said "You don't exist. Go away. 15:01:26 "? 15:02:24 `cc 15:02:25 ​/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crt1.o: In function `_start': \ (.text+0x20): undefined reference to `main' \ collect2: error: ld returned 1 exit status 15:02:32 wat 15:02:37 it can compile nothing? 15:02:52 s/compile/link 15:02:53 it can try, but it fails due to the absence of main 15:03:10 `ld 15:03:11 ld: no input files 15:03:11 yeah, but this was cc with no args 15:03:17 makes no sense 15:03:18 cc with no args is not ld with no args 15:03:22 i know 15:03:24 there are some default args, like crt1.o 15:03:30 `cc --version 15:03:31 ​/tmp/a.c:1:1: error: expected identifier or ‘(’ before ‘--’ token 15:03:37 OH 15:03:37 hmm 15:03:43 its a C interpreter 15:03:57 `cc int main(void) { puts("test\n"); return 0; } 15:03:58 ​/tmp/a.c: In function ‘main’: \ /tmp/a.c:1:23: warning: missing terminating " character [enabled by default] \ /tmp/a.c:1:1: error: missing terminating " character \ /tmp/a.c:2:1: warning: missing terminating " character [enabled by default] \ /tmp/a.c:2:1: error: missing terminating " character \ /tmp/a.c:2:1: error: expected expression at 15:04:14 it's most likely a buggy C interpreter 15:04:21 `! c puts("test"); 15:04:22 test 15:04:31 that's the working one 15:04:38 ah. 15:06:02 `! c execl("/bin/ls", "ls", "/bin", (char*)0); 15:06:03 bash \ bunzip2 \ bzcat \ bzcmp \ bzdiff \ bzegrep \ bzexe \ bzfgrep \ bzgrep \ bzip2 \ bzip2recover \ bzless \ bzmore \ cat \ chgrp \ chmod \ chown \ cp \ cpio \ dash \ date \ dd \ df \ dir \ dmesg \ dnsdomainname \ domainname \ echo \ ed \ egrep \ false \ fgrep \ findmnt \ fuser \ grep \ gunzip \ gzexe \ gzip \ hostname \ ip \ kill \ kmod \ less \ 15:06:08 cool 15:07:29 know of any c interpreters for linux? googled some before but couldn't seem to find one 15:07:40 i know plan 9 has one included with it 15:07:44 but i don't use that 15:07:52 The `cc is just an echo "$@" to a temporary file + gcc on it. 15:08:03 ah 15:08:13 -!- AndoDaan has quit (Ping timeout: 260 seconds). 15:08:19 And I think CINT (the thing ROOT used to run on) had a C mode, though it's more of a C++ interpreter. 15:08:35 hurr 15:08:58 Also I think they're moving to Cling. 15:09:02 http://root.cern.ch/drupal/content/cling 15:19:52 -!- AndoDaan has joined. 15:30:21 `! c printf(argv[0]); 15:30:22 ​/tmp/compiled.299 15:31:13 (The number is the process ID.) 15:32:13 -!- AndoDaan_ has joined. 15:33:29 -!- AndoDaan has quit (Ping timeout: 260 seconds). 15:33:30 -!- AndoDaan_ has changed nick to AndoDaan. 15:33:40 kk 15:34:46 -!- GeekDude has changed nick to G33kDude. 16:20:15 -!- shikhin has joined. 16:20:20 -!- shikhin has quit (Read error: Connection reset by peer). 16:22:24 -!- shikhin has joined. 16:22:34 -!- shikhin has quit (Read error: Connection reset by peer). 16:23:15 -!- AndoDaan has quit (Ping timeout: 246 seconds). 16:27:26 -!- shikhin has joined. 16:39:35 -!- AndoDaan has joined. 16:40:42 -!- J_Arcane has quit (Remote host closed the connection). 16:47:07 -!- J_Arcane has joined. 16:52:46 -!- AndoDaan has quit (Ping timeout: 250 seconds). 17:02:42 -!- Phantom_Hoover has quit (Ping timeout: 245 seconds). 17:32:12 ^prefixes 17:32:12 Bot prefixes: fungot ^, HackEgo `, EgoBot !, lambdabot @ or ?, thutubot +, metasepia ~, idris-bot ( , jconn ) , blsqbot ! 17:34:51 [ 'hi' 17:34:52 b_jonas: hi 17:35:06 I'd say remove the jconn entry, he doesn't come here anymore 17:35:26 -!- evalj has joined. 17:35:28 ] 'evalj doesn''t either, I rarely start it' 17:35:29 b_jonas: evalj doesn't either, I rarely start it 17:35:51 how many J bots do we have? 3? 17:36:27 ais523: it's all the same bot, but instances ran by different people. there were like six instances so far, some of them dead for years because their running people disappeared 17:37:02 (well, technically, NotJack wrote a J bot that wasn't derived from it, plus buubot had a J plugin that I wrote that was derived from it but isn't the same) 17:37:19 (the notable part about NotJack's bot is that he wrote it in J) 17:38:14 -!- not^v has joined. 17:49:08 -!- Maunz25 has joined. 17:51:27 -!- maunz26 has joined. 17:51:28 test 17:56:53 -!- not^v has quit (Ping timeout: 272 seconds). 17:56:54 -!- Maunz25 has quit (Remote host closed the connection). 17:57:06 -!- not^v has joined. 18:00:53 -!- maunz26 has quit (Quit: ). 18:14:33 -!- AndoDaan has joined. 18:19:08 -!- G33kDude has quit (Quit: {{{}}{{{}}{{}}}{{}}} (www.adiirc.com)). 18:24:03 -!- GeekDude has joined. 18:27:00 -!- boily has joined. 18:27:47 -!- lambdabot has quit (Remote host closed the connection). 18:37:18 -!- conehead has joined. 18:38:36 b_jonas: q#Rc! is btw. duplicate bottom ;) 18:39:51 mrhelloman_. 18:49:47 Today's burlesque related topic 18:50:05 is #Q#q#j#J#s#Sif turing complete 18:50:21 or what's the minimal subset of builtins + #Q#j#j#J#s#S to make it turing complete 18:51:33 !blsq #Q#s 18:51:33 {{#s}} 18:51:40 !blsq #Q#s#j 18:51:40 {#s #j} 18:51:46 !blsq #Q#Q#s#j 18:51:46 {#Q #s #j} 18:51:54 !blsq #Q#Q#s#j#s#j 18:51:55 {#Q #s #j #s #j} 18:51:59 !blsq #Q#Q#s#j#s#j#s#j 18:52:00 {#Q #s #j #s #j #s #j} 18:52:09 !blsq #Q#Q#s#Q#j#s#j#s#j 18:52:10 {#Q #s #Q #j #s #j #s #j} 18:52:12 hm 18:52:16 !blsq #Q#Q#s#Q#J#s#j#s#j 18:52:16 Ain't nobody got time fo' dat! 18:52:21 !blsq #Q#Q#s#Q#J#s 18:52:22 {#Q #s #Q #J #s} 18:52:29 !blsq #Q#s#Q#J#s 18:52:29 {#s #Q #J #s} 18:52:34 !blsq #Q#s#Q#J#s#J 18:52:34 {#s #Q #J #s #J} 18:52:39 something like that 18:53:44 I have "hello hello world" an initial Forth go, and ended up with 150 characters. :) 18:59:23 what is an initial Forth go? 19:00:34 Just writing a thing in Forth with a general "don't waste code" idea in mind, but not doing any editing afterwards. 19:14:35 Aw, mplayer's playback speed twiggle just resamples instead of properly time-stretching. 19:19:08 Ah, there's a filter. 19:19:52 It doesn't seem to be a terribly high-quality one. 19:20:53 I haven't mplayered in a long time. my life is becoming orthogonal with my priorities. 19:22:30 -!- boily has quit (Quit: EIGEN CHICKEN). 19:40:21 mroman_: uh, ok 19:47:48 -!- not^v has quit (Quit: http://i.imgur.com/Akc6r.gif). 19:49:36 -!- Frooxius has joined. 19:49:38 -!- conehead has quit (Quit: Computer has gone to sleep). 19:56:08 okay, mroman_, tell me which is the state stack, and which the normal stack. 19:56:45 Can someone else answer, or does it have to be mroman_? 19:57:03 Please. 19:58:16 The state stack is just a secondary stack that you access with those pP PP Pp things, with the distinction that the state stack's the same stack even inside blocks you are m['ing or f['ing or whatever, where the code inside won't normally access the global stack. 19:59:29 I think that was my understanding, but when i try and peek and pop, pop goes my interpreter. 19:59:43 Have you put anything there to peek/pop? 20:00:44 1 5 6{1 1 1}{pP}m[ would...> 20:00:59 1 5 6{1 1 1}{pP}m[ would...?* 20:01:23 There's nothing on the state stack to pP from, I don't think. 20:01:43 !blsq 0Pp "foo bar baz quux"wd{PP+.JPp ?+}m[ 20:01:43 {"foo1" "bar2" "baz3" "quux4"} 20:01:55 There's an example of using the state stack to do a manual counter. 20:02:35 Though I'm sure that particular example would be better with some sort of zip-based thing. 20:03:19 okay, the firs PP puts "foo" too here0Pp 20:03:22 ? 20:03:35 The 0Pp puts a 0 on the (initially empty) state stack, yes. 20:04:12 And the PP moves it back from the state stack to the normal stack, the +. increments it, and the JPp puts a copy back on the state stack for the next round. 20:04:42 it's not empty 20:04:46 it contains stdin 20:05:06 What, like, stdin is on both stacks initially? 20:05:10 !blsq p\ 20:05:10 No output! 20:05:19 fizzie: On anagol it is. 20:05:28 Well, I didn't know that. At any rate. 20:05:29 ah, i think i see my misunderstanding 20:06:10 going to mess around a bit, thanks! 20:06:28 but fizzie explained it perfectly otherwise 20:07:58 For the record, "foo bar baz quux"wd1R@{?+}Z] would presumably be better for the particular example I used. 20:08:28 There are some implications for laziness though when using the secondary stack 20:08:35 !bslq 0Pp{1 1 1}{PP.+Pp}m[pP 20:08:44 !blsq 0Pp{1 1 1}{PP.+Pp}m[pP 20:08:44 3 20:08:47 okay 20:08:54 i'm understanding. 20:09:00 !blsq 1R@{JPp}m[10.+ 20:09:00 {1 2 3 4 5 6 7 8 9 10} 20:09:08 !blsq 1R@{JPp}m[10.+pP 20:09:08 Ain't nobody got time fo' dat! 20:09:12 for example 20:09:37 doing a pP here will make the code never terminate 20:10:20 -!- conehead has joined. 20:11:11 (because theoretically the last element on the stack would be the last element of 1R@ but 1R@ doesn't have a last element) 20:12:24 even though you may think with 10.+ the state stack will only contain 10 elements as well... 20:12:35 which is not the case :) 20:13:59 Do you have some sort of a general policy to make operands that take "block, int" kind of arguments to be usable also in "int, block" order? 20:14:29 uh 20:14:34 !blsq 10{1 2 3 4}.+ 20:14:34 {1 2 3 4} 20:14:48 fizzie: yes 20:15:07 I noticed that was the case for .+ and some others, but not e.g. !!. 20:15:20 ok 20:15:39 -!- GeekDude has quit (Quit: {{{}}{{{}}{{}}}{{}}} (www.adiirc.com)). 20:15:40 Maybe "e.g." is wrong, !! is the only thing I ran across, really. 20:15:59 hm 20:16:05 !blsq 1{1 2 3 4}!! 20:16:05 ERROR: Burlesque: (!!) Invalid arguments! 20:16:08 !blsq 2{1 2 3 4}!! 20:16:08 ERROR: Burlesque: (!!) Invalid arguments! 20:16:10 !blsq 2{1 2 3 4}ch 20:16:10 1 20:16:25 fizzie: I'll add it to the todo list 20:17:55 I didn't even know about ch. But the n! makes it not quite the same as !!. 20:18:00 yep 20:18:22 also for 20:18:32 !blsq 1{"yes""no"}ch 20:18:32 "yes" 20:18:39 there's a shorter way to do that 20:18:45 !blsq 'e {1 1}{{'a 'b}{'c 'd}}D! 20:18:46 ERROR: Burlesque: (D!) Invalid arguments! 20:18:48 !blsq 1"yes no"cw 20:18:48 ERROR: Unknown command: (cw)! 20:18:49 !blsq 1"yes no"CW 20:18:50 "yes" 20:19:07 mainly because "yes no"wd is shorter than {"yes""no"} 20:19:13 and CW is wdch 20:19:24 AndoDaan: other way around 20:19:49 !blsq {{'a 'b}{'c 'd}}{1 1}'e D! 20:19:49 {{'a 'b} {'c 'e}} 20:19:59 great! thanks 20:20:46 fizzie: the actual policy is if something is 20:21:10 Block x, Foo b (where Foo is not Block) that it would be nice if it also works for Foo b, Block x as well 20:21:31 so if you happen to come across a built-in where a reversed argument order can be added just give me a heads-up 20:21:42 what doesn't work is Block f, Any a for example 20:21:47 because a could also be a block 20:22:55 [+ Str a, Char b 20:23:07 this could also support Char b, Str a 20:24:00 but 20:24:02 hm 20:24:04 yeah 20:24:12 there are a lot of built-ins where you could do that 20:24:16 CO, co 20:24:29 One thing I was missing was to go from '1 to 1 in one instruction; I couldn't think of anything shorter than [-ri (or some other two-instruction alternatives). Though I don't know how common that is, and two instructions isn't very much. 20:24:57 C! as well 20:25:27 !blsq '1ti 20:25:27 ERROR: Burlesque: (td) Invalid arguments! 20:25:32 !blsq '1ri 20:25:33 1 20:25:36 !blsq '2ri 20:25:36 1 20:25:53 Well, okay, yes, I also wanted to go from '0 to 0 and '2 to 2, not just '1 to 1. 20:26:44 (The "ri tests chars for alpha-numericness" was a nice twist.) 20:26:59 I thought there was one 20:27:02 but I can't find it 20:27:57 !blsq '2XXti "also works"vv 20:27:58 2 20:28:18 hu? 20:28:22 !blsq '2XX 20:28:22 "2" 20:28:26 lol 20:28:40 ah yeah 20:28:44 didn't know XX does that 20:28:46 I guess XX and [- do the same for a char argument. 20:29:06 yep 20:29:21 ti could actually do Char -> Int 20:29:49 well. gn8. 20:30:59 Alternatively, B! could accept Char in addition to String (and then b0, b6 would be short ways to convert digit characters to numbers). 20:50:08 I thought of to make up a variant of Pokemon type matrix where it mathematically is an actual matrix. 20:58:52 -!- AndoDaan has quit (Quit: HydraIRC -> http://www.hydrairc.com <-). 21:01:44 Every time I start a D&D campaign DM'd by someone called Liam, in the first encounter I get messed up by corvids... 21:02:25 is it the same Liam every time? 21:02:31 or is this just a general property of Liams? 21:03:48 -!- AnotherTest has joined. 21:12:14 -!- Phantom_Hoover has joined. 21:21:49 -!- boily has joined. 21:26:46 Can scanf("%*1[ ]") be a proper C code? 21:28:25 zzo38: no, because you didn't give it enough arguments 21:28:35 also I don't think that 1 is legal in that context 21:29:31 ais523: Why is that? How should it be? 21:29:33 ais523: but the * means there's no argument 21:29:47 b_jonas: did I confuse scanf with printf? 21:30:01 I thought * meant it consumed an argument to get a count 21:30:14 dunno, I'm not sure it's legal or standard or anythin 21:30:18 let me look it up 21:31:03 zzo38: do you want to execute it? I think if you never execute it then it's leval 21:31:06 legal 21:31:21 (hey, sorry for nitpicking, but we're on that channel) 21:31:50 ais523, it has happened with two different Liams 21:32:19 b_jonas: Yes if it is executed how do you expect it to work 21:32:48 b_jonas: you can normally assume that here, there's a decent chance that we're looking for an answer to the question we actually asked, even if it seems insane 21:33:34 zzo38: from looking it up, yes, I think it is valid, and will skip a single space. the star makes sure it doesn't try to assign to anywhere and doesn't expect an argument. 21:37:10 Is something like if(scanf("\e[%d;%dR",&y,&x)!=2) a proper way to read the cursor position (after printf("\e[6n"))? 21:37:14 -!- ^v has quit (Read error: Connection reset by peer). 21:37:18 (not counting locale and wide character and that kind of complications, which I probably don't understand) 21:37:30 -!- ais523 has quit. 21:37:44 zzo38: no, because you may get other input from the terminal before that reply 21:37:59 b_jonas: Well, perhaps the program could first set the locale to the C locale before doing anything else, if that can help. 21:38:01 and this may partially match that other input, consuming a prefix 21:38:16 \e is also not one of the standard escape sequences, though it's quite common. 21:38:17 zzo38: the locale is already the C locale unless you specifically set it otherwise 21:38:27 zzo38: it's trickier in a library of course 21:38:46 What other input from the terminal will come up? 21:38:55 zzo38: what a user happens to type, if there's some lag 21:39:14 Well, I intend to check the cursor position before the user types anything 21:39:30 zzo38: he may have typed something before you first read anything, and it's still in the buffer, 21:39:32 It doesn't prompt for anything at that point in the program 21:39:40 Or before that point, either. 21:40:05 zzo38: in a program like nethack, you probably need to parse all kinds of terminal input sequences properly anyway (keystrokes, mouse, etc) 21:40:18 so just use that and treat \e[1;1R as any other keyboard input 21:40:35 you might use a library for that, like libtermkey, or roll your own 21:41:18 Well, it does this only at the beginning of the program, anyways; it never requests a cursor position after that. 21:41:57 Also, if you type in a terminal that will keep the cursor at the last column when a character is typed there and wrap only after another character is typed, what will be the response for the cursor request? 21:42:19 b_jonas: OK I can understand you but this is not Nethack and stuff like that 21:43:14 zzo38: dunno, tias, it might depend on the terminal 21:44:10 zzo38: as for the scanf, well, I think it's not the proper way, but it might work well enough as a kludge. you can at least try to read as much from the input nonblockingly as there is before you emit the query to make the kludge less likely to fail. 21:44:12 Well, I want to detect the wrapping mode of the terminal as well as the number of rows and columns. 21:44:55 hmm 21:45:00 -!- Patashu has joined. 21:45:02 ask ais about that maybe 21:45:46 It might be a remote terminal, so system calls cannot necessarily be used. 21:45:48 -!- Bicyclidine has joined. 21:46:21 zzo38: terminal size is forwarded well enough on remote terminals, through telnet and ssh and all that 21:47:14 telnet and ssh have a protocol for that, and then they tell the kernel about the size for the master side of the pty with an ioctl, so that you can then read the terminal size from the slave side of the pty with another ioctl fine 21:47:27 just like with "real' terminals 21:47:29 " 21:47:53 it's about the only information you can usually trust to be relayed well through ssh and telnet 21:48:03 you can't really trust the terminal type 21:48:33 but you can probably also use the cursor position query to find the size instead, if that's supported 21:49:38 -!- AnotherTest has quit (Remote host closed the connection). 21:50:08 zzo38: for the terminal size, you can try to check what ais does in libuncursed 21:50:26 I don't know about wrapping, but it's worth a try to ask him 21:50:26 The program can also be run on Windows (although then you have to use non-ANSI mode if the standard Windows terminal window is used). 21:50:38 And I still also want to know the wrapping modes. 21:52:45 zzo38: libuncursed uses the cursor location query to detect whether the encoding of the terminal is a byte encoding or utf-8 21:54:02 -!- tromp_ has quit (Ping timeout: 245 seconds). 21:55:13 -!- AndoDaan has joined. 21:56:55 Yes I can see that can help, but in my case I don't need any non-ASCII characters anyways. 21:59:22 -!- Lymia has quit (Ping timeout: 245 seconds). 22:00:47 zzo38: sure, I'm just saying he might know how to do this 22:08:47 -!- evalj has quit (Remote host closed the connection). 22:18:26 -!- shikhout has joined. 22:18:30 I know that PuTTY can use CSI [18t to figure out the terminal size, although this isn't listed in Wikipedia or anything like that and doesn't appear to be a standard command; also it doesn't detect wrapping modes. 22:18:52 -!- shikhout has changed nick to Guest75924. 22:21:23 -!- shikhin has quit (Ping timeout: 272 seconds). 22:25:01 At least for this wrapping, PuTTY returns the position where the cursor is displayed. 22:25:41 If you have Linux on your computer, can you test to see what it does on Linux? 22:32:32 -!- conehead has quit (Quit: Computer has gone to sleep). 22:33:14 -!- ^v has joined. 22:44:56 -!- tromp_ has joined. 23:19:52 -!- Lymia has joined. 23:25:14 -!- tromp__ has joined. 23:27:33 -!- tromp_ has quit (Ping timeout: 260 seconds). 23:51:47 -!- conehead has joined.