« first day (4195 days earlier)      last day (647 days later) » 

12:03 AM
@Neil In my experience, staying up an extra half-hour usually works :P
 
 
2 hours later…
1:58 AM
I need to create a github account called figgan and use it to make a golflang called Seg.
8
 
2:34 AM
on seeing that i immediately thought that it just has to be some cursed amalgamation of keg with sed
 
3:09 AM
Oh gosh that's terrifying
 
@UnrelatedString Well now someone has to make it, and I nominate you :p
From here on out the punishment for cursed language ideas is having to make and use them :p
 
0
Q: Rearrange to a palindrome

emanresu AGiven a string, shuffle it so that it becomes a palindrome. For example, adadbcc can be arranged into dacbcad, or dcabacd, acdbdca and more. Any of these (or all) is acceptable, and duplicates are allowed if outputting all. Something like abc cannot be shuffled into a palindrome, and you can assu...

 
3:44 AM
@Deadcode No, I mean that your algorithm must work for all possible inputs except maybe some finite set of them. I wasn't thinking of any particular algorithm, but if you remove the edge-cases from any algorithm which handles them then you'll probably get this behavior. My main hope is that it would allow more interesting approaches, regardless of whatever the challenge is, without making boring ones more prevalent.
 
LDQ: what are some good operators to add if im lazy and only want to do things that are easy
asking because im lazy and i only want to do things that are easy
LOL um better question to those offended: what are some good operators to include that might be easy to miss?
like anyone will think of pemdas, maybe string concat,
range,
idk im so sleepyy
@CommandMaster i kind of like this idea, as long as it isnt the norm for everything
i feel like if it were me answering something like that id use it to handle like, small inputs that break for like
weird language reasons
like a fibonacci that cant handle the 0 and 1 at the start, so it starts at 1,2,3,5...
 
4:46 AM
@CommandMaster I agree with @thejonymyster – this is an interesting idea. It's common for problems to say you can ignore specific edge cases like zero, but rather novel to say you can avoid whichever finite set of edge cases results in the best golf. For example my is-Fibonacci regex could drop from 161 to 139 bytes.
 
 
2 hours later…
6:41 AM
@thejonymyster I'm not offended, and I think I've got just the thing you need
Give me a second to find the link
It's a list of things I've seen in other golfing languages that seem to be useful
Ignore the Unicode characters, those are just planning things
You can browse the list and see what stands out to you
After all, that is one of the reasons I made the list - so there'd be a resource available that contains a list of probably useful things
 
0
A: Sandbox for Proposed Challenges

tybocopperkettleUse "e" or a suffix? Background In Māori (the indigenous language of New Zealand), to make a verb a command the verb is either preceded by "e" for example, "oma" (to run) -> "e oma", or, it's given a passive ending to make it a passive verb for example "kōrero" (to speak, talk, say, etc) -> "kōre...

 
7:25 AM
608
Q: Which is faster: while(1) or while(2)?

Nikole This was an interview question asked by a senior manager. Which is faster? while(1) { // Some code } or while(2) { //Some code } I said that both have the same execution speed, as the expression inside while should finally evaluate to true or false. In this case, both evaluate to true a...

SO voting is sus
 
Is it reasonable to approximate O(n! * n) as O(n!)?
 
I'd say yes
@NewPosts Why are the python/js answers so complicated when Jonah's thing exists
 
7:49 AM
good querstion
 
(by 2 points)
 
@pxeger I think it's a good enough approximation because n! * n <= (n+1)!, though not strictly the same
 
8:08 AM
@emanresuA Thoughts? Also can you think of any Māori verbs with only one short vowel? I've done a pretty extensive search but can't find any.
 
8:22 AM
maybe you could look to see if there's a formulation of the imperative rule that says a suffix is used if it's more than two morae, versus not exactly two
because intuitively it seems like using a suffix for more than two should be more plausible than using a suffix for not exactly two, but if it's never one those are equivalent
 
It's tricky because a lot things like this are very dependent on dialect
 
mmm
this page does say two "or fewer" for e
 
So does this, although the Māori dictionary says it's one long vowel or two short vowels
Because of the ambiguity and the fact that there are so few, if any verbs with only one short vowel, I'll probably just make it so that those cases don't need to be handled.
 
8:58 AM
...anyhow i originally thought allowing combining macron instead of precomposed accented characters was nice but in that case the challenge just becomes counting vowels-and-combining-macrons
so forbidding it might be better
might get some funky math tricks that way
 
That's true
I'll make some edits
 
hello!
 
9:42 AM
Webpack optimised my code away.
Jun 6, 2016 at 0:50, by Doorknob
user image
Jun 6, 2016 at 2:22, by New Main Posts
SOMETIMES I WEAR PAJAMAS TO BED AND SOMETIMES I DON'T?
 
10:01 AM
0
A: Sandbox for Proposed Challenges

mousetailRemove redundant parenthesis code-golf Given a string containing some parenthesis and some other characters like this: (abc((123))()) your task is to remove any sets of parenthesis that are redundant. A set of parenthesis is redundant if: It encloses another set of matching parenthesis, like ab(...

 
10:33 AM
@lyxal oh yeah i forgot i have to yoink ideas from that
@emanresuA accurate
 
Jun 14, 2021 at 20:49, by Catija
Please don't make me write SQL.
Jan 21 at 14:45, by ta Radvylf srik su shilani
user image
And finally
Jun 15, 2021 at 19:04, by Redwolf Programs
If SQL were a breed of dog it would be a Tesla Cybertruck
 
10:49 AM
Can we cut the noise volume?
 
11:15 AM
0
A: Sandbox for Proposed Challenges

pxegerEvery \$ n \$th repeat code-golf array Given a list of positive integers, and another integer \$ n \$, output every \$ n \$th instance of each distinct item in the list, starting with the first, in the order they appear in the original list. For example, with \$ n = 2 \$, we will output the first...

 
 
1 hour later…
12:19 PM
Hey guys is unpkg.com/react-dom@18/umd/react-dom.production.min.js 520ing for anyone else?
 
12:35 PM
@lyxal Works for me, just shows a giant page of JS
 
weird
that's what I see
oop there we go it's showing js now
 
@lyxal Works for me too
 
follow up question then: does the keyboard on vyxal.pythonanywhere.com load, and if you enter text in the code box, does it update the byte count and syntax highlight it?
 
No, and no.
 
Keyboard loads but it takes a few secs like the main page
 
12:39 PM
Oh it did load, it just took ages
 
And the byte count does update
Syntax highlighting also seems to work
 
sigh must be services to Australia/ocenia being disrupted
 
The hover popup blocks you from pressing keyboard items below it
Should probably be tranparent and ignored for hover events
 
it should just disappear when you don’t hover the character
the popup shouldn’t be taken into account
 
It defiantly doesn't disappear when you move down right now on Firefox
 
12:46 PM
Also the cursor turns into the editing cursor when you hover "keyboard", "flags", etc., but they’re clickable
that blasphemy
 
they should probably have user-select: none
 
1:38 PM
0
A: Sandbox for Proposed Challenges

FatalizeShifted auto-sum Let’s take a positive integer such as 123. We define the shifted auto-sum of this integer as follows: 123 has 3 digits. We thus consider 3 copies of 123. We stack each copy on top of each other, shifted by 1 digit each time: 123 123 123 We pad each copy with 0s (excluding ...

 
2:07 PM
has anyone managed to write a neural network in, say C?
 
@lyxal thank you kindly :- ) yahoo
 
2:41 PM
0
A: Sandbox for Proposed Challenges

mindoverflowIE's Extra Fancy Color Parsing® Recently, I've found a rant from 2004 about Internet Explorer's color parsing. Turns out, MS made sure that just about anything will be parsed as a color somehow and I think it makes for a neat challenge. Well, how does IE parse colors? Let's give it an input with ...

 
3:00 PM
CMC: Given a filepath, return the filename without any extensions. E.g. path.with.ext/sub.path/target.second.third.txttarget and herehere
 
@Adám lambda i:i.split('/')[-1].split('.')[0]
 
@Adám Jelly, 8 bytes: Try it online!
 
@Zionmyceliaadamancy Ooh, I can read that: Split on "/", Tail, Split on ".", Head.
 
@Adám Proof that Jelly is readable :P
 
I never claimed otherwise. I'm just not used to the binding.
APL, 13: 2⊃∘⎕NPARTS⍣≡⊢ Try it online!
Now, if a golfing-APL had a shorter name for ⎕NPARTS
 
3:20 PM
8 bytes in Vyxal too: \/€t\.€h
 
 
2 hours later…
5:40 PM
@Fatalize "welcome back"
 
6:09 PM
@Adám Pip, 11 bytes: (a^'/^'.v0)
Alternately 11-byters include @(a^'/^'.v) and @@R:a^'/^'.
Retina 0.8.2, 9 bytes: .*/|\..* followed by a newline
 
6:28 PM
@Adám A substitution approach is 16 bytes in Vim. Another 16-byte approach is i/<esc>A.<esc>F/v^df.v$d, which is clunky enough that it seems like there should be a way to golf it.
 
6:40 PM
Why is this VtC'd?
It seems perfectly clear to me
 
^
though to respond to concerns in the comments id make the score original/golfed
 
@NoHaxJustRadvylf Scoring criteria for comparison between solutions in different languages?
 
@Adám What do you mean?
@Seggan Yeah, it's a flawed scoring system for what OP is aiming for, but it's still a fun optimization challenge either way, and a bad scoring criterion is not a valid close reason
Okay whoever's bored, stop VtCing stuff that doesn't need to be VtC'd
This is a perfectly fine question
 
6:55 PM
@DLosc 15 bytes
 
@Seggan I notice you're dividing Fig byte lengths by the base 256 log of the language's number of code points. Should we do this for all languages? It would make unary regexes 0.594361× shorter, for example.
 
If you make a custom implementation that works like that then sure
I personally think it's rather boring, as do most others as far as I'm aware
 
It also would take up a lot of space in the headers of the answer submissions.
 
Since scoring is officially purely within languages, so a constant factor doesn't matter whatsoever, and between languages people already account for ASCII/limited charset vs. SBCS in their heads anyway
 
Yep, I agree
(Except that golfing languages do compete with each other rather directly.)
 
7:02 PM
@NoHaxJustRadvylf I don't see how things can be compared at all. There's nothing preventing me from fluffing up my golfer to get higher score (though, I'm not sure I understand the scoring at all).
 
The scoring is just the size of your program after you run it on itself
 
How about an identity function which is so clear, it doesn't need any fluff (golfed=normal), and returns itself as-is?
 
Then it gets its own byte count as a score
 
E.g. is perfectly clear APL, and returns for a score of 1.
 
It's not a great challenge, but it's not unclear in any way
 
7:04 PM
Is an answer invalid if I can demonstrate it mangling (rather than minifying) some code?
 
Yes, the spec clearly states it must return programs that are functionally equivalent
 
Within reason? You can't safely shorten variable names if a language has eval.
For that sake, a program could read its source and use it for something.
 
@DLosc 15 bytes without using :s
 
@Adám Yeah, like I said, not a great challenge, since any actual answers in any practical languages would be really complicated
But still not unclear
 
@mathcat is "split"? Ugh, I do not like that
 
7:13 PM
me neither
it should have been pounds to euros :P
 
7:31 PM
@Adám BQN (CBQN), tacit function, 17 bytes: ⊐⟜"."⊸↑•file.Name
In theory, •file.BaseName might work, but it's not available either in CBQN on ATO or in the BQN online REPL.
 
8:02 PM
@Deadcode its part of Fig itself
@emanresuA ...
whered you get that from
 
8:14 PM
@Zionmyceliaadamancy for strings, so is /
 
Idea: a language that's stack-based and functional, except the functions get pushed onto the stack and the values are automatically passed to the topmost function (with suitable currying). Ex: + 4 3 pushes +; then applies that to 4, turning it into (+4); then applies that to 3, returning 7. Has this been done before? It's vaguely similar to other prefix languages like Pyth, but the closest I could find on Esolangs were tarpits like SKI calculus.
 
It's similar to Husk, but Husk doesn't explicitly use a stack
 
@Seggan In what way? Does Fig output CGCC-ready markdown?
 
@emanresuA This probably wouldn't be tacit, however. I'm envisioning "modifier" commands to compose functions in various ways.
 
8:23 PM
@Deadcode yep :)
 
@Zionmyceliaadamancy Hm, good point. I've been mentally comparing it to point-free Haskell (though I'm not sure what type system makes the most sense yet).
 
also fig was built around the scoring system
 
8:38 PM
@DLosc huh, tictac used to be like what you said
 
8:50 PM
Odd, since the name is clearly a pun on "tacit."
 
 
1 hour later…
10:12 PM
Playing around with the idea a bit, it feels quite similar to Husk and also in some ways BQN. The main difference: in Husk, the combinators are prefix; in BQN, the combinators are infix; with this idea, the combinators are postfix (though the functions themselves are still prefix).
 
10:41 PM
I think there might be a way to use higher-order functions without introducing combinators or modifiers... but then would it be too much Husk?
 
Hmm... I've been using "combinator" and "higher-order function" almost synonymously in my head (though I guess Map would be a higher-order function that isn't a combinator).
 
Anyone understand webpack enough to know why nothing executes when I actually use imported modules?
Like, I have import {...} from "..." and console.log("Hello, World!") but as soon as I try and use anything I've imported the log doesn't execute.
That or it errors with "access before initialization". Weirdly enough, something like import 'data:text/javascript;charset=utf-8;base64,Y29uc29sZS5sb2coJ2lubGluZSAxJyk7'; does work
 
@emanresuA No, sorry
 
You mean in the browser, right?
 
10:57 PM
@Bubbler Are you suggesting that functions that operate on other functions could be pushed to the stack just like any other function? Not sure if that would work, but it's an interesting thought...
 
something like, if map takes a function of arity 1 (or of type value->value) as its first argument, pushing map + 1 in order would result in a single item map(1+)
might not work very well for general combinators though
 
@Bubbler Yes
 
"access before initialization" sounds like circular dependency problem
 
Huh, maybe
@Bubbler thank you so much. I'm an idiot
 
11:13 PM
Oh was it?
 
Yep. hopefully resolving it fixes the bug
 
@Bubbler Hm. That might work, but I think it would still require a distinction between higher-order and "lower-order" functions (hereinafter HOF and LOF): When an LOF is pushed, check whether the top of stack is an HOF; if so, attach the LOF to it and push the combined function; if not, just push the LOF. The rule is basically "if something is pushed that could be an argument of the TOS, attach it." (LOFs are arguments to HOFs; values are arguments to LOFs.)
So after pushing map and then +, you'd get an arity-2 function map(+) (equivalent to a => b => b.map(x => a+x) in JavaScript).
 
... and then you almost lose the point of having a stack
 
11:29 PM
Does anyone know why TIO uses # instead of ??
 
Because lang selection and filling in each field have nothing to do with the server, presumably
hash is not part of web request but is visible to JS
 
Oh, good point
 
@NoHaxJustRadvylf Agreed.
 
i get "You haven't voted on questions in a while; questions need votes too!" literally every time i upvote in the sandbox lol
 
lol
 
11:42 PM
Solution: upvote the sandbox question itself
 
long ago
maybe does it work if I unupvote and then upvote again
oh it's locked in
 
This might have some people's interest:
(live in 10 minutes)
 

« first day (4195 days earlier)      last day (647 days later) »