« first day (3807 days earlier)      last day (1332 days later) » 

00:00
@RedwolfPrograms can't seem to repro (linux, .114, chromium). Out of curiosity, does doing for (var i = 0; i < 100; i++) eval(";".repeat(i)+"run()"); instead of the separate loop and final run still repro for you?
00:26
@cairdcoinheringaahing well, I didn't reject it because I was waiting for OP to make the decision
since my main problem with it was potentially going against the OP's intended meanings, if they approve it, it means it doesn't go against their intended meaning :P
00:39
@dzaima It does not
I'm not sure of the exact conditions it doesn't work under
@RedwolfPrograms My guess would be that it's related to the new sparkplug compiler. Could try running chrome with --js-flags="--no-sparkplug" to see if that changes anything
01:00
Sandbox posts last active a week ago: Full name quine [quine] [code-golf] [unicode]
@OldSandboxPosts That's been posted and should be edited down
01:13
@JoKing Done!
01:25
0
Q: Is IMPLY enough for this function?

l4m2Given a boolean function with inputs, check if it's possible to only use IMPLY gate to express it. There's no extra limitation on how you use this gate, and you can use each input for any amount of times. See examples below: \$\begin{matrix} \text{Expression}&&&&&\text{Solution}&\text{Your output...

01:45
@NewPosts found a 19 byter but i'm convinced it can be done in like half of that and i've decided to slow down on fgitwing and try to actually write good jelly answers
well, I found 13
 
1 hour later…
03:06
18
Q: Elevator sequence

BubblerTotally not inspired by Lyxal repeatedly mentioning elevators in chat :P Challenge In short: simulate some people filling up an elevator and then leaving it. The elevator is simplified as a grid, where each person can occupy one cell of the grid. The height and width of the grid is the input para...

03:26
looks like I won't be getting any sleep with all these canada day fireworks, lol. not that I actually sleep at a sane time anyway, but still :P
04:05
@NewPosts what is the actual use of the imply function?
with every other logic gate, its pretty self-explanatory what they refer to, but imply (it seems like) maps to a <= b
I guess it's supposed to mean "if A is true then B can be true", not sure what you'd actually use it for though (other than <=)
It is computationally complete if you have a false operator, though
Does anyone know of any BF interpreters, hopefully hosted online, that ignore mismatched brackets?
No, but give me about ten minutes and I can make one :p
What is the intended behavior of that?
the esolangs discord may have a better idea of this
04:18
Balance them or just ignore them?
ignore completely, probably
I'd imagine balancing them would be more useful
@hyper-neutrino To just ignore them
cause matching them is most likely to cause infite loops
@Razetime This is right
@RedwolfPrograms And this is also true. But I'm not looking for useful... I'm on CGCC :p
04:19
Useful for golfing, I mean
maybe it'll help with balancing one pair
Balance would be more useful for golfing, ignoring would be more useful for polyglotting. At least IMO.
E.g., ,[-. would be more useful as ,[-.] than ,-. since the second already has a shorter way to write
att
att
@RedwolfPrograms A->B <-> "If A is true, then B is true"
04:20
I'm using it for this challenge: codegolf.stackexchange.com/questions/216437/…
It's impossible to run a BF program backwards and have the brackets match
@RedwolfPrograms brainfuck has the problem of not having obvious places to add brackets
Start and end?
[]][
[][]][][
start and end saves like, one byte
Better than nothing
04:21
[[]]]][[
etc.
@RedwolfPrograms And I doubt there's a more effective set of rules
What if it rotated the program until it was valid :p
@hyper-neutrino True, good point. But for complicated quine-ish golfing problems, like this one, ignoring is also better
@RedwolfPrograms Actually would be kind of cool ngl
Because you go from having infinitudes of invalid programs, to none
I realized I'm actually not sure what the best way to parse is while ignoring mismatched parenthesis/brackets
I wonder if one could make a good golfing question out of doing that
04:25
if yuno sees a mismatched close bracket, it just matches an open bracket at the start, and if it sees an open bracket, it matches it and parses the inside
Eg. a(be(k)(op(ur)akur
so for example, abc) because (abc) but abc(def]ghi becomes abc([def]ghi)
@Ausername you are like 3 months late
Nice
@hyper-neutrino I didn;t know about that.
I think...
You'd have to print out just the parts of the string that were within matched parentheses, and ignore the rest
Whereas a(be(k)(op(ur))akopur
Is that a worthwhile challenge?
04:29
Looks like an interesting idea. I don't actually see what the formal spec is from these examples but the idea's good for sandboxing IMO.
@hyper-neutrino a(be*(k)**(op*(*ur)*)*
var rp = (d) => (i = d.indexOf("[]")) + 1 ? rp(d.slice(0, i) + d.slice(i + 2)) : d;
var rtv = (d) => rp(d) ? rtv(d.slice(1) + d[0]) : d;

rtv("][[][][]][")
Rotates a string of brackets until it's balanced
Not sure whether to dislike PCRE for having recursion (which is weird and far from regexy), or JS for not having it
@hyper-neutrino a(be(k)(op(ur))a(be[k][op[ur]]
Thanks, fixed
Okay, so I've replaced the matched parens with brackets
abe(k)(op(ur))
Alternatively, there it is with mismatched parens removed
So the challenge would be to output everything within correctly matched parens
In this case, everything except the be
04:34
so what should (ab)cd) output
ab
@RedwolfPrograms Firefox is fine
Oh, I see. Yeah, it should be greedy
the spec looks really obvious but it also looks like there should be some edge case where it becomes ambiguous
I don't think so if it's greedy. It could be done with a stack, for instance
04:35
so ab)cd → cd and ab(cd → ab
Good point
Right now, yes. But that's probably unecessary
@RedwolfPrograms So is Safari
Reverse-then-rotate-until-balanced is actually a really cool transform
I suppose it should be changed to only be everything in parens
oh bountying a question alerts you of answers?
04:36
@Ausername That's good to know, didn't have info for other webkit browsers
that kinda makes sense, but i already set my bounty for a specific answer...
So (ab)cd) → ab & (ab(cd) → cd
@hyper-neutrino Try setting one on HW lol
Where I've just adding surrounding parens to make it clearer
@RedwolfPrograms Safari actually ignores the blank console.log calls - it doesn't log anything for those.
04:37
Kept thinking to myself "I don't remember writing the HW challenge" :p
@Ausername Chrome doesn't either, at least for me.
The only question is whether to add the surrounding parens on either end implicitly or not
@RedwolfPrograms How's the interp going?
It's not meant for I/O, it just seems to trick chrome into thinking about the order it should run things more carefully
04:38
I'm still not even sure what the best way to parse it is
Just that a stack is one way, but it seems less than efficient
For which one, the rotate until valid version?
Also, whatever Electron uses works fine.
O(n)
@RedwolfPrograms Just the ignore one
I'll start working on it too!
Problem is, which ones do you ignore? For example, in a[b]c]d, do you parse that as a[b]cd or a[bc]d?
@RedwolfPrograms Can you see if it does that if you're logging to a DOM element instead?
04:40
Sure, just a sec
I can't actually get the bug to repro right now :|
Okay, it's reproing now, I'll try it with the DOM
Modifying DOM has no effect afacit
Removing the for loop and doing the iterations by hand seems to be more reliable
@lyxal Can we have a 'Apply to all elements of stack' transformer?
It's always really satisfying beating Jelly.
04:56
@Ausername good idea if not already there
CMC: Understand this without a 250-year background in maths.
@RedwolfPrograms a[b]c]d please! A la greedy
CMC: Given an array of integers, check if it is sorted
@AviFS I think you left a ] in by mistake
Haha, true
a[b]cd
05:00
@PyGamer0 x=>x.some((n,i)=>i&n-x[i-1]<0) should be a valid JS solution
@PyGamer0 ∧/⍳⍤≢=⍋
@AviFS How about a[b[c]d?
@hyper-neutrino which lang is that? how does it work?
∧/⍳⍤≢=⍋
∧/       Result of reducing AND over
     =     if left and right are equal for
  ⍳⍤≢        :
  ⍳            positive integers up to
    ≢          length
      ⍋      : grade up
it's APL
wait i'm dumb
⍳⍤≢≡⍋
can do you it in your language? ;p
yuno
05:04
i don't have a sort built-in, actually :P
Ash had a one byte built-in for this lol, I think it was k
@PyGamer0 s=
It'd return -1 for min to max, 0 for unsorted, and 1 for max to min
Only problem is it'd return 0 for all identical, so there was a second that was only 0 (unsorted) or 1 (sorted)
Ash had questionable built-ins
@RedwolfPrograms ab[c]d please!
It should make them as small as possible!
@hyper-neutrino 3-train of ⍳⍤≢, , and which applied monadically as (⍳⍤≢ ≡ ⍋) ⍵ is (⍳⍤≢ ⍵) ≡ (⍋ ⍵) which checks if range(len(⍵)) is congruent to gradeup(⍵)
05:06
Sounds good. Unfortunately it's getting kind of late here so I'll have to finish it tomorrow o/
I also think a stack is a good way to think about it. Open brackets push onto the stack, and closing brackets pop off the stack
yuno has no slice, reduce, or sort, lol
it is still extremely unstable and i am still in the "spam implementing built-ins" phase
right now i am working in implementing tail recursion so it doesn't get annoying later
And whatever comes off is what it gets matched with!
I think I just finished a prepocessor in python
But I have to go too so I'll send it tomorrow
But it just loops through doing the stack thing, and so it's able to figure out which the matched ones are. When it finds a match, it just adds the indices to another list
Then you just remove all the brackets, and put the ones in the list back in
(I replaced the brackets with '-', put the brackets that belonged back, and then deleted the '-'. Otherwise the indices will get screwed up if you delete the brackets without a placeholder. But it's a lame way to do it. Sure there's better.)
Anyway, gtg now, but thanks everyone!!
@RedwolfPrograms ⍤/ redwolf
@PyGamer0 51AC8: ī≡S=
> no usually code is written with Ctrl-C and Ctrl-V
for me it is y and p
interesting; what keyboard layout do you use?
05:20
@hyper-neutrino standard qwerty
and you have ctrl-y bound to copy and ctrl-p to paste?
@hyper-neutrino it is done automatically
by vim
oh vim
yeah idk vim keybinds :p
att
att
y for yank
p for paste
CMQ: Any (neo)vimmers? or emacs users?
05:31
huh. implementing tail recursion for yuno was not too annoying which is nice. which is slightly surprising given that python doesn't even have tail recursion but also not really surprising
@hyper-neutrino what is tail recursion?
@PyGamer0 do you know how stack frames work
like, the function call stack
basically, if the last statement in a function is return f(...), instead of creating a new stack frame and returning to this one to return, you can just replace the current stack frame with that of the function you intend to call
and that way you can recurse as many times as you want without actually increasing your stack space and thus avoid stack overflow
oh so i need not visit SO
05:42
lol
(on the off chance you weren't joking, i mean stack-overflow exceptions/errors / segfaulting)
yes i know
optimizing via replacing the stack frame is one way of doing it if you have direct access to memory or are like compiling or something
since python doesn't have built-in tail-call optimization, you can still simulate it with the trampoline construct, which is another common way of doing TCO, which is what i do for yuno
my TCO actually ends up being a bit stronger than jelly's, I believe
Is there a tag meaning that only finite but more than one cases are considered? Only one case considered is treated [kolmogorov-complexity]
oh, so like given an input, produce a certain output per input, but there are finitely many inputs even in theory?
i don't recall there being one like that and didn't see any that seemed like what you want in the top few pages
05:58
what is kolmogorov-complexity
shortest code to produce a constant output:
most often an challenge
@hyper-neutrino how do you make the tag
[tag:tagname] for main site tags, [meta-tag:tagname] for meta tags
it doesn't work in the sandbox because the sandbox is not attached to any site
06:06
@hyper-neutrino oh ok
what does ^ do
it runs a loop that navigates to sandbox and clicks "leave" repeatedly, basically constantly leaving and rejoining the room
oh
i mistakly pressed enter
it just looks like it refreshs the page
navigating might cause your console to stop executing the code
06:12
The one moment there's even a slight scare COVID might reach where I am, everyone panic buys toilet paper again
Ffs Straya. I thought we were better than this
@lyxal xD
@lyxal did you do a voice reveal?
@PyGamer0 epic elevator moment ftw
@lyxal nah that is not your voice
06:18
it doesnt sound like him it sounds like the elevator is saying it
@hyper-neutrino where I am there's been 0 covid cases throughout this whole time. Yet now, when covid starts spreading roughly a few hundred kilometres down south (with those areas being placed on lock down), everyone panics
@PyGamer0 uh, it is
@lyxal bruhhh
meanwhile people here are still ignoring restrictions despite our region having the highest provincial case-per-day rate, even beating toronto, which has a much higher population and density and used to be the main hotspot
06:20
@hyper-neutrino here 75% wear mask
out of that 25 % wear it wrong
@PyGamer0 it's truly lyxirl
And that's the only voice clip you're getting too
CMC: If your language supports functions, print 0..input using recursion. Ex: 2 -> 0, 1, 2
f=lambda x:x and f(x-1)+[x]or[0] in python
or, as an expression, (lambda f:lambda x:f(f,x))(lambda f,x:x and f(f,x-1)+[x]or[0]) using my standard recursion combinator
although (lambda f:f(f))(lambda f:lambda x:x and f(f)(x-1)+[x]or[0]) is 3 bytes golfier it seems
06:29
nice
λ[,‹x
f=lambda x,a=[]:x and f(x-1,[x]+a)or[0]+a for tail recursive although that doesn't actually do anything in python
and also idk if it'd get optimized with and or rather than if else
@lyxal that is in the wrong order
’ß;Ɗ0¹? in Jelly
CMC: Given a string turn all letter in ascii range to their capitalized version
06:36
Œu in jelly
A in yuno
@PyGamer0 λ[‹x, then
@hyper-neutrino but does that do only the ascii range?
what on earth
@lyxal nope
thought that was a minimum not a strict exact requirement
@PyGamer0 what do we do with letters not in ASCII range
CMC: Flatten the input (which is a 2d matrix). Ex: [[1,2],[3,4]] -> [1,2,3,4]
@hyper-neutrino nothing
@PyGamer0 F in Jelly and yuno
06:45
@hyper-neutrino suprisingly īF in 51AC8
Øa,ØA¤y in Jelly then
@PyGamer0 ngn/k, 24 bytes: {$[y-x;x,o[x+1;y];y]}[0]
just substitute lowercase for uppercase
@PyGamer0 APL: ,
@PyGamer0 K: ,/
06:50
@PyGamer0 Extended Dyalog APL: ⌈@{⍵∊⎕C⎕A} Try it online!
i have wondered why is atom's main theme called one dark/light
why isnt there a two or three
@PyGamer0 APL: {×⍵:⍵,⍨∇⍵-1⋄⍵} Try it online!
@Adám does that read as "if sign(⍵), then append ⍵ to this function called on ⍵-1, otherwise, return ⍵"?
It does.
06:57
Here's (longer version) that's interesting because it has no explicit conditionals: {⍵,⍨∇⍣(1<⍵)⊢⍵-1}
Iterative version: {⍵,⍨⊃⍵-1}⍣{0∊⍺}
07:31
@PyGamer0 ‘ɫ;)¹? in yuno
pretty much the same as in jelly
on second thought, i decided to restructure the default shortcut behavior, so it can just be ‘ɫ;)?
08:32
^ how would you describe that image
small
and..
calculatory?
square
blue, green, yellow
tiled
@PyGamer0 Fibonacci
no its 1/2+1/4+1/8...
right?
08:37
Not necessarily
Back in my days of primary school, I'm pretty sure that they showed us that you could make a Fibonacci spiral out of squares of length 1, 2, 3, 5 etc or something
yes
That's what the image is
golden ratio and things
@lyxal well the ratios are wrong in my image
^ Idont know what i am making now
08:54
CMC: If your language supports it; generate a 5x5 .png file with random colors
09:09
posted on July 02, 2021 by AndrewTheCodegolfer

Create a program P1 which takes as input a base 10 number N1 (the numbers for the variables are important). Given N1, P1 will print a program P2. P2 will take as input a base 10 number N2 and ou...

09:19
@PyGamer0 Do we have to save the file, or just create its bytes?
09:30
@PyGamer0 Dyalog APL/W: 63 bytes: (⍎⎕A⎕WC'BitMap'('CBits'(?5 5⍴8*8))).MakePNG⎕NAPPEND⎕A⎕NCREATE 0 creates a file called ABCDEFGHIJKLMNOPQRSTUVWXYZ:
what's W
@Razetime What?
Dyalog APL/W
For Windows. This is how it calls itself:
overy neat
I had to run as admin
09:37
@PyGamer0 Recursive
@Razetime Why?
some file access error
idk which dir dyalog starts in
Right. You can ]cd \tmp or something before executing the above.
35
Q: Connect 4: Spot the Fake!

John GowersThe bank has been broken into, and all the local mafia thugs have an unusual alibi: they were at home playing Connect 4! In order to assist with the investigation, you are asked to write a program to validate all the Connect 4 boards that have been seized in order to check that the positions are...

The best context for a question
math has removed xnor from the list of this room's owners.
09:47
Uh, no.
Feeds posts RO stuff.
uh no
dang it
at least i got lyxal
Wait what?
wait i'll bookmark it

math rickrolles lyxal

2 hours ago, 6 minutes total – 6 messages, 2 users, 0 stars

Bookmarked 7 secs ago by math

Oh I saw that
0
Q: more than 1 hash values pointing out to the same pattern

Sourabh AsharmaI have built a hashing function that hashes string and its substring but while testing it I got more than 1 hash value for the same pattern and I am not able to identify the reason, can someone help me out in finding the problem static class Hash { int N = (int) (1e6 + 6); int mod = (int) (1e9 +...

09:58
@math YOU GOT ME
@NewPosts i posted a really bad welcome message
@math i can't do it... who can actually?
@NewPosts Just VTC if you can.
It might take a while though - I wish we had 3-vote close./
10:35
is there a LWSS gun in GoL
probably
Although it's most likely just several gliders smashing into each other...
11:18
@Ausername you have some link or something?
Google it
@math room owners and mods
@math well played
How hard is it learning a second esoteric language after the first?
not hard probably
11:34
it really depends
i feel like if you pick two at random, if you filter out all the bf reskins, they are likely to have much less in common than a pair of practical languages
Compare the following two examples: Befunge > Jelly and Jelly > Befunge
Going from mastering Jelly to mastering befunge shouldn't be too hard - if jelly is your first esolang, then you already have a good understanding of how esolangs work and how to think in a different way to more practical languages
But going the other way is definitely harder
That'd be going from stack manipulation and the benefit of being able to explicitly manage program flow (in a quite unrestricted way - especially if you use the 98 variant) to having to think about how you arrange your programs so that they chain in the right way
So unrelated string is right that it depends on the two languages you choose
If they use the same paradigm, then it should be relatively easy given the second language doesn't have any majorly different quirks
But if the two are completely different, and one is more complex than the other, then the learning curve may be harder
And in some cases, knowledge of the first esolang could even hinder learning of the second
Like tacit is sometimes like stack-based, and sometimes really not.
^ this
in jelly you just copy-paste a few characters from the atoms and quicks wiki pages and rearrange them until they work, while in befunge you don't even have proper arrays
11:50
Shush
Don't give away the big secret
If everyone finds out that jelly is just keyboard mashing with a certain keyboard layout, no one will believe that effort went into them :p
@lyxal I am trying to learn Jelly now just for fun, the way the program floats is definitively my biggest issues so far
@N3buchadnezzar that was the same for me
It is just fun trying to learn something hard
heh, it took me 5 attempts at trying to learn jelly from scratch for the concept of the chain rules and quicks to click
needless to say, jelly is fun
I know like 3 or 4 proper languages, 2 by heart and still. This language just wrecks me.
@lyxal How would you compare it to Vyxal :P
11:58
@lyxal Simply styling the wrapper element should work, I just hardcoded the font size for the dummy resizer (big brain) so it doesn't resize the textarea properly. What font size do you want?
@N3buchadnezzar obviously, vyxal is way more fun ;p
@N3buchadnezzar vyxal is made with a smooth learning curve in mind
@Ausername probably 13 or 14
and hence using and learning it is faster and fun in a different way
I'll go with 14.
11:59
@Razetime I'll stay away then, If a language is not making me cry, it is not a language for me.

« first day (3807 days earlier)      last day (1332 days later) »