12:25 AM
CMQ: Do you have a question you think was underappreciated (in terms of votes/# of answers/etc.)? If so, tell me which one, and I'll be happy to give it a try, see if a new answer can draw some more attention

10

Inspired by this excellent challenge (from which the bulk of this text is blatantly duct-taped) – and my highschool philosophy project... I define the following operators: Fuzzy Conjunction a ×F b is a × b Fuzzy Division a ÷F b is a ÷ b Fuzzy Negation –F b is 1 – b Fuzzy Disjunction a +F b i...

@Adám Does "extend the language of your choice to include the notation." mean that I can define 4 functions that take the necessary arguments and return the correct results?

I generally like interpreter questions, they're the part of programming that appeals to me

@Wezl I both like and dislike most good questions, as my go-to language for golfing is Jelly :/

@cairdcoinheringaahing That'd only be valid if you can get the required infix syntax into your language. Otherwise the whole thing becomes rather trivial.

12:37 AM
I'm thinking about redoing my dotcomma interpreter challenge, I ended up deleting it for some reason but I think it'd be an interesting challenge

@Adám I think I've got a Jelly answer that should work, let me know on my (incoming) answer if not

Will do.
Heh, we need a "Sandbox for proposed answers"…
5

12:49 AM

@cairdcoinheringaahing I'd say it is almost acceptable. Can you insert some string substitution preprocessing before you eval-as-Jelly? Then you can actually use `×F` etc. in the code.

@Adám Shouldn't be too hard, I'll get on that

Cool

@Adám Given that it's getting late here and that Jelly hates 2-letter substitution more than I expected, I might have to give it a proper go tomorrow. I'll delete my answer until I get it tho

1:07 AM
No worries. I hope you're having fun at least.

@Adám Oh, bending Jelly to my will is always fun, until I realise I've been copy-pasting the `F` character the entire time :P

haha, yeah, that's just a normal F.

Well, it's disgustingly hacked together, but it works :D (editing + undeleting now)

Disgustingly hacked together? That's the spirit we all want to see!

I'm including my old version because I quite like it (and it almost meets the challenge spec), but I'll use my disgusting version for my score :)
@Adám Kinda weird question, but can we take input with a trailing space?

1:25 AM
@cairdcoinheringaahing That's an interesting question. I've also not specified internal spacing, though all my examples have a single space between tokens. I guess I'll allow it, though I can't imagine it takes a lot of Jelly to append a space, does it?

@Adám It's +2 bytes in Jelly, so not a massive issue if not, but every byte helps :P

@cairdcoinheringaahing Added explicit rule about spacing, and also that you can use `_` for minus if you're using Jelly.

@Adám Oh yeah, I did kinda assume `_` was allowed, but thanks for making it explicit :)

2:03 AM
@Adám Still disgustingly hacked together, but now 13 bytes shorter than an hour ago, I've undeleted my answer :P

Upvoted, but ugh, Jelly needs regex support.

Well, if a regex does the job, you just wouldn't use Jelly.

And if a regex does part of the job?

i feel like regex wouldn't fit in jelly's style of doing things

2:12 AM
@Bubbler That's just for specific tasks in golfing, and only uses regex as preprocessing too.
@Razetime Could pretty much be implemented as in APL, no? Last two links would make the pattern(s) and the transformation(s)

@Adám yeah but it's just gonna be another two byte builtin which only makes string based tasks less interesting

@Adám that’s something that’s been hit hard by Dennis’ hiatus. There’s been a PR for regex atoms since 2018 that was being worked on

IC.

2:30 AM

@Bubbler That's very elegant. Post it!

It works great and handles multiple test cases just fine, except that it can't handle newlines in the input properly

@Bubbler Right, but for the "try all test cases" link, you can use `⍎⍤1⎕FMT⍵`

9 hours later…
11:33 AM
CMQ: What is the longest Jelly answer you have seen/written?
Just saw this one

A very space consuming 14 bytes

11:48 AM

12:05 PM
@Lyxal Not at all, but I’m kinda busy today, so I’ll take a look when I can :)

12:30 PM
@fomin i'm thinking of mounting a second attack on your challenge
if only i knew how to dfa an nfa, the dfa could be used to generate its language

3 hours later…
3:39 PM
I know how to do that :)
I think there was a challenge on NFA to DFA too
@ngn ^^^

4:34 PM
@Adám Do we have to handle regular negation, or can we change the `-500` test case to `0 - 500`?

4:49 PM
@cairdcoinheringaahing No, negation isn't on the list of required functionality.

@Adám Ok, good. Now I just need to find a way to remove another byte so I can tie with QuadR :P

5:57 PM
@ngn the cheesy way to convert nfa to dfa is to have 2^n states where each DFA state is a sum of powers of 2 of the states that the nfa might be in at the time

Any way to golf this HTML/CSS/JS?

@Neil right, that can work. for this challenge it's easy to construct of an nfa with 3*(n+1) states, where n is at most 16. so bitmasks can fit in 64 bits.

6:15 PM
@Adám all I see is the default template

@Adám rm `"` around attribute values where possible

@JohnDvorak What? Isn't it populated with some HTML?

@JohnDvorak try reload. i got the default template the first time too.

... how does that (fail to) work?
`font:monospace` should work?

Nope.

1 hour later…
7:18 PM
@ngn How did you get in with the automata?

@Anush i'm still struggling :)

Ah.. Is it the conversion to DFA that is the problem?

@Anush i have a dfa (not necessarily correct) already. now i'm trying to count the possible outputs without generating them.
but i'm getting fewer than expected for "obenquillo" :(

@Adám can you get away with `onload` or at least `onloadend` instead of `onreadystagechange`?
`<code><input style="font:inherit"` is slightly shorter I guess

@ngn ah. Can you try it with the empty string?

7:25 PM
`join`\n`` ("template string")

@Neil No.

@Anush it prints "1"

If it doesn't work for that you know you are in trouble :)
It sounds be 95 + 95*95

huh, why not, need to support IE9 or something?

I am talking about the number of strings within edit distance 2 of the empty string

7:28 PM
(side note: is the result HTML, if not, use `innerText`)

@Anush i got so carried away with these automata, i forgot what challenge i'll use them for :)

`with(new XMLHttpRequest()){...}` might save some bytes

Ooh, "with" exists. Nice.
@Neil Actually, it does. Something had gone stuck.

@Anush +1 for the empty string itself, i think

well that's all I can think of offhand

7:34 PM
@Neil Such golf, very hack.
5

@Neil @Adám are the parens after `new XMLHttpRequest` required?

@ngn Apparently not :-)

@Anush now i'm much closer but still missing some

8:11 PM
@ngn :)

@Anush can you give me another test case?

@Neil Thank you so much. You inspired me to even more golfs.

2 hours later…
9:57 PM
@ngn does the empty string work now? You could try the single letter a. I can make some more complicated ones in about 12 hours