« first day (2710 days earlier)      last day (2136 days later) » 

12:05 AM
How many people use visible whitespace in their editors?
 
Not me. Not even an option.
 
It's torture when you're looking at other people's code and you see indentation that switches from spaces to tabs and back again, sometimes all in the same line
 
@JoKing could be the language WhiteSpace
 
I know Whitespace. That's not Whitespace. That's hell
 
12:29 AM
i always use visible whitespace when available
 
@JoKing Python2 golf?
 
Lol, not quite
 
 
3 hours later…
3:22 AM
Two things...
First, I've gotten back into music composition. Am working on a new piece. The intro is pretty good but that's all I have so far.
Second, I've been reading about "prediction of sequences using finite state machines" to look at memory-accuracy tradeoffs for learning.
 
Oh, I think one of my coworkers is doing something with FSMs and machine learning. But I'm fuzzy on the details.
 
this profile pic disturbs me
 
turquoise on black is pretty bold yeah
 
I was talking about WW's
Mine is a reference to Junethack, didn't really get to chose the color scheme
Although since that's over now I should grab a new one
 
At this point I'm never gonna change my avatar.
 
3:38 AM
There we go
 
I usually keep the default avatar if it's sufficiently randomised (SO and GitHub, but not Discord). Especially if it amuses me, like my GitHub avatar which looks like a sad clown
 
The default profile for our brainflak organization is a skull.
 
I'm always tempted to just make my profile pic a character from my favorite anime, but then I get overly concerned about how people see me based on my profile pic.
 
3:55 AM
@CatWizard If anything, what your coworker is probably doing is seeing if he can have a computer learn what an unknown FSM is by looking at input/output patterns.
I'm talking more about the case where the FSM is the thing doing the learning.
 
4:15 AM
@PhiNotPi Definitely not. He's working on programmatic proof finding. He's using FSMs as part of the learning process.
I've worked on the project just not the FSM part
 
Okay
I was just guessing based on what I see most FSM / learning papers talk about.
 
Your project sounds considerable more interesting than his though.
 
This is kinda a tangent from what the main project is: simulating learning with a biologically-realistic neural network.
 
Do they actually know how neurons work well enough to do that?
Well I suppose they must.
 
People know pretty well about how neurons work, at least on a day-to-day basis. The hard/unknown stuff is in developmental neuroscience, as far as I'm aware: how does neuron X know where it is and where to connect to? But that's beyond my scope.
But given a neuron and its connections, it can mostly be boiled down to a set of differential equations to solve.
 
4:23 AM
I'm not to big on neural nets tbh. I'm not really that big of a fan of statistical methods in general.
 
@ais523 I'd argue it's too broad because it has unobservable requirements
 
Ehh... I would say there's a decent gap between neural nets for machine learning and neural nets for human learning.
 
What do you mean neural nets for human learning?
 
There are some answers that simulate TC systems that but have no way of communicating that (such as the Perl -> 3SP one)
 
@CatWizard Just saying that most artificial neural networks have very little to do with actual neurons.
 
4:26 AM
Oh yeah. I'm just not a fan regardless.
I don't think Logical methods are very good but I think they are more interesting.
Well neural nets aren't great either.
 
But my idea was... can we put a lower bound on the amount of memory people are using to perform this learning task? That's where the whole "how many states does it take" question comes in. Unfortunately as far as I can tell, the answer is "people are using at least 2 bits of memory for this task" which basically tells me nothing.
 
5:12 AM
0
Q: Two Dimensional Waterflow problem

Agnishom ChattopadhyayThe one dimensional twitter waterflow problem is this: You are given an array that represents a hill in the sense that the ith entry is the height of the ith location of the hill. When it rains, water logs in the hills, and you need to figure out how much water would log. For example, after rai...

 
 
1 hour later…
6:36 AM
This is gonna sound pointless/dumb (because it is), but I should just buy some dirt-cheap land somewhere out in the middle of the US. I reckon almost nobody my age (college-aged) owns any real property, I'm probably doomed to living in an apartment for the rest of my life, so this is the closest I can get. This can't be a worse idea than buying a timeshare.
 
7:04 AM
CMC: Given a list of natural numbers, output a natural number not in the list
harder CMC: Given a list of 8-bit unsigned integers, for which the length of the list is less than 255, output a 8-bit unsigned integer not in the list
let's ignore my first CMC
 
pseudocode for first one: max(list)+1
 
7:32 AM
That's literally the first of the input ~⍨ removed from ⍳256 all the 8-bit integers.
 
can't you loop from 0 onward?
 
@LeakyNun Ah, yes, that's what I meant, just forgot to write it in: Try it online!
 
ngn
philosophical CMC: given an infinite list of infinite boolean vectors, output an infinite boolean vector that's not in the list
 
7:49 AM
@ngn ?
 
I mean, why 256?
 
ngn
@Adám ∊ (APL's flatten) must walk their elements in some order - what order do you have in mind?
you can't go the usual row-major order, as you'll get stuck in the first row's infinite right end
 
@LeakyNun If we have all the numbers 0…255, then we know at least one is available for to pick. Actually, you don't even have to use ⎕IO←0 because 1) you guaranteed length would be maximum 254 (not 255!) so besides for 0, one number in the range 0…255 is available, and 2) even if you did give a list of all the numbers 1…255, the result of ~⍨ would be the empty numeric vector, and would give 0; necessarily the available number.
 
I mean, 256 takes 3 bytes
very expensive
 
@ngn Wasn't the entire CMC theoretical?
 
ngn
7:54 AM
@Adám yes, but even theoretically you'll get stuck there :)
 
@Adám I don't think that's right
 
@LeakyNun APL isn't a golfing language. I don't see any shorter way. Even should you want 1+max, you'd need 1+⌈/ which is 4 bytes.
 
@LeakyNun S‘ in Jelly for 2 bytes
 
I interpret an infinite boolean vector as a function N -> {0,1}. what you output isn't a boolean vector
@Adám start from 0, return the first number not in list
 
@LeakyNun Yeah, that is exactly what I do, but I have to give an end-point.
 
7:57 AM
why?
is APL turing complete?
 
@LeakyNun Only if other programming languages can be.
 
what?
 
@LeakyNun As in "in principle". Limited memory and all that.
 
can you loop from 0 indefinitely?
 
@LeakyNun Sure, but I'm sure that'll be much longer. You were looking for a golfed solution, no?
 
8:00 AM
I see
 
@LeakyNun May we assume the input is sorted ascending?
 
not really
(I mean, it takes 1 byte to sort it, right
 
@LeakyNun Not in APL.
 
right
 
ngn
@LeakyNun yeah, you can replace "infinite boolean vector" with a "function from N to {0,1}", the result should be the same type of thing
@LeakyNun 1+⍣(~⎕∊⍨⊣)0 but it's longer than Adam's ⍳256 solution
 
8:08 AM
I see
 
ngn
shall I reveal the answer to my cmc?
 
sorting is like 7, (⊂∘⍋⌷⊢)
 
ngn
@FrownyFrog 6: (⍋⌷¨⊂)
 
oh cool
 
8:23 AM
I've been arguing that we should let one of the monadic functions or < or sort ascending.
 
ngn
right, here's the answer: for @LeakyNun the N<R proof, for @Adám ~1 1⍉↑
 
@ngn @FrownyFrog They don't mean the same for rank>1 arrays:
      (⊂∘⍋⌷⊢)5 2⍴⎕D∩⍨⍕○1
26
31
41
54
59
      (⍋⌷¨⊂)5 2⍴⎕D∩⍨⍕○1
┌──┬──┬──┬──┬──┐
│26│31│41│54│59│
└──┴──┴──┴──┴──┘
APL CMC: Calculate X in terms of f⍣¯1 and Y←∘.f⍨X.
 
ngn
8:40 AM
@Adám define ⍣¯1
 
@ngn inverse. You'll need f⍣¯1, probably f⍣¯1⍨.
 
but it’s dyadic
so a f b = c, then b f⍣¯1 c = a
that’s why “probably ⍨”
 
E.g. for rank-2 Y, the answer is f⍣¯1⍨1 1⍉Y
But I'm asking for a general answer, independent of the rank of Y.
 
ngn
@Adám does it return a pair of ⍺⍵? or is it a left (or right) inverse? is f assumed to be injective?
 
@ngn ⍺≡⍵. Notice: the in ∘.f⍨.
 
ngn
8:50 AM
@Adám so it's more like f⍨⍣¯1 (i.e. {⍵f⍵}⍣¯1)
 
ngn
@EsolangingFruit nice :) haskell, of course, has no trouble with infinite lists
 
Indeed.
 
ngn
@EsolangingFruit why isn't s[0..] the same as s?
 
@ngn (!!), s, and [0..] are all arguments to zipWith.
 
ngn
9:00 AM
@EsolangingFruit ah...
 
9:11 AM
@ngn Are f⍣¯1⍨ and f⍨⍣¯1 not always the same?
 
ngn
@Adám f⍣¯1 isn't well-defined if f is dyadic
 
@ngn Uh, f⍣¯1⍨ is, and hence ⊢f⍣¯1⊢ and so you are not obligated to use f⍣¯1⍨ or f⍨⍣¯1.
 
ngn
on the other hand, I can understand what f⍨⍣¯1 means - the inverse of g(x) = f(x,x)
 
@ngn I just automatically write f⍣n⍨ and f¨⍨ instead of f⍨⍣n and f⍨¨ for performance.
 
ngn
9:16 AM
@Adám you can swap ¨ and ⍨ freely but not ⍣¯1 and ⍨
 
@ngn Can you give me an example where ⍣¯1 and are not swappable?
 
@ngn Ah, you're right. My bad. Let's restate the CMC then:
APL CMC: Calculate X in terms of g←f⍨⍣¯1 and Y←∘.f⍨X.
 
@ngn Let f represent the infinite list of infinite boolean vectors as a function f x y => {false, true} then you want the function g x => ! f x x.
 
@Adám I can do it in 16 (using g, or 4 more for f⍨⍣¯1).
 
ngn
9:31 AM
@Neil Exactly. Georg Cantor came up with this to prove that the reals are strictly more than the natural numbers.
 
Sorry to interrupt, but does anyone know of a reference to the cell type in Python 3 that's representable as a __qualname__?
 
ngn
@Adám g¨Y⍉⍨∊2⍴⊂⍳2÷⍨≢⍴Y ?
 
9:47 AM
@ngn That looks right. My solution is a function: g⊢⍉⍨⍴∘⍴⍴∘⍳2÷⍨⍴∘⍴
 
ngn
@Adám um... I was just thinking the ¨ doesn't look right
 
@ngn It doesn't matter, you could put a space. If f isn't scalar, you probably can't invert f⍨ anyway.
 
ngn
should be ⍤(2÷⍨≢⍴Y) instead of ¨
 
@ngn Hm, I wonder why (,⍨⍣¯1)1 2 3 1 2 3 gives me a LENGTH ERROR.
 
ngn
@Adám you're expecting too much inversibility :)
my solution is still wrong :(
 
9:58 AM
@ngn Is mine right?
@ngn Hey, that one is obvious, no?
 
ngn
@Adám well, you've assumed f is scalar
 
@ngn Maybe. I asked John Scholes to include ∘.f⍨⍣¯1
@ngn Yeah, but if it isn't, you just need a ¨, no?
 
ngn
@Adám yeah, it seems so
@Adám ask him to optimise md5⍣¯1 and ×/⍣¯1 and the world's crypto will be in trouble :)
(p|g∘*)⍣¯1 would also be nice
 
@ngn You mean to find just any input that matches the hash/product?
 
ngn
@Adám for the hash - any input, for the factorisation and discrete logarithm - natural numbers
just in case: this is a joke, of course
 
10:05 AM
@ngn Isn't ×/⍣¯1 ←→ 1,[.5]⍤¯1⊢?
@ngn Yeah, I got that. Also FFT⍣¯1 would be nice.
 
ngn
@Adám ok, without 1
 
@ngn 2(,⍤¯1)0.5,[0.5]⍤¯1⊢
 
ngn
@Adám 0.5 is not a natural number
 
@ngn 2(,⍤¯1)(÷2),[÷2]⍤¯1⊢
 
ngn
@Adám ÷2 is 0.5
 
10:13 AM
@ngn ∘.*∘.5 .5
 
ngn
actually ×/⍣¯1 wouldn't be very useful, as dyalog doesn't have bigint
@Adám are you Adam or one of his kids playing with the keyboard? :)
 
@ngn Kids are in school. Isn't that correct though?
 
ngn
@Adám only for squares
 
@ngn Every number is a square.
 
ngn
@Adám not of a natural number
 
10:15 AM
@ngn Since when did ×/ become limited to natural numbers?
 
ngn
12 mins ago, by ngn
@Adám for the hash - any input, for the factorisation and discrete logarithm - natural numbers
 
@ngn You can't add auxiliary requirements to inverses. You'll have to fold that into the function itself.
 
ngn
@Adám tell that to whoever implemented *∘2⍣¯1⊢25 as 5 and not ¯5
 
@ngn I want ⍎⍣¯1 — for real.
⍕⍣¯1 already works for vectors.
 
ngn
@Adám huh, how is that possible?
ah, it assumes a simple numeric vector
 
10:25 AM
syserror :-(
 
ngn
@Adám i've had a few of those on tio lately, but not reproduceable
 
@ngn Me too.
 
ngn
gtg, back in a few hours
 
@ngn u↑care
 
 
2 hours later…
12:48 PM
only 15536 until a nice round number
 
yeah I agree
 
1:38 PM
0
Q: Problem exiting while loop

socraticinclude Using namespace std; Int main() Int val1 = 0; Int val2 = 0; Cout << “please input two integer value “; Cin >> val1 >> val2; While (val1 != ‘|’ && val2 != ‘|’) { Cout << val1 << val2; Cout << “input two integer values or ‘|’ to exit”; Cin >> val1 >> val2; } Return 0; } Why does th...

 
 
2 hours later…
3:10 PM
From the GCC style guide:
> Full stops that end sentences should be followed by two spaces or by end of line
rage intensifies
 
@quartata "full stop"? In C++ code? ...?
 
No in documentation
 
@user202729 That means blah. blah as opposed to blah. blah
 
@quartata In comments?
 
well ok to be more precise it's in Texinfo docs
they do have strict guidelines on how to spell things in comments thohugh
 
3:13 PM
@quartata WHAT? That's stupid!
 
under "Spelling, terminology and markup"
some of it is actually good
 
I don't understand... why "built in" but "testcase"?
 
3:32 PM
uh...what's the language of this month? two languages are tying, although one with a greater number of upvotes (and therefore downvotes)
I feel like Japt should be it (cc @DLosc)
 
0
Q: Implement Malbolge's "crazy" operator

DoorknobOne of many unique features of the Malbolge programming language is its highly unintuitive OP operator, referred to only as "op" in the documentation and source code but popularly known as the "crazy" operator. As described by Ben Olmstead, the creator of the language, in its documentation: "don'...

 
...and an upvote has been suddenly removed...
 
4:28 PM
@NewMainPosts inb4 A Malbolge solution is posted
@Doorknob Congrats on 50k!
 
thanks!
 
5:05 PM
I was just reading the patchnotes for sudo and found Sudo now includes an optional set of Monty Python-inspired insults.
 
I think I know a possible method to crack xnor's answer, but I am not Python-abile enough to actually beat 44 bytes. Using the observation I was thinking about, the best I could do was 47. Now, is it "ethical" to pass the idea to other, perhaps more skilled Python users? :P
 
5:31 PM
0
Q: Find the sum of closest distances

AnushFor this task your code should take two sorted arrays of integers X and Y as input. It should compute the sum of the absolute distances between each integer in X and its closest number in Y. Examples: X = (1 5,9) Y = (3,4,7) The distance is 2 + 1 + 2. X = (1,2,3) Y = (0,8) The distance i...

 
5:44 PM
@Anush are you sure this is possible? (^)
 
^ Yes
 
do you have an algorithm in mind?
 
Sort the two arrays by value, and then fill it in with undefined values in the gaps
so
 
btw the challenge isn't necessarily invalid
 
input = [ [1,3], [2, 3, 4] ]
newInput = [ [1, null, 3, null], [2, 3, 4] ]
Then, map them in reverse, upping the index if you encounter a null
Wait I can do this with vectors
 
5:51 PM
btw if you can find out and golf an answer you can post it
 
@NewMainPosts I would enjoy this way more if it was plain CG
 
@EriktheOutgolfer will do :)
 
@EriktheOutgolfer I am pretty sure it is
@Mr.Xcoder that's my fault.. don't blame NewMainPosts :)
@EriktheOutgolfer The fact they are sorted means you can just go from left to right in the X array. Anything to the right of the ith element must have a closest element to the right of (or equal to)the closest element of the ith element
 
@Anush It's not a fault. It's just about each user's preferences, which in this case don't coincide :)
 
5:58 PM
@Mr.Xcoder oh you don't like to worry about running time?
 
Exactly :)
 
@Mr.Xcoder ok :)
I think I have worked out how to solve my fastest-algorithm question that no one likes
but I could just offer a bounty...
 
or you can just wait a bit more (been just 2 days, people might still be working) and post a self-answer
 
@EriktheOutgolfer true
but I feel it's generous to offer bounties :)
or I could give hints here and see if anyone wants to pick them up
 
if you ask me, I'd say you should do no more than +50 atm, since your rep is still pretty low
 
6:04 PM
@EriktheOutgolfer Right. I am also not sure that awarding > 50 rep makes any difference
hooray an answer to my code-golf question
 
Got a formula done for tha tquestion
 
@FreezePhoenix which one?
 
37 mins ago, by New Main Posts
0
Q: Find the sum of closest distances

AnushFor this task your code should take two sorted arrays of integers X and Y as input. It should compute the sum of the absolute distances between each integer in X and its closest number in Y. Examples: X = (1 5,9) Y = (3,4,7) The distance is 2 + 1 + 2. X = (1,2,3) Y = (0,8) The distance i...

 
oh cool
I look forward to seeing it!
 
6:40 PM
0
A: Find the sum of closest distances

FreezePhoenixJavascript, 242 bytes minDist=(l,m)=>{let e=0,f=[];l.forEach((g,h)=>{let a=[],c=Number.POSITIVE_INFINITY,d=0;m.forEach((b,k)=>{f.includes([h,k])||a.push([g,b,Math.abs(g-b),h,k])});a.forEach((b,a)=>{b[2]<c&&(c=b[2],d=a)});f.push([a[d][3],a[d][4]]);e+=c});return e}; Try it online! Explanation ...

 
7:00 PM
Wait what algorithms aren't linear?
 
@CatWizard The algorithm of "for each number in X, loop over all numbers in Y to find the best match" which is O(x*y) instead of O(x+y)
 
Oh, that seems like it would take more bytes to do.
Hm maybe not.
Oh yeah, it's much fewer bytes
 
7:56 PM
I have to say.. I am surprised by how many people can't tell if their code runs in linear time!
given how awesome the typical challenge answer is on ppcg in all other respects
 
8:22 PM
@quartata Update, I've been evaluating imgui and nuklear and I'll probably go with imgui. It's got some features that would be hard to emulate in nuklear and is generally more customizable.
 
How skinnable is imgui
 
Haven't tested that (because I don't use it).
 
9:01 PM
Ugh... now if I want to answer the polyglot challenge I need to install something locally, great.
 
which language is it?
 
FreeDOS Com File.
 
can't get dosbox on TIO?
doesn't seem like it'd be too tricky
 
I just don't want to have to install anything...
 
hint: DOSBox is a GUI, not a console program
and, since I've tried it on a tty before, I can say that the output might not be errors, but rather trash
 
9:12 PM
pretty sure you can run it without X
 
um, have you tried it? last time I did, it behaved like SuperTux
 
... and that means ... ?\
 
SDL_VIDEODRIVER=dummy
 
I'm referring to @EriktheOutgolfer
@FreezePhoenix, I'd say okay to NieDzejkob's question.
 
like, the tty trying to make images based on ASCII, foreground and background colors
 
9:15 PM
lol (if it becomes graphical -> text mojibake)/cool
 
no, it's not mojibake, it's literally like trying to recreate an image to the closest possible approximation using printable ASCII, foreground and background colors
I'd actually say that's an advantage, although not very useful
 
o_o
._.
o_o
Dang, that's impressive
I wonder if this room should ever be revived
 
if a discussion related to it is to be had, then a mod can easily thaw it
 
Not yet then... I just need to golf some bf.
 
9:41 PM
@Zacharý What question?
 
On your question... look at the comments
 
@NieDzejkob I think that would be okay. No drastic changes, though. — FreezePhoenix 36 secs ago
 
10:25 PM
Anyone here good at golfing BF?
 
10:43 PM
@Zacharý I'm not specifically great at BF but I have a good deal of experience with other tarpits and a middling with BF.
 
Printing "kcufniarb" in <=80 bytes...
Or some case-variant.
WTF IS YOUR PROFILE PICTURE NOW?! I JUST NOTICED...
 
@Zacharý You talking to me?
 
No. @"Cat"Wizard
 
11:03 PM
its just a cat
it's meowing
 
CATastrophy more like
 
why does you say these mean things...
 
@quartata I believe it is snzzeing
 
Guys, The cat is yawning
 
It is terrifying is what it is doing
 
11:15 PM
What is your problem!
 
NO EYES
 
It has eyes!
You just can't see them because of the angle!
 
still creepy as f**k
 
s/f**k/he**
 
either/or works.
 
11:33 PM
either is the same as or
 
11:46 PM
Exclusive/inclusive...
Either ... or ... is used to stress the exclusiveness (XOR)...
 
XOR... yes... xor
 

« first day (2710 days earlier)      last day (2136 days later) »