« first day (3114 days earlier)      last day (2024 days later) » 

01:21
0
A: Sandbox for Proposed Challenges

T. SalimFind the Lowest Common Ancestor of Two Nodes In A Binary Tree Any two separate nodes in a binary tree have a common ancestor, which is the root of a binary tree. The lowest common ancestor(LCA) is thus defined as the node that is furthest from the root and that is the ancestor of the two nodes. ...

Anonymous
@EriktheOutgolfer Basically, yes
Anonymous
Closer to x = [f(y) for y in z]; x = [g(y) for y in z], but you get the gist
Anonymous
Another gem:
Anonymous
a = b.reduce(
  (acc, c) => {
    if(someCondition(c)) {
      acc = [...acc, c]
    }
    return acc
  }, [])
Anonymous
The astute observer should notice that this is simply a = b.filter(someCondition) with extra copying
01:29
@Mego you mean filter, right?
Anonymous
@dzaima ...you saw nothing
ngn
ngn
04:55
@Dennis @DJMcMayhem @Doorknob @Mego this happened again. new user requesting access to the k tree: stackoverflow.com/users/6050730/scrawl?tab=profile . i'm tired of apologizing and explaining the difference between site profiles and chat profiles, i'll just tell them to enter the chat room and hope i'm around when they do
fetching new users' chat urls might be worth scripting
on top of that gmail denies me access to one of my accounts (the one i published in the room description), demanding a phone number. i can access it read-only only because i had forwarded it to my main account before. what a morning...
0
A: Sandbox for Proposed Challenges

A__(Back)space Joust In this task, you should take a character input string allowing at least the space(0x20) and backspace character(0x08). For the inputted line, if you encounter a space, enter a space; otherwise, remove the rightmost character. If you encounter a backspace when the buffer is e...

05:43
0
Q: Does this Foo machine halt?

Leo TenenbaumDetermining whether a Turing machine halts is well known to be undecidable, but that's not necessarily true for simpler machines. A Foo machine is a machine with a finite tape, where each cell on the tape has an integer or the halt symbol h, e.g. 2 h 1 -1 The instruction pointer starts by poin...

ngn
ngn
05:58
@ngn this does the job:
#!/bin/bash
set -e;mkdir -p data
while :; do
 f=data/$(date +%y%m%d-%H%M.txt); echo $f
 curl chat.stackexchange.com/rooms/90748/the-k-tree | grep email_hash >$f
 sleep 10m
done
 
1 hour later…
ngn
ngn
07:19
@Dennis @DJMcMayhem @Doorknob @Mego could you grant chat.stackexchange.com/users/201563/user6050730 (chat user url) access to chat.stackexchange.com/rooms/90748/the-k-tree please?
07:32
CMC: Find two 3x3 matrices A,B with integer entries such that A*B-B*A = [[0,1,1],[1,0,1],[1,1,0]]
Can anyone please unstar all the bot messages?@Mego @Dennis @DJMcMayhem? (Reason: Spam in the starboard.)
All done. Thanks for flagging!
@Snow Thanks for cleaning up!
@Snow Can you actually find out who is starring what?
I expect the admin team can. Has this been going on for long or is it just a temporary thing?
@Snow There are some star-shenanigans going on every now and then, but not really that frequently anymore - so it is not really an issue. Usually our mod team handles it quite quickly, depending on the time of the day.
ngn
ngn
@flawr generate a random matrix, divide [[0 1 1],...] by it
07:44
@ngn I'm not sure I understand, can you make an example?
@flawr Ok. might just be someone with an unconventional idea of helping. Let us know if it continues for some reason. It might help to take a look at who's recently joined the room when it starts happening.
@Snow I think you can also star messages from the transcript, you do not necessarily have to be in the room.
@flawr I saw it done by some admins when they were here and there, so I did the same during their downtime.
I couldn't unstar when you said this, so my bad.
I'll raise this internally. It could be someone playing with a userscript - although someone doing that should really be polite enough to tell people.
@Snow see ^^, I think it is already resolved:)
@V.Courtois Usually there is no reason to star the bot messages, I think in general it is rather frowned upon, except if it is something exceptional
07:49
Okay, I take not
e
Ok, no problem. Thanks.
Like when we got the message that we graduated or got the new design. (For the newest questions on main/meta you can just visit main/meta.)
but though, starring the CMC was handy >_<
Ok yes that is acceptable I think, but only really if you like it, it doesn't have to be starred just because it is a CMC.
Ah, but many people that connect only at a certain time won't be able to even see it :o
07:52
Yes that is true, and as I understand CMCs they are usually targeted at the people currently in the room, not really a long term thing.
If you want to make a challenge that more people see it is probably a better idea to just post it as a question on main.
Haha yeah ok I see
@Snow anyway, thanks for thanks a lot for your help!
Yeah, no problem. Glad to help out.
08:24
any Nim users here?
A__
A__
08:40
oh
yeah ok I see
I think it is already resolved:)
... why wouldn't they? A function could return an empty string, and a program will halt after outputting. If it doesn't halt, then that's their problem – Jo King
...Or that the program has evaluated the string and has outputted nothing – Jo King
ngn
ngn
09:01
@flawr that doesn't actually work... so i brute forced it: (-1 -1 -1;-1 -1 1;1 1 0) and (-1 0 -1;0 -1 0;1 0 -1)
09:43
aren't there multiple solutions?_?
Oh, my bad. I saw your tio.
09:58
@ngn huh, never heard about K
is it similar to J?
 
1 hour later…
11:24
@flawr Both are descendants of APL, but K does not have the full-fledged array model of APL/J.
0
Q: May I return more results than specified?

valI'm golfing in Lua, which does support such thing as multiple return values like this: function multret() return 1, 'hello' end local a,b = multret() -- a is 1, b is 'hello' local c = multret() -- c is 1 Now, my problem exactly: there is library function string.gsub whose result I directl...

12:14
@Adám K, thanks
:)
;-)
@flawr Actually, I should respond with ☺ which is J in the Windings font. When my colleagues use Outlook to send me smilies, I get them as "J". Took me a while to find out why they had so many stray "J"s in their emails.
ngn
ngn
@Dennis @DJMcMayhem @Doorknob @Mego anybody?
@flawr both are apl descendants, as Adám says, but i think also very different: j is more mathematical, with a large vocabulary of built-ins, and is free (gpl). k is simpler, smaller, conceptually half-way to lisp, extremely fast and used on wall st
12:31
@flawr Also, K uses ASCII-only like J but (mostly) single-glyph built-ins like APL.
@ngn Done.
ngn
ngn
@Dennis thank you!
ngn
ngn
12:47
@Adám syntactically, j is a disaster
digraphs, unbalanced parens, odd-even trains (functions at odd and even positions could be applied with different arity, and it's hard to keep track), no lambdas (i.e. no inline user-defined functions), and cap ([:) is just cruel
@ngn That's a strong statement, but I do agree that it has some very complex rules, especially when it comes to operators/adverbs. I don't really like K's calling syntax either.
ngn
ngn
@Adám what don't you like about it?
@ngn I don't like that it forces user-defined functions to be prefix, preventing natural-looking sentences.
ngn
ngn
@Adám it's either that or k would be unparsable like apl and j
@ngn Yup, of the whole family, I definitely has the cleanest syntax.
ngn
ngn
12:55
@Adám how does it handle infix functions?
@ngn All functions are infix.
Isn't basically Jelly a fork of J ? because its syntax is handy.
@V.Courtois Not a fork. Jelly uses the list-of-lists array model (like K, JS, etc.), mirrors direction of execution, and uses the 2-train model (like K) instead of the APL style or the J style 3-train model. Jelly also uses single Unicode glyphs (like APL).
@ngn Also, there's never any doubt about which syntactic class a name has — it is a dyadic function, because everything is a dyadic function. I has no other types (arrays, operators,…).
ngn
ngn
@Adám if i understand correctly, it uses x . f for monadic application
@ngn Yes, although you could say only . is really being called, and it takes x and f as arguments.
ngn
ngn
13:09
@Adám is marshall still working actively on it?
@ngn J has inline functions
they look like a cruel joke
I mean like 3 :'5+y'
@ngn He slowed down a lot when he started working on APL.
ngn
ngn
@FrownyFrog yay, you're right :)
13:19
@ngn How can you possibly call that abomination "yay"‽
ngn
ngn
@Adám j has a "nice personality" syntax
@ngn ⍨
It literally has "CRLF" written as four characters.
That's not right.
And all those unbalanced brackets and quote marks.
@wizzwizz4 It is a variable in the stdlib containing what you expect it to.
@Adám Oh, okay. I rescind that objection.
ngn
ngn
13:23
@wizzwizz4 and NB. (start comment) which often requires a space on <s>both sides</s> the left
@wizzwizz4 But yes, ". is eval() and ] means the right argument.
@ngn I don't think it ever needs a space on the right. K also requires a space before end-of-line comments, no?
@ngn --- to strikethrough.
ngn
ngn
@Adám correct, only on the left
@wizzwizz4 thanks, i must remember that
@ngn K and J also have other strange spacing rules. Like K's 2-3 vs 2 -3 and J's /.* vs / .*
ngn
ngn
@Adám k's comments are just / and that space. i can't imagine what force made ken/roger think it was a good idea to use NB ("nota bene") in uppercase and with a dot
@Adám as you know, i don't write too many comments, but 5 keystrokes (4 chars + shift) is enough to wipe out any desire left in me to do so :)
13:32
@ngn You don't even write comments in APL where you only need 2 keystrokes.
ngn
ngn
@Adám i think 2 -3 is better than 2 ¯3 or 2 _3. it's what people tend to write naturally
@ngn I think strand notation is the problem there.
ngn
ngn
ok, but seriously, behind the ugly syntactic facade, j has a lot of beauty and practical utility to offer
@ngn Leading axis orientation and well-defined function rank and enclosed scalars are very good.
A__
A__
13:50
(If anyone is currently talking here, please ignore this message. I upvoted Kevin Cruijssen's deleted answer, and then the answer became undeleted. This is indeed weird.)
@Adám haha that must be confusing :D
 
1 hour later…
15:20
0
Q: Dropsort with a Twist

JamesThis is my first attempt at a Code Golf question. If it needs obvious edits, please feel free to make them. I am basing this on this Dropsort question. These same conditions apply to my question. In this task, you will be given a list of integers as input (STDIN or function argument, you a...

 
2 hours later…
17:37
@dzaima I can map 4 to the programming language (if it didn't have boundaries on the number of cells)
is 4 Turing Complete?
17:57
@MilkyWay90 Yes.
It's got almost direct analogues of the six BF instructions.
Ignoring that the memory is finite, it's Turing Complete.
@MilkyWay90 ^ but memory is finite (unless you have infinite precision), so no turing-completeness
@dzaima But then Python isn't Turing complete!
@wizzwizz4 it doesn't explicitly limit memory
Wait. Files – never mind.
MilkyWay90's language explicitly has the source code have to name all the possible cells, equivalent to having python only have number variables whose values are limited in size
18:10
@MilkyWay90 Your language has infinite memory.
Proof:
Cell 0 contains the bits leftwards of the pointer.
Cell 1 contains the bits rightwards of the pointer, in reverse order.
You can now implement BitF.
All you need is doubling, halving and odd / even checking.
18:48
oh
@wizzwizz4 Thank you!
So Geometry Dash is an FSM
Maybe?
and would be Turing Complete if it removed the 9999 count limit
19:00
Anyone here know about the IOI?
@user202729 no
What is that?
Now I'm curious
(as expected)
Nevermind
Thankfully, I am not a cat
I.O.I (Korean: 아이오아이; also known as IOI or Ideal of Idol) is a South Korean girl group formed by CJ E&M through the 2016 reality show Produce 101 on Mnet. The group was initially composed of eleven members chosen from a pool of 101 trainees from various entertainment companies: Lim Na-young, Kim Chung-ha, Kim Se-jeong, Jung Chae-yeon, Zhou Jieqiong, Kim So-hye, Yoo Yeon-jung, Choi Yoo-jung, Kang Mi-na, Kim Do-yeon and Jeon So-mi. They debuted on May 4, 2016 with the EP Chrysalis and actively promoted as a whole and as a sub-unit for less than a year. The group's concert titled Time Slip – I.O.I...
?
Just what a cat would say
But I would be dead if I were a cat
19:05
It's fine, you can die 8 more times
"Curiosity killed the cat"
@Veskah What if I was Schrodinger's cat?
I could die 9 AND 8 times
or is it just an oversimplification of quantum mechanics to us non quantum physicists?
Die 9*math.random() times
@MilkyWay90 :/ The other one...
Heh, instead of the IOT, it's the Internet of Internets
19:08
oh ok
(No idea what it is, just make a bad joke)
I couldn't find anything on Google for "Internet of Internets"
oh
I'm working on an mp4 to Geometry Dash level converter
@MilkyWay90 (???)
What is the mp4 supposed to have?
Just for fun
a normal video
like this but way harder to make
I'm planning to use it for a telltale-like level
Andthe creators didn't make their code just Python
20:08
20:58
0
Q: Write an interpreter for *

TheOnlyMrCatThe task is simple. Write an interpreter for the language *. Here's a bigger link to the wiki. There are only three valid * programs: * Prints "Hello World" * Prints a random number between 0 and 2,147,483,647 *+* Runs forever. The third case must be an infinite loop according to the spec...

 
2 hours later…
22:57
Uh oh, I think I am code-bowling in production code

« first day (3114 days earlier)      last day (2024 days later) »