« first day (3272 days earlier)      last day (1867 days later) » 

00:43
@Jono2906 The legacy version is written in Python, the new one is written in Elixir. The Python code was kind of messy and implementing new features couldn't really be done systematically. And the Elixir version adds some crucial features like infinite list support and related functions, and adds a whole bunch of new commands
@Mr.Xcoder aha
Just to be clear, the Python code wasn't impossible to work with. Rather, the main reason for the shift is making use of Elixir's special features (even though the code itself is indeed cleaner anyway)
01:12
@mınxomaτ That's a lot of porn
 
4 hours later…
04:47
1
Q: Decomposition of a matrix in \$ SL_2(\mathbb{Z}) \$

BubblerBackground The special linear group \$ SL_2(\mathbb{Z}) \$ is a multiplicative group of \$ 2 \times 2 \$ matrices whose elements are integers and determinant is 1. It is known that every member of \$ SL_2(\mathbb{Z}) \$ is a product of some sequence of the following two matrices \$ S \$ and \$ ...

 
3 hours later…
 
2 hours later…
10:28
hello!
 
4 hours later…
14:47
CMC "grep" a text file so that it shows only lines that have "xyz" in the subsequent line
I finally got into an active chatroom! (Previous attempts have resulted in chatrooms with nobody inside.)
@a'_' hello!
hello!
@Anush Can we take the file as list of strings or must it be a file name or can we use a file handle?
14:54
@Adám because it's just for fun, I would prefer a file name or standard in
@Anush What to do if first line has "xyz"?
I'm not sure whether this fully works though, I haven't fully tested it yet.
@Adám you are not outputting anything for that instance
@a'_' does weird stuff with "xyz" being surrounded
@dzaima I guess it can be fixed with a set xor-ing.
14:59
@Anush APL, 27: f⌿⍨0,⍨1↓∨/'xyz'⍷↑f←⊃⎕NGET⍞1
@Adám the input has one line?
I don't understand what I am looking at
@Anush file name.
interesting
grep -2 xyz foo.txt|grep -v xyz almost does it
15:13
27 vs 39....
I use GolfScript just for fun, not for bytecount. (Also I'm just a GolfScript beginner so there are a lot of tricks that I don't know yet...)
I think it's all for fun!
I am considering a possibly controversial new challenge...codegolf.stackexchange.com/questions/197524/… but with 3 changed to 4. I think it will be really hard to solve it as easily
ngn
ngn
@Anush k: {a@&1_"xyz"~/:a:0:x}
@ngn TIO?
ngn
ngn
how do i make a file there?
15:26
@ngn I guess STDIN is stored as a separate file on TIO.
@ngn did you see that someone may have cracked Kaseorg's mysterious dynamic programming algorithm?
ngn
ngn
@Anush oh cool
@Anush tio
@a'_' turns out we can write in /tmp
cool
nice!
ngn
ngn
@Anush have "xyz" in the subsequent line - as a substring or exact match?
@Anush sed -n, 18b, :;N;/\n.*xyz/P;D;b
i've lost touch, sed -n at 14b, N;/\n.*xyz/P;D
N adds newline + next line to pattern space, if the pattern space matches /\n.*xyz/, P prints the first line. Finally, D removes the first line until (including) the first newline, and runs the program from the start on what is remaining
16:24
very glad to see awk and sed solutions!
the sed one is surprising!
I was expecting /xyz/{x;p;x};h but I don't know whether it works
much neater, but unfortunately fails for when there is a match on the first line
@Neil in case you weren't aware, i posted an infinite bounty for outgolfing my sed solution to fizz buzz
hey I'm no sed expert
16:39
:( but you know retina it should be easy
doing non-unary arithmetic in sed is much more fun, because sed is inferior to retina
ah, so for your sed script, you're basically already on line 2 when you start matching
also there are a lot of approaches in sed for fizzbuzz, as can be seen in anagol's sed leaderboard for sed golf.shinh.org/p.rb?FizzBuzz#sed, none of the top solutions are at the same bytecount
@Neil s/basically//, = after encountering N for the first time gives 2
17:06
how would you draw a random curved line in python?
or julia... :)
 
1 hour later…
18:13
0
A: Sandbox for Proposed Challenges

QuinnHow low can you go? Time to play so ascii-art limbo! Here's the bar: |--| | | | | Can you fit under it? Goal Write a program or function that takes an ascii string representing a some shape, and a positive integer representing a bar height. Output the shape from the input after it has a...

 
4 hours later…
22:40
0
A: Sandbox for Proposed Challenges

xnorLattice walk home You start at some integer coordinates \$(x,y)\$ on the integer lattice and you want to walk back home to \$(0,0)\$. You may take one step North, South, East, or West. Your goal is to repeatedly do this and end up home. Given \$(x,y)\$, write code that outputs one of the four d...


« first day (3272 days earlier)      last day (1867 days later) »