« first day (1915 days earlier)      last day (2931 days later) » 

1:00 PM
@EᴀsᴛᴇʀʟʏIʀᴋ I'm not gonna write 150 more snippets. :P
(I am considering preparing something for 300 though... it's approaching pretty quickly though, so I'm not sure I'll make it on time.)
 
aw
but i understand. :P
300 would be nice.
 
@MartinBüttner I can switch over to a downvote and forget to fix it back, if it helps
 
ohai @QPaysTaxes and @El'endiaStarman
 
@Sp3000 :P
 
1:01 PM
@EᴀsᴛᴇʀʟʏIʀᴋ Uhh...
> I think this will be my last snippet, unless I come up with something really mindblowing. Hope you enjoyed this!
 
has Geobits voted yet?
 
@EᴀsᴛᴇʀʟʏIʀᴋ No.
 
Yeah, he's the single downvote
 
@EᴀsᴛᴇʀʟʏIʀᴋ I'm also pretty close to the character limit.
 
Geobits has downvoted.
 
1:02 PM
@MartinBüttner ... that would happen.. but woah that makes me realize how long it is
 
@EᴀsᴛᴇʀʟʏIʀᴋ Yes, Geobits has voted.
 
While I'm here, just for fun I reversed the enumeration of the Labyrinth sequence (that is, reverse all but the first bit before converting the number to Labyrinth code), and the sequence looks a lot tidier:
 
@MartinBüttner Looks like a level in a platformer :)
 
1:04 PM
@Geobits pretty repetitive...
 
I didn't say it was a good level.
 
or a good platformer...
 
@MartinBüttner Can we call it Cantor's Logarithm?
 
0
A: The J programming language: is it useful for mathematics?

Cᴏɴᴏʀ O'BʀɪᴇɴJ is very useful. While it has its quirks, once you get used to them, as gar said, you can really understand the language quite well. I consider myself a novice at J, but being exposed to it, I can definitely tell what the example in the accepted answer's "mysterious code". It's easy enough to sa...

learn J
 
1:06 PM
Y's also a good language.
 
@HelkaHomba uh, sure.
 
@HelkaHomba It's decent, but don't read the source.
 
Just for context, it's a different enumeration of the sequence from this sandbox post.
 
1:07 PM
No, J not K. (JK?)
 
</badpun>
@Quill you can award the bounty to @Sp3000's answer.
 
@EᴀsᴛᴇʀʟʏIʀᴋ The bounty is expiring in two days.
 
Too soon probs, there's still two days
 
ninja'd
 
1:09 PM
yeah I got that :P
 
@zyabin101 does it auto-award to the answer?
And yeah, there is 2 more days.
@MartinBüttner the mathematica answer is so long, it takes forever to scroll to the FOG showcase. :P
 
if it's auto-awarded, it become half of what it was
 
@Sp3000 I see, thanks
 
@EᴀsᴛᴇʀʟʏIʀᴋ The auto half-award is only if the bounty setter is really lazy and only to the best answer.
There is also a threshold. I think it's 5 votes.
 
okai
and to the most-voted, which isn't the desired one
 
1:11 PM
If no answer reaches the threshold, the rep is permanently wasted.
 
Interestingly, while the plot of the above reversed sequence is much tidier, the actual sequence of values seems a lot messier. I can't quite figure out the pattern, whereas it's a lot more obvious in the original sequence.
@zyabin101 I think it's just positive score?
 
@MartinBüttner Net score.
 
@KennyLau ಠ_ಠ
 
1:13 PM
@ಠ_ಠ KennyLau
 
@ಠ_ಠ come chat with us?
@CᴏɴᴏʀO'Bʀɪᴇɴ how did you get comments working that aren't inside strings in Jolf?
Like escaping //?
 
@EᴀsᴛᴇʀʟʏIʀᴋ I have to change the name to Disapproval Face and say "Wish granted."
Okay, just have your wish granted and call me Disapproval Face.
 
@EᴀsᴛᴇʀʟʏIʀᴋ did I?
 
Hello
 
1:15 PM
I don't think I did
 
@CᴏɴᴏʀO'Bʀɪᴇɴ // is comment, correct?
 
Yeah, but I broke comments recently
 
1:19 PM
Patterns of two non-constant runs in the reversed sequence: pastebin.com/raw/Hr92Nzt6 ... there is a pattern, but I don't really get it.
 
it is impossible to figure a pure-mathematical equation for the evolution of this series
 
@Agawa001 pure-mathematical?
 
@MartinBüttner How to determine if I should make a question a catalogue?
 
yes because the pointer switches direction from both edges in unexpected manner
 
i think you don't do that anymore.
 
1:22 PM
:29287454
 
@KennyLau Is it a common programming exercise?
 
@Agawa001 no, it has a rule.
 
@zyabin101 No it is not
 
link to quesiton?
and if not, don't make it one
 
Then you have porblems.
 
1:24 PM
Alright
 
but regex is, and it is a b*tch.
 
anyone know if trig functions exist in J?
 
Censor it more! b**ch
@QPaysTaxes 11
 
@QPaysTaxes 101
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Yes
 
1:26 PM
@KennyLau simple: don't
 
@Sp3000 cool, thanks!
 
@QPaysTaxes Then 100000000000000000000000001.
 
@MartinBüttner right
 
You can't have that much porblems.
 
@KennyLau If you want to encourage answers in many languages, include a leaderboard, don't accept an answer, and make sure that your rules are as inclusive for weird languages as possible.
Don't call it a catalogue, that project seems to have done more harm than good.
 
1:27 PM
@MartinBüttner I see, thanks
 
And ideally, if you want to make it a sort of "authoritative" reference for golfed solutions to your problem, sandbox it, so that the community can help making the spec as good as possible.
 
I have a commenting problem. I attempted to use a regex to solve it. Now I had 3 problems and fixed 1. Then I fixed another. Now my problem is the regex doesn't work. Please halp.
def _uncomment(self, program):
    return re.sub("#.*?\n", "", program)
That is my code.
 
@Agawa001 I'm pretty sure there is some sort of recursive definition. If you just look at the numbers, they definitely follow a pattern.
 
The regex is supposed to remove anything from # on.
but it doesn't work.
@QPaysTaxes okai, but does that work in python?
 
@EᴀsᴛᴇʀʟʏIʀᴋ with multiline mode, yes
 
1:30 PM
@EᴀsᴛᴇʀʟʏIʀᴋ i know it has an arbitrary rule, but mathematically !! it is hard to translate, look here the first example third step the pointer switches direction at the edge but in the second example second step the pointer reaches the rightmost edge but havent switched direction see!
 
@MartinBüttner how can I enable that? Or is that default?
@Agawa001 hard, yes, impossible, who knows.
 
@EᴀsᴛᴇʀʟʏIʀᴋ you should be able to give re.sub a parameter re.M
 
Fermat's last theorem was hard.[citation-needed]. Not impossilbe.
@MartinBüttner okai
 
probably
 
Okay, that works. Thanks.
 
1:34 PM
@EᴀsᴛᴇʀʟʏIʀᴋ Note that "removing everything after #" still won't help with the "#s in strings" problem, just a reminder
 
i know......
But that is my backup plan.
 
You could probably tell if it is in a string with a negative lookahead.
 
Sounds painful.
Other than that, explain?
 
Do you know what a lookahead is?
 
1:37 PM
A lookahead (denoted by (?=...)) basically says "match only if this pattern matches, but don't consume the matching part of the string"
 
@quartata No.
@quartata oh, okay.
So if it was a re.sub or whatever, doesn't replace that part.
 
A negative lookahead is (?!...). It's the same except it is don't match
 
okay. So re.sub('#.*?(?!\")$', "", program, re.M)?
 
@EᴀsᴛᴇʀʟʏIʀᴋ .*??
What is the ? for?
 
non-greedy match
 
1:40 PM
Oh
 
so it doesn't keep going forever until it hits the final \n
 
What if you have #"123"?
 
But
Why not just #.*?
 
Because that is greedy
 
1:41 PM
Why does @EᴀsᴛᴇʀʟʏIʀᴋ want a non-greedy match?
 
so it needs a even numbers of "
 
It'll consume as much as it can including the newlines. It'll match all the way up to the final line
 
1 min ago, by Eᴀsᴛᴇʀʟʏ Iʀᴋ
so it doesn't keep going forever until it hits the final \n
ninj'aed
but my was a re-ninja
 
but doesn't . = [^\n]?
 
We are not making the ultimate comment here.
 
1:42 PM
@EᴀsᴛᴇʀʟʏIʀᴋ Yeah. What are you doing this for again?
 
@quartata remove comments
except in strings
@QPaysTaxes okai
wait
 
Right but what language
 
@quartata You probably don't want just a regex
Use Sublime-style scoping
 
1:43 PM
I think there is an SO question n this actually
 
i.e. look for the first string delimiter, make inString true
 
also ^^^
 
@QPaysTaxes working on that.
 
I tried it, it didn't work.
 
1:44 PM
@QPaysTaxes even if it isn't html? :P
 
@quartata MS Paint, but I'd use paint.net now.
 
My first programming language was an abomination
 
then look for next ", then set inString to false if string[index - 1] != '\\'
 
@CᴏɴᴏʀO'Bʀɪᴇɴ can i has helpingness privledges for jolf comments
 
@EᴀsᴛᴇʀʟʏIʀᴋ for what?
 
1:44 PM
okai
> for jolf comments
to helps with fixs them
 
@QPaysTaxes \\ = escaped \
Hmm
 
@EᴀsᴛᴇʀʟʏIʀᴋ google match not in strings. I remember there is a really clever regex for this
 
@EᴀsᴛᴇʀʟʏIʀᴋ ohhhh
 
It uses alternations instead of lookaheads
 
no, I have a version I need to update.
 
1:46 PM
okai
@CᴏɴᴏʀO'Bʀɪᴇɴ "#fail"
 
This problem would have been even more fun if FOG strings had escapes, but as it is you can't actually seem to type "s in a "..." string
 
@EᴀsᴛᴇʀʟʏIʀᴋ I'm in class, not thinking very much about that.
 
okai
@Sp3000 hm
that might be for the better
 
(I'd help with the regex but I wouldn't recommend regexes, so I'll be on the sidelines debunking any regexes you come up with :P)
 
FOG?
 
1:47 PM
@QPaysTaxes Good luck!
 
@quartata can't find it
@HelkaHomba My programming langauge, Fuzzy Octo Guacamole.
 
@HelkaHomba Easterly Irk's latest composition [/pun]
 
pro-tip: never let github pick the name unless you really don't care
@QPaysTaxes noice
what about?
ruby?
 
@QPaysTaxes bows
 
regex and html?
@Sp3000 I think you mean "badpun"? :P
but actually nice one
 
1:49 PM
@QPaysTaxes I could try if it's not too long, but otherwise maybe later
 
Ah k
 
Need fun title for something about triangular symmetries
 
^
10/10 actually fits
 
Maybe
 
1:51 PM
Any more to work with without giving it away?
 
@HelkaHomba Trifecta of Symmetry
not too great but eh
 
If you need to find the Illuminati, ask Hanzi. He's an expert.
 
22
A: Alternative to regex: match all instances not inside quotes

zx81Azmisov, resurrecting this question because you said you were looking for any efficient alternative that could be used in JavaScript and any elegant solutions that would work in most, if not all, cases. There happens to be a simple, general solution that wasn't mentioned. Compared with altern...

 
@QPaysTaxes I wouldn't accept. I saw them kill a guy down by the water once. They did it once, and they can do it again...
 
1 0 0 1  <- outputs 2 for fold symmetry
 0 0 1
  0 1
   1

0 1 0 0 <- outputs 3 for rotational symmetry
 0 1 1
  1 0
   0
@Geobits ^
 
1:54 PM
@EᴀsᴛᴇʀʟʏIʀᴋ Found it. I used to use this for Pytek's preprocessor
 
what programming is used to create windows programs with basic or advanced GUI for personal use?
 
So it's classifying what type of symmetry?
 
@JesterTran VBA
 
1:54 PM
@JesterTran or C#
 
Or html/js even
 
or C
 
or Java
 
thanks
 
1:55 PM
@HelkaHomba I think he's asking for the actual GUI
 
what about mac os? objective C?
 
Objective
 
or Swift
or Java
 
Swift sucks though.
 
I didn't say it was a good language, I just noted that it was used
 
1:57 PM
If you want to make something cross platform use Java and JavaFX or Swing
 
thanks
everyone
 
@HelkaHomba Bermuda Symmetries
(a play off of "Bermuda Triangle")
 
> Mirror Mirror on the wall, does this triangle match at all?
3
(sorry)
 
@JesterTran WPF
 
2:05 PM
@Quill Here's a program to generate the URL: repl.it/CJxg/2
 
Pet peeve: people using + to mean "and".
 
It's a legitimate use of the word plus. When you and a friend both attend a party that only you were invited to, your friend is considered "plus one".
 
@quartata my ending regex that works!
#(?!\\"|"(?:\\"|[^"])*"|(\+)).*?$
@CᴏɴᴏʀO'Bʀɪᴇɴ yah
 
@EᴀsᴛᴇʀʟʏIʀᴋ cough
 
shit
it works for me?
 
2:11 PM
@EᴀsᴛᴇʀʟʏIʀᴋ \+?
wait
 
why do you need a literal plus?
 
wtf is that for
idk
 
Easterly Irk copied that from the SO answer without considering the context of the SO question :P
 
yah
and added more for my case
 
2:14 PM
Why on earth are you parsing a language with R̨̨͇͚̤̲͔̺̗̙̈̊̏̅̎̊̃͐̆̕è͚͉̠͙̺͔͚̙̦̞̆͌̉͊̊͗͘͝͝g̨̬͚͙̘̫̳̮̘̔̈̈́̋̈́͑̈̾͊͠ͅë̩̹̦̖͓̬̎̈́̀̑̋̐̓͂͋‌​͖̮̭̰x̛̳͇͍͚͉̫̖͔͖̌͛͗̽͊̆̌̒̚͜
 
not a language
a part of a language
 
still. ಠ_ಠ
 
and nice zalgo, fairly balanced
 
("[^"]*")+\s+#.*
^ Works fine assuming no " escaping
 
2:16 PM
Will use that for now.
\s?
 
you should have " escaping
 
replace with $1
 
a whitespace character
 
@MarsUltor in python?
 
@EᴀsᴛᴇʀʟʏIʀᴋ Yes
 
2:17 PM
Python uses \1, btw.
and it doesn't work
 
keeps getting mixed up
hmm
What are you testing it on?
 
"#"#X
It should leave "#", and remove the "#.
 
@MarsUltor That assumes the line contains at least one string: link
 
just use a friggin parser
 
if yous makes parser
 
2:22 PM
^^ The more sensible choice, but this is amusing :)
3
 
Regex is great and does all things.
 
@EᴀsᴛᴇʀʟʏIʀᴋ Use Rennet - oh wait, that's in JS
Or ANTLR
 
Just ask Retina.
 
got it
without regex
def _comment(self, program):
		try:
			program.index('\n', self.idx)
			self.continue_count += program.index('\n',self.idx) - self.idx
		except:
			self.continue_count += len(program) - self.idx
 
Retina's kinda like Regex++ with libraries though :P
 
2:23 PM
The starboard is really strong today. 19, 19, and 26 stars.
 
stack = []
if char == '"':
  string = ""
  next_char()
  while char != '"'
    string += char
    next_char()
 
normally it hits 8 max for a day
@CᴏɴᴏʀO'Bʀɪᴇɴ Not nessacary, " just slices to the next ".
And then skips any commands.
 
@EᴀsᴛᴇʀʟʏIʀᴋ You can still use regexes, just not really complex ones
 
eh
no regex works fine
 
2:26 PM
regex,parser,regex,parser, who wins
 
@EᴀsᴛᴇʀʟʏIʀᴋ oh well
@Agawa001 parser, parser, parser, parser
 
Parser because regex can only "parse" regular languages
 
@Sp3000 you said I needed better/different commands?
 
2:29 PM
Although modern regex flavors can handle some more advanced things
 
@Agawa001 Regex pluck
Parser pluck
 
the lookahead and lookbehind makes regex powerful to parse complicated structures
 
/o\
 
@EᴀsᴛᴇʀʟʏIʀᴋ Well not necessarily, it just depends on what your goals with the language is
 
Fun. Golfyish (not even trying to beat jelly). Experience and practice with more Python.
 
2:30 PM
@quartata I'm still waiting for a retina self-interpreter
 
^
@Sp3000 if you have any ideas, please feel free to say them in the FOG discussion room.

 FOG Discussion

Fuzzy Octo Guacamole Discussion. Github: github.com/RikerW/Fu...
 
@Agawa001 I assumed we were talking about regex as in basic regex. egular expressions by definition define regular languages.
 
Finally got a fiber internet connection \o/
 
sweet
 
2:36 PM
I didn't even have to pay for the upgrade. My landlord did.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ It's definitely possible just... hard
 
chat needs moar talk
 
in class boi
 
not you then
but somebody other than me. Q_Q
 
@EᴀsᴛᴇʀʟʏIʀᴋ Practice more
 
2:53 PM
@Sp3000 Okay. My username is @zyabin101. I have 1085 pts.
Yours?
Damn slow 'net connection!
 
I don't think I ever use a username when I use that site tbh
 
@Geobits I strongly believe that should and will happen sometime in the future; Star Trek also addressed that e.g. in "The Neutral Zone"
I forget where I got a reference to that clip..
 
@Sp3000 But your score?
 
also, that will be the moment when we start to become a civilized society (we're still savages currently)
 
2:57 PM
@HelkaHomba Ooh - I'm in the middle of writing a triangly challenge. I'm going to call it "Gasket Weaving" because it features the Sierpinski Gasket
 
@aditsu I have a feeling it's still a long way off :/
 
quite likely
greed is a huge obstacle
 
@KennyLau do u owe this website ?
where the binary simulator is hosted
 

« first day (1915 days earlier)      last day (2931 days later) »