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 <ais523> what's snprintf's behaviour on buffer overflow?
01:37:24 <ais523> specifically, does it use the last remaining character for a NUL. or is it like strncat?
01:39:27 <ais523> I couldn't figure it out from the docs
01:42:47 -!- Phantom_Hoover has quit (Remote host closed the connection).
01:46:04 <coppro> ais523: the docs are quite clear
01:46:08 <coppro> if by docs you mean standard
01:46:28 <ais523> I was using the man page
01:46:36 <ais523> (was checking chasonr's pull request)
01:48:49 <oerjan> new golf, and _all_ the haskellers have 2 less chars than the obvious impl...
01:50:01 <zzo38> 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 <zzo38> I think I haven't done more than forty, though.
01:50:28 <ais523> zzo38: are there any trainer cards that let you put cards back into your draw pile?
01:50:43 <ais523> or better, Pokémon Powers
01:50:47 <zzo38> Yes; MAINTENANCE and GAMBLER and RECYCLE and MR.FUJI are a few.
01:50:48 <ais523> or just attack effects
01:50:55 <zzo38> I don't know of any powers or attacks that do, though.
01:51:19 <zzo38> However, I didn't use any such cards this time, as it turns out.
01:51:48 <ais523> 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 <oerjan> oh wait just one less char
01:52:29 <ais523> 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 <ais523> so 57 because I miscounted first time
01:53:06 <ais523> anyway, going to get antilunch
01:53:09 <zzo38> Although I don't know if anyone has ever managed that
01:53:15 -!- ais523 has quit (Quit: antilunchtime).
01:53:38 <oerjan> interesting ['A'..'Z'] is longer than "POCKET", so it isn't obviously better to cheat.
01:53:46 <zzo38> (And it was my opponent's own fault for running out of cards)
01:55:15 <oerjan> for a language like sed the cheat is obviously better, though.
01:56:13 <oerjan> (basically you're supposed to remove the letters POCKET from each line, but there are no other upper-case chars)
01:58:03 <oerjan> and the obvious sed cheat is precisely the length everyone has on that
01:59:06 <shachaf> Do the programs only get tested against the listed sample inpust?
01:59:34 <oerjan> although ideally you should mark your answer if you do
02:00:34 <oerjan> it's remarkable how many haskell options get thrown out immediately because of the length of import statements.
02:00:59 <shachaf> lambdabot is a somewhat more interesting golf environment for that reason.
02:02:06 <oerjan> also, they are using ghc 7.4, which means you don't even have the (->) monad by default.
02:02:31 <oerjan> it's just 2 years ago or so?
02:03:55 <oerjan> i am not quite sure if 7.10 will include applicative syntax in the prelude, or just the class names
02:04:23 <oerjan> if it does, then 7.10 should be a _lot_ more golfable
02:04:36 <oerjan> shachaf: no, i mean simply that <*> <$> operators
02:04:52 <shachaf> Who knows? I've washed my hands of caring about Haskell.
02:05:01 <shachaf> People are messing it up. It'll be getting steadily worse forever.
02:05:25 <oerjan> um these are supposed to be improvements.
02:05:51 <oerjan> also, you sound like trolling.
02:07:17 <oerjan> i've told you a million times not to do that.
02:08:29 <shachaf> "exec is denied" means you can't use the system call?
02:09:10 <oerjan> people still manage in bash
02:10:25 <oerjan> although maybe that's excluded, because that length everyone has is the same as for tr -d A-Z
02:10:26 <shachaf> OK, 38 characters for POCKET is easy enough. I wonder if everyone's solution cheats.
02:10:57 <zzo38> "Exec is denied" means there is a limit to number of executing external programs; it doesn't apply for shell scripts though
02:11:22 <zzo38> (And usually the limit is just enough to get the interpreter to start, although sometimes there is a bit more)
02:11:45 <zzo38> The source-codes are available so that you can see how it is working.
02:12:02 <oerjan> zzo38: this one isn't closed yet
02:12:20 <zzo38> No, I mean the source-codes for the service
02:12:40 <shachaf> 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 <zzo38> shachaf: There is a testing form
02:14:12 <shachaf> Oh, wait, I can make my solution non-cheating easily enough.
02:21:00 <zzo38> 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 <shachaf> Wait, it's still cheating.
02:37:06 -!- ais523 has joined.
02:42:00 <ais523> does Haskell have an equivalent to OCaml's (|>) by default?
02:42:13 <ais523> hmm, that's a different |>
02:42:29 <shachaf> Apparently it got into base for the next version of GHC.
02:42:47 <ais523> I find it pretty useful for writing things in an order I can actually read
02:42:57 <oerjan> now i think shachaf is just being exaggerating again
02:43:04 <ais523> I find I have to read Haskell right to left
02:43:12 <oerjan> although they could have had a better naming scheme
02:43:19 <ais523> basically I read in the order a language would evaluate, if it were strict
02:43:21 <shachaf> I would be more inclined to accept (&) if there was a reversed composition operator.
02:44:10 <shachaf> People write (x & h & g & f) even though they wouldn't write (f $ g $ h $ x)
02:44:25 <shachaf> If anything & would be a good name for reversed composition.
02:44:41 <ais523> shachaf: is (f . g . h) more idiomatic for that?
02:45:02 <shachaf> Yes, that. Or f . g . h $ x
02:45:08 <ais523> in OCaml, the equivalent of f $ g $ h $ x is definitely more idiomatic
02:45:08 <shachaf> If nothing else then because it can be eta-reduced.
02:45:51 <shachaf> oerjan: I'm only moderately exaggerating.
02:46:22 <shachaf> I got so annoyed about (&) that I left almost all the Haskell channels I was in.
02:46:37 <shachaf> (but it was only a proximate cause)
02:52:34 <ais523> you were planning to leave anyway, but (&) was what helped you make up your mind?
02:52:42 <ais523> offtopic conversation's like that for me in some channels
02:53:25 <shachaf> Oh, come on, you started this one.
02:55:21 <ais523> shachaf: I'm not complaining about this one
02:55:30 <ais523> also I'm not even sure it's offtopic
02:56:26 <ais523> #esoteric hasn't been obnoxiously offtopic for a while
02:56:31 <ais523> and even talks about esolangs sometimes
02:57:50 <shachaf> Is Rice's theorem about the connectedness of some topological space? If so, which one?
02:59:45 -!- shikhout has joined.
03:01:54 <zzo38> 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 <oerjan> rice's theorem can never be off topic here hth
03:04:13 <ais523> 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:05:01 <ais523> 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 <zzo38> I suppose then you have to disable line wrapping mode
03:05:38 <shachaf> Until just now I completely forgot about scrolling regions.
03:06:23 <ais523> zzo38: well if the cursor position goes back to 1, it probably wrapped
03:06:28 <zzo38> 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 <zzo38> ais523: Yes, I could do that too
03:06:43 <ais523> in general, though, terminals are quite inconsistent: http://nethack4.org/blog/portable-terminal-codes.html
03:06:51 <ais523> wrt the printer, I think most terminals ignore it, some log to a file
03:33:29 <Sgeo> [05:16:38] <Gloria> But there's at least one documented case of an intentional trap.
03:33:29 <Sgeo> [05:16:40] <Gloria> https://en.wikipedia.org/wiki/User:Sgeo/null-edit-detector
03:33:32 <Sgeo> I'm documented!
03:34:58 <ais523> Sgeo: why do you have a trap for null edits? just because you can, or is there a better reason?
03:35:34 <Sgeo> I made it over 8 years ago
03:39:50 <Sgeo> https://bots.wmflabs.org/~wm-bot/logs/%23mediawiki/20140526.txt
03:40:01 <Sgeo> I am very curious how the unintentional stuff came into existence
03:42:11 <ais523> huh, #mediawiki dislike Wikia too, interesting
03:53:28 <zzo38> 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 <Sgeo> 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:38:41 -!- AndoDaan has quit (Ping timeout: 260 seconds).
04:59:30 -!- bb010g has joined.
05:26:48 <int-e> Oh, Prelude exports the scan* functions ... useful, but somehow I wasn't aware of that.
05:27:43 <HackEgo> 895) <shachaf> Taneb: STOP TRYING TO GET LENS INTO EVERYTHING <shachaf> Bike: You should use lens! <Taneb> NEVER <Bike> shachaf: i'm getting mixed messages here \ 984) <shachaf> Bike: I think you're ready to learn about lens. <Bike> oh god <Bike> fiora help somebody help <Bike> anybody \ 1186) <oerjan> in that thread Taneb admits to his sins
05:27:58 <HackEgo> 1186) <oerjan> in that thread Taneb admits to his sins. i know this because that comment showed up in my friends list <Taneb> oerjan, today I pushed 217 lines of documentation into lens [...] <edwardk> Say 10 Hail Marys and make 3 more lens commits and your sins shall be forgiven.
05:28:22 <ais523> why is being scared of lens a #esoteric meme?
05:28:25 <Bike> why am i in two different quotes about some library i've never used
05:28:28 <HackEgo> 217) <ineiros> HELLWORLD! <fizzie> It's like HELLO WORLD, except not *quite*. <ineiros> There is more agony.
05:28:43 <Bike> ais523: because whenever people talk about it they sound like spivak and write about as clearly
05:28:50 <int-e> ais523: because lens is not idiomatic Haskell, it's its own language
05:28:55 <shachaf> Bike: Weren't you saying Spivak was supposed to be clear the other day?
05:29:03 <Bike> i'm not good at math
05:29:21 <shachaf> Bike: I,I http://math.mit.edu/~dspivak/teaching/sp13/
05:29:23 <ais523> isn't spivak just a few pronouns?
05:29:23 <Bike> oh it's just adiffeomorphism on the chu space of reverse topological dynamics
05:29:32 <Bike> ais523: he also wrote some math textbooks
05:29:41 <ais523> spivak the person, not the language
05:29:43 <int-e> I think I'm good at math, but lens scares me.
05:29:54 <Bike> it's actually the same person behind the language and the math
05:30:06 <shachaf> lens is a large library based on relatively few important ideas
05:30:51 <shachaf> A lot of it is boilerplate in a sense.
05:31:07 <Bike> http://31.media.tumblr.com/92d0f2626cc975a59a8c7457f79a3ce9/tumblr_nbnhwdTI7c1r7tprao1_1280.jpg
05:31:33 <shachaf> It's also very bad at abstractions for a few reasons -- the insides are all over the exposed interface.
05:31:44 <int-e> (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 <int-e> I also think that the basic lens type has been abstracted beyond recognition.
05:32:59 <shachaf> lens is a trade-off between a lot of different forces
05:33:23 <shachaf> A lot of the complexity is my fault. :-( But it was worse beforehand, really.
05:33:57 <int-e> and of course the sheer number of infix operators is intimidating.
05:34:35 <int-e> concepts, too. Ok, so there are lenses and prisms ... wth is a bazaar?
05:34:55 <shachaf> A Bazaar is a traversal applied to a structure.
05:35:20 <int-e> ...but I just wanted to access record fields elegantly...
05:35:22 <shachaf> Traversals are the central concept of lens. Or they were before profunctors got involved.
05:35:29 <shachaf> You don't need to know about Bazaar to use lens.
05:35:37 -!- AndoDaan has joined.
05:35:49 <int-e> (Yes, that's my fault, trying to understand the library in details rather than following tutorials.)
05:36:04 <Bike> ais523: well, that should explain tings nicesly
05:36:04 <shachaf> No, understand Bazaar is good.
05:37:17 <int-e> 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 <shachaf> Do you know what Traversal is? It's pretty straightforward.
05:38:18 <int-e> Not in so many words.
05:39:04 <int-e> 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:29 <shachaf> If I'm going to talk about lens I probably shouldn't drown out this channel...
05:39:37 <int-e> But I guess the generalisation has a similar motivation as giving lenses four parameters instead of two.
05:40:23 <shachaf> Four parameters is pretty natural.
05:40:37 <shachaf> I can talk about it in #haskell-overflow if you're interested.
05:41:03 <Bike> busy watching people silently play video games in the dark
05:41:08 <int-e> 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 <shachaf> Hmm, I guess you could've been in #-overflow all along.
05:45:27 <shachaf> "s t a b" is my fault too. It was a b c d before that.
05:46:38 <int-e> I'm usually not there.
05:46:51 <int-e> Too many lenses ;-)
05:47:16 <int-e> and please don't tell me that the lens library has shards.
05:47:53 <shachaf> Maybe you can't pluralize that.
06:02:24 <int-e> shachaf: you just love hearing yourself type?! *ducks*
06:03:17 <shachaf> int-e: I'm trying to gather my thoughts for an introduction that I'm going to write someday.
06:03:26 <shachaf> I think you might know all this too well to be a target audience for it, though.
06:10:30 <oerjan> hm bitcoin looks crashy
06:11:42 <Bike> have you ever, like, really looked at your bitcoins
06:14:57 <oerjan> i just like looking at the graph occasionally.
06:30:41 <myname> i only like it if these bitcoin fanboys start to cry
06:31:14 <zzo38> Even 2600 uses bitcoins now.
06:36:07 <zzo38> Do you like the music for staffroll in Pokemon Card GB2?
06:38:05 <Bike> 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 <zzo38> Have you heard of the following quotation before? "Satanism is a Christian's way of becoming enlightened."
08:02:07 <zzo38> It seems that it might have a Zen kind of correctness. (maybe)
08:09:54 <oerjan> i don't know if i'd trust the satanists on that, _even_ if the christians need enlightenment.
08:10:43 <zzo38> 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:35:12 -!- shikhout has quit (Ping timeout: 245 seconds).
08:37:08 <int-e> 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 <HackEgo> 1222) <fungot> we have today opened a smoking zone behind the hemicycle
08:42:36 <oerjan> `run sed -i '1222s/we/[...] we/;1222s/$/ [...]/' quotes
08:42:40 <HackEgo> 1222) <fungot> [...] we have today opened a smoking zone behind the hemicycle [...]
08:44:27 <shachaf> int-e: what's with this pattern
08:45:45 <shachaf> oh, i misread the beginning
08:47:33 <HackEgo> 931) <boily> ais523: I'm not sure my grasp of the English language is getting better by visiting this channel..
08:47:43 <HackEgo> 38) <Deewiant> Reality isn't a part of physics
08:47:45 <HackEgo> 201) <elliott> mtve, now he's an expert idler. <nddrylliog> mtve: kitty kitty kitty
08:47:48 <HackEgo> 155) <Sgeo> 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:50 <HackEgo> 423) <monqy> cigaretes and drunking "lame highs for lame people" <oerjan> 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 <shachaf> Are there any extensions turned on for this golf thing?
09:28:29 <int-e> I guess not, extrapolating from BangPatterns, which are not available.
09:38:43 <shachaf> A file without a final newline is valid, right?
09:39:17 <shachaf> 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 <oerjan> and here again i'm stuck at int-e+1
09:52:12 <oerjan> now to wait for the competition to trounch me again
09:52:21 * shachaf wonders what the clever trick is.
09:53:05 <oerjan> also, how is trounch actually spelled
09:54:31 <shachaf> The special case for the first line is annoying. Perhaps there's a way to do without it.
10:02:46 <ais523> I think "trounce" is probably the word you're looking for
10:03:54 <ais523> what is the pattern for that hello hello world puzzle?
10:04:23 <ais523> I thought it looked like ternary
10:04:26 <shachaf> It looked like a bizarre sort of base 3 until I remembered how 0 works.
10:05:33 <ais523> bleh, Perl doesn't have a function for converting numbers to an arbitrary base
10:05:49 <ais523> although, hmm, I have an evil idea
10:05:58 <oerjan> haskell has, but not without a verbose import
10:06:21 <shachaf> It's verbose even after the import.
10:06:46 <lambdabot> (Show a, Integral a) => a -> (Int -> Char) -> a -> ShowS
10:07:10 <shachaf> Hmm, maybe that actually works well for thise use case.
10:07:11 <oerjan> also, sadly it has that fixed Char type
10:07:21 <shachaf> Oh, so it does. What a scow.
10:08:03 <shachaf> putStr, putStrLn, unlines, unwords, etc. are so verbose
10:08:34 <oerjan> i had an idea that i thought would shave off 3 more chars, but sadly my output started sprouting extra whitespace
10:09:14 <shachaf> I had all sorts of whitespace problems and dealt with them in awful ways.
10:13:31 -!- AndoDaan_ has joined.
10:13:55 <ais523> 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 <ais523> my Perl is apparently ten characters better than your Python
10:20:55 <oerjan> well i've no intention of trying to compete against other languages
10:21:18 <ais523> no, that doesn't really work, indeed
10:21:34 <oerjan> you'd think golfscript would do better than that, though
10:22:30 <oerjan> 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 <oerjan> i guess the same could be said of burlesque *ogles AndoDaan*
10:23:36 <ais523> the strange thing, though, is that this is pretty close to idiomatic Perl
10:23:37 <AndoDaan> hey, it's the first burlesque code
10:23:47 <oerjan> well i guess there's an amount of incompressible text in the problem
10:23:50 <AndoDaan> i've written over 10 characters
10:24:09 <ais523> apart from the compiler warning and the normal trick where you replace one numeric constant with $$
10:24:36 <AndoDaan> I have no idea how not to use "world" and "world!" in my code.
10:24:58 <AndoDaan> there should be a way to copy and modify it, but i don't know how.
10:25:33 <shachaf> Oh, I guess it's the pid. What's the trick?
10:25:37 <oerjan> i have an annoying duplication that i cannot see how to remove without making it longer
10:26:02 <ais523> shachaf: basically ensuring that the PID is the number you happen to want
10:26:09 <ais523> people used to run lots of junk programs to do that
10:26:24 <ais523> then shinh implemented a PID setting script in order to reduce the server load
10:27:45 <ais523> 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 <shachaf> In one case I have it saving nothing.
10:28:23 <ais523> are you interested in my algorithm, btw, in case it translates to Haskell? or would you prefer no spoilers?
10:28:38 <shachaf> 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 <oerjan> maybe i could actually shorten my code by _removing_ the effort to construct "world!"
10:29:35 <shachaf> I don't think I mind spoilers at this point. I'm probably not going to submit a solution.
10:30:20 <ais523> this algo almost certainly doesn't translate well to Haskell anyway
10:30:34 <ais523> could translate well to GolfScript, though
10:31:52 <ais523> actually, no, it's missing relevant builtins
10:32:43 <shachaf> Do you have a special case for 0?
10:33:01 <b_jonas> yeah, perl has that only in some modules
10:33:08 <Patashu> does golf.shinh still limit you to 3 input/output pairs when submitting problems?
10:34:49 <ais523> Patashu: a common workaround is to give hundreds of input lines and hundreds of matching output lines
10:34:53 <ais523> then force the program to run in a loop
10:35:00 <b_jonas> `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 <HackEgo> 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 <ais523> b_jonas: ooh, that's clever; I was considering a solution that worked along those lines
10:35:51 <ais523> probably want to start with $t at w
10:36:03 <ais523> I don't think that algo will beat mine for the actual puzzle, though
10:36:24 -!- Phantom_Hoover has joined.
10:36:45 <ais523> how does Burlesque typically compare to GolfScript?
10:37:25 <AndoDaan> i'm not well versed enough, but I say it can compete.
10:37:28 <b_jonas> `perl -e $t="x";for(1..99){$t=~y/a/x/;print$t++,$"}
10:37:28 <HackEgo> 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 <AndoDaan> the average score is maybe a little lower than golfscript's though
10:38:43 <AndoDaan> http://golf.shinh.org/lranking.rb
10:39:37 <b_jonas> 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 <AndoDaan> hmm burlesque's average is 4th only to golfscript, flogscript and gs2
10:39:58 <ais523> I noticed there wasn't a base conversion in standard library
10:40:02 <ais523> so I came up with something else
10:41:03 <b_jonas> yep. there's conversion only for some particular bases. you can do 10, 26, and most powers of 2 easily.
10:41:43 <b_jonas> 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 <b_jonas> I have some examples on perlmonks
10:42:17 <b_jonas> like, I can arithmetic GF(128) values in three lines of perl
10:43:35 <b_jonas> in http://www.perlmonks.com/?node_id=849259 I do hexadecimal bignum arithmetic in pure perl
10:43:42 <b_jonas> there's like lots of modules as well
10:43:55 <b_jonas> http://www.perlmonks.com/?node_id=863110 does the GF(128) computation
10:45:22 <b_jonas> and it's easier if you only want to increment numbers, not add them
10:47:19 <ais523> made it shorter /and/ fixed the warning, nice
10:48:31 <b_jonas> of course, you should always consider straightforward solutions like repeated division/multiplication for conversion and doing the arithmetic with ordinary numbers
10:49:01 <b_jonas> 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 <mroman_> ais523: Golfscript is usually at an advantage due to shorter built-ins
11:59:23 <mroman_> so for stuff where Golfscript and burlesque solutions are very similar (in how they work)
11:59:29 <mroman_> the Golfscript one will be only 50% in size
12:00:24 <mroman_> i.e. duplicate stdin, reverse, append
12:00:28 <mroman_> is probably three bytes in gs
12:00:33 <mroman_> where it's at least 6 in blsq
12:00:47 <mroman_> 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 <mroman_> Although the average of a language with < 100 submissions isn't really saying anything
12:29:29 <mroman_> gs2 really decreased the averages of pretty much every language :)
12:29:45 <mroman_> blsq was in the 9k range with golfscript, flogscript I think
12:30:21 <mroman_> the problem is for example gs2 has a 1 byte built-in for certain challenges
12:30:26 <mroman_> where other languages need 30B
12:30:33 <mroman_> gs2 get's 10k at that challenge
12:30:42 <mroman_> 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 <Taneb> 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 <int-e> oh, golf.shinh.org allows garbage on stderr...
13:39:29 -!- Vorpal has joined.
13:45:05 -!- LordCreepity has joined.
13:46:56 -!- AndoDaan has joined.
13:48:02 <HackEgo> King2218: Welcome to the international hub for esoteric programming language design and deployment! For more information, check out our wiki: <http://esolangs.org/>. (For the other kind of esoterica, try #esoteric on irc.dal.net.)
13:49:06 <HackEgo> /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 -!- King2218_ has changed nick to King2218.
13:58:01 -!- King2218 has quit (Ping timeout: 246 seconds).
14:04:56 <ais523> what do you mean by "playground"?
14:05:49 <Jafet> Our bots are free-range
14:06:30 -!- sebbu has joined.
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:30:15 <HackEgo> 14:30:02 up 0 min, 0 users, load average: 0.00, 0.00, 0.00
14:30:16 -!- MoALTz_ has joined.
14:30:38 <HackEgo> 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:32:51 <Melvar> LordCreepity: Did you see anything in the reply to `uptime ?
14:33:07 -!- MoALTz has quit (Ping timeout: 245 seconds).
14:33:30 -!- Sprocklem has joined.
14:33:36 <Melvar> 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:26 <LordCreepity> how cna you start up 0 seconds before a command
14:34:55 <ais523> the kernel might just have a habit of lying to you if you ask for privileged/confidential infomraiotn
14:35:11 <ais523> this is in the nature of sandboxes
14:35:12 <HackEgo> Linux umlbox 3.13.0-umlbox #1 Wed Jan 29 12:56:45 UTC 2014 x86_64 GNU/Linux
14:35:47 <LordCreepity> i've never actually gotten that thing to work correctly
14:37:27 <HackEgo> Sun Oct 5 14:37:15 UTC 2014
14:37:42 <b_jonas> 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:38:00 <LordCreepity> 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 <ais523> umlbox is a little weird about what it lets you do, sometimes
14:41:45 -!- AndoDaan has joined.
14:42:22 <b_jonas> 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 <ais523> cat /proc/sys/kernel/random/uuid
14:43:45 <ais523> `cat /proc/sys/kernel/random/uuid
14:43:45 <HackEgo> c03e16c4-a27c-470d-bd76-2faa903a7ff1
14:43:47 <ais523> `cat /proc/sys/kernel/random/uuid
14:43:48 <HackEgo> 930154b8-2b97-47c2-ad5f-2e0e55f9a9d4
14:43:56 <ais523> hmm, it is different each time, at least
14:44:01 <ais523> would be amusing if it wasn't :-)
14:45:21 <LordCreepity> i could troll really badly right now with a cat /dev/random
14:45:40 <ais523> meh, the bot's meant to be impossible to break
14:45:55 <ais523> hmm, that's an interesting approach
14:46:03 <HackEgo> Welcome to the international hub for esoteric programming language design and deployment! For more information, check out our wiki: <http://esolangs.org/>. (For the other kind of esoterica, try #esoteric on irc.dal.net.)
14:46:22 <ais523> the bots are meant to filter out implausible output
14:46:30 <ais523> in this case, I think it just timed out
14:46:41 <ais523> there was a bot who wasn't sanitizing its output recently
14:46:52 <ais523> which caused a bit of a row, but we brought it under control
14:47:19 <ais523> 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 <b_jonas> `od -tx1 -N16 /dev/urandom
14:47:22 <HackEgo> od: invalid character ` ' in type string `x1 -N16 /dev/urandom'
14:47:36 <b_jonas> `cmd od -tx1 -N16 /dev/urandom
14:47:36 <HackEgo> /home/hackbot/hackbot.hg/multibot_cmds/lib/limits: line 5: exec: cmd: not found
14:47:40 <ais523> b_jonas: you mean `run
14:47:42 <b_jonas> `run od -tx1 -N16 /dev/urandom
14:47:43 <HackEgo> 0000000 37 90 97 8f de b8 00 9d cb b4 82 ff 49 9c cc 17 \ 0000020
14:47:55 <b_jonas> that's probably random, but of course you can't tell
14:48:01 <b_jonas> (that's the point of randomness)
14:49:02 -!- AndoDaan has quit (Ping timeout: 244 seconds).
14:49:54 <Melvar> ais523: Not sure what you mean by custom framework … it’s straight off hackage.
14:50:26 <ais523> 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 <Melvar> Um, it’s simpleirc with debug logging turned on, and the debug log puts out literal raw messages.
14:51:36 <ais523> right, and the fix would be for the debug log to escape control codes
14:51:41 <Melvar> So it messes up the terminal, but the bot itself is not affected.
14:56:42 <ais523> hmm, perhaps we need another bot to send terminal reset codes, to put the terminal back to normal
14:57:02 <b_jonas> Melvar: the bot has to filter CR and LF, because those can affect the bot itself, eg. steal its nickserv password
14:58:42 <HackEgo> whoami: cannot find name for user ID 5000
14:58:44 -!- AndoDaan has joined.
14:58:44 <elliott_> I don't think it can steal the password.
14:59:15 <HackEgo> cat: /etc/shadow: No such file or directory
14:59:23 <HackEgo> cat: /etc/passwd: No such file or directory
14:59:29 <ais523> hmm, that's going to break a few things
14:59:49 <HackEgo> su: Cannot determine your user name.
15:00:10 <ais523> 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 <ais523> because it doesn't accept numbers as arguments
15:00:24 <HackEgo> kill: invalid option -- '9' \ \ Usage: \ kill [options] <pid> [...] \ \ Options: \ <pid> [...] send signal to every <pid> listed \ -<signal>, -s, --signal <signal> \ specify the <signal> to be sent \ -l, --list=[<signal>] list all signal names, or convert one to a name \ -L, --table list all sig
15:00:28 <HackEgo> bash: line 0: kill: (1) - Operation not permitted
15:00:35 <HackEgo> 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:47 <HackEgo> 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:01:00 <HackEgo> 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 <ais523> `run kill 0 1 2 3 4 5 6 7 8 9 10 11 12 13
15:01:07 <HackEgo> kill: invalid option -- '9' \ \ Usage: \ kill [options] <pid> [...] \ \ Options: \ <pid> [...] send signal to every <pid> listed \ -<signal>, -s, --signal <signal> \ specify the <signal> to be sent \ -l, --list=[<signal>] list all signal names, or convert one to a name \ -L, --table list all sig
15:01:16 <ais523> `run kill -0 1 2 3 4 5 6 7 8 9 10 11 12 13
15:01:16 <HackEgo> 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 <LordCreepity> what was the command that said "You don't exist. Go away.
15:02:25 <HackEgo> /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:53 <ais523> it can try, but it fails due to the absence of main
15:03:18 <ais523> cc with no args is not ld with no args
15:03:24 <ais523> there are some default args, like crt1.o
15:03:31 <HackEgo> /tmp/a.c:1:1: error: expected identifier or ‘(’ before ‘--’ token
15:03:57 <ais523> `cc int main(void) { puts("test\n"); return 0; }
15:03:58 <HackEgo> /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 <ais523> it's most likely a buggy C interpreter
15:04:31 <ais523> that's the working one
15:06:02 <LordCreepity> `! c execl("/bin/ls", "ls", "/bin", (char*)0);
15:06:03 <HackEgo> 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:07:29 <LordCreepity> know of any c interpreters for linux? googled some before but couldn't seem to find one
15:07:52 <fizzie> The `cc is just an echo "$@" to a temporary file + gcc on it.
15:08:13 -!- AndoDaan has quit (Ping timeout: 260 seconds).
15:08:19 <fizzie> 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:58 <fizzie> Also I think they're moving to Cling.
15:09:02 <fizzie> http://root.cern.ch/drupal/content/cling
15:19:52 -!- AndoDaan has joined.
15:31:13 <fizzie> (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: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 <fungot> Bot prefixes: fungot ^, HackEgo `, EgoBot !, lambdabot @ or ?, thutubot +, metasepia ~, idris-bot ( , jconn ) , blsqbot !
17:35:06 <b_jonas> I'd say remove the jconn entry, he doesn't come here anymore
17:35:26 -!- evalj has joined.
17:35:28 <b_jonas> ] 'evalj doesn''t either, I rarely start it'
17:35:29 <evalj> b_jonas: evalj doesn't either, I rarely start it
17:35:51 <ais523> how many J bots do we have? 3?
17:36:27 <b_jonas> 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 <b_jonas> (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 <b_jonas> (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: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 <mroman_> b_jonas: q#Rc! is btw. duplicate bottom ;)
18:49:47 <mroman_> Today's burlesque related topic
18:50:05 <mroman_> is #Q#q#j#J#s#Sif turing complete
18:50:21 <mroman_> or what's the minimal subset of builtins + #Q#j#j#J#s#S to make it turing complete
18:52:16 <blsqbot> Ain't nobody got time fo' dat!
18:53:44 <fizzie> I have "hello hello world" an initial Forth go, and ended up with 150 characters. :)
18:59:23 <boily> what is an initial Forth go?
19:00:34 <fizzie> 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 <fizzie> Aw, mplayer's playback speed twiggle just resamples instead of properly time-stretching.
19:19:52 <fizzie> It doesn't seem to be a terribly high-quality one.
19:20:53 <boily> 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: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 <AndoDaan> okay, mroman_, tell me which is the state stack, and which the normal stack.
19:56:45 <fizzie> Can someone else answer, or does it have to be mroman_?
19:58:16 <fizzie> 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 <AndoDaan> I think that was my understanding, but when i try and peek and pop, pop goes my interpreter.
19:59:43 <fizzie> Have you put anything there to peek/pop?
20:01:23 <fizzie> There's nothing on the state stack to pP from, I don't think.
20:01:43 <fizzie> !blsq 0Pp "foo bar baz quux"wd{PP+.JPp ?+}m[
20:01:43 <blsqbot> {"foo1" "bar2" "baz3" "quux4"}
20:01:55 <fizzie> There's an example of using the state stack to do a manual counter.
20:02:35 <fizzie> Though I'm sure that particular example would be better with some sort of zip-based thing.
20:03:19 <AndoDaan> okay, the firs PP puts "foo" too here0Pp
20:03:35 <fizzie> The 0Pp puts a 0 on the (initially empty) state stack, yes.
20:04:12 <fizzie> 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:05:06 <fizzie> What, like, stdin is on both stacks initially?
20:05:28 <fizzie> Well, I didn't know that. At any rate.
20:05:29 <AndoDaan> ah, i think i see my misunderstanding
20:06:10 <AndoDaan> going to mess around a bit, thanks!
20:06:28 <mroman_> but fizzie explained it perfectly otherwise
20:07:58 <fizzie> For the record, "foo bar baz quux"wd1R@{?+}Z] would presumably be better for the particular example I used.
20:08:28 <mroman_> There are some implications for laziness though when using the secondary stack
20:09:08 <blsqbot> Ain't nobody got time fo' dat!
20:09:37 <mroman_> doing a pP here will make the code never terminate
20:10:20 -!- conehead has joined.
20:11:11 <mroman_> (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 <mroman_> even though you may think with 10.+ the state stack will only contain 10 elements as well...
20:13:59 <fizzie> 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:15:07 <fizzie> I noticed that was the case for .+ and some others, but not e.g. !!.
20:15:39 -!- GeekDude has quit (Quit: {{{}}{{{}}{{}}}{{}}} (www.adiirc.com)).
20:15:40 <fizzie> Maybe "e.g." is wrong, !! is the only thing I ran across, really.
20:16:05 <blsqbot> ERROR: Burlesque: (!!) Invalid arguments!
20:16:08 <blsqbot> ERROR: Burlesque: (!!) Invalid arguments!
20:16:25 <mroman_> fizzie: I'll add it to the todo list
20:17:55 <fizzie> I didn't even know about ch. But the n! makes it not quite the same as !!.
20:18:39 <mroman_> there's a shorter way to do that
20:18:45 <AndoDaan> !blsq 'e {1 1}{{'a 'b}{'c 'd}}D!
20:18:46 <blsqbot> ERROR: Burlesque: (D!) Invalid arguments!
20:18:48 <blsqbot> ERROR: Unknown command: (cw)!
20:19:07 <mroman_> mainly because "yes no"wd is shorter than {"yes""no"}
20:19:24 <mroman_> AndoDaan: other way around
20:19:49 <AndoDaan> !blsq {{'a 'b}{'c 'd}}{1 1}'e D!
20:20:46 <mroman_> fizzie: the actual policy is if something is
20:21:10 <mroman_> 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 <mroman_> 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 <mroman_> what doesn't work is Block f, Any a for example
20:21:47 <mroman_> because a could also be a block
20:23:07 <mroman_> this could also support Char b, Str a
20:24:12 <mroman_> there are a lot of built-ins where you could do that
20:24:29 <fizzie> 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:25:27 <blsqbot> ERROR: Burlesque: (td) Invalid arguments!
20:25:53 <fizzie> Well, okay, yes, I also wanted to go from '0 to 0 and '2 to 2, not just '1 to 1.
20:26:44 <fizzie> (The "ri tests chars for alpha-numericness" was a nice twist.)
20:27:57 <fizzie> !blsq '2XXti "also works"vv
20:28:46 <fizzie> I guess XX and [- do the same for a char argument.
20:29:21 <mroman_> ti could actually do Char -> Int
20:30:59 <fizzie> 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 <zzo38> 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 <Taneb> 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 <ais523> is it the same Liam every time?
21:02:31 <ais523> 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 <zzo38> Can scanf("%*1[ ]") be a proper C code?
21:28:25 <ais523> zzo38: no, because you didn't give it enough arguments
21:28:35 <ais523> also I don't think that 1 is legal in that context
21:29:31 <zzo38> ais523: Why is that? How should it be?
21:29:33 <b_jonas> ais523: but the * means there's no argument
21:29:47 <ais523> b_jonas: did I confuse scanf with printf?
21:30:01 <ais523> I thought * meant it consumed an argument to get a count
21:30:14 <b_jonas> dunno, I'm not sure it's legal or standard or anythin
21:31:03 <b_jonas> zzo38: do you want to execute it? I think if you never execute it then it's leval
21:31:21 <b_jonas> (hey, sorry for nitpicking, but we're on that channel)
21:31:50 <Taneb> ais523, it has happened with two different Liams
21:32:19 <zzo38> b_jonas: Yes if it is executed how do you expect it to work
21:32:48 <ais523> 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 <b_jonas> 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 <zzo38> 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 <b_jonas> (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 <b_jonas> zzo38: no, because you may get other input from the terminal before that reply
21:37:59 <zzo38> 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 <b_jonas> and this may partially match that other input, consuming a prefix
21:38:16 <fizzie> \e is also not one of the standard escape sequences, though it's quite common.
21:38:17 <b_jonas> zzo38: the locale is already the C locale unless you specifically set it otherwise
21:38:27 <b_jonas> zzo38: it's trickier in a library of course
21:38:46 <zzo38> What other input from the terminal will come up?
21:38:55 <b_jonas> zzo38: what a user happens to type, if there's some lag
21:39:14 <zzo38> Well, I intend to check the cursor position before the user types anything
21:39:30 <b_jonas> zzo38: he may have typed something before you first read anything, and it's still in the buffer,
21:39:32 <zzo38> It doesn't prompt for anything at that point in the program
21:39:40 <zzo38> Or before that point, either.
21:40:05 <b_jonas> 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 <b_jonas> so just use that and treat \e[1;1R as any other keyboard input
21:40:35 <b_jonas> you might use a library for that, like libtermkey, or roll your own
21:41:18 <zzo38> Well, it does this only at the beginning of the program, anyways; it never requests a cursor position after that.
21:41:57 <zzo38> 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 <zzo38> b_jonas: OK I can understand you but this is not Nethack and stuff like that
21:43:14 <b_jonas> zzo38: dunno, tias, it might depend on the terminal
21:44:10 <b_jonas> 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 <zzo38> Well, I want to detect the wrapping mode of the terminal as well as the number of rows and columns.
21:45:00 -!- Patashu has joined.
21:45:46 <zzo38> It might be a remote terminal, so system calls cannot necessarily be used.
21:45:48 -!- Bicyclidine has joined.
21:46:21 <b_jonas> zzo38: terminal size is forwarded well enough on remote terminals, through telnet and ssh and all that
21:47:14 <b_jonas> 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 <b_jonas> just like with "real' terminals
21:47:53 <b_jonas> it's about the only information you can usually trust to be relayed well through ssh and telnet
21:48:03 <b_jonas> you can't really trust the terminal type
21:48:33 <b_jonas> 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 <b_jonas> zzo38: for the terminal size, you can try to check what ais does in libuncursed
21:50:26 <b_jonas> I don't know about wrapping, but it's worth a try to ask him
21:50:26 <zzo38> 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 <zzo38> And I still also want to know the wrapping modes.
21:52:45 <b_jonas> 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 <zzo38> 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 <b_jonas> 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 <zzo38> 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 <zzo38> At least for this wrapping, PuTTY returns the position where the cursor is displayed.
22:25:41 <zzo38> 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.