« first day (2387 days earlier)      last day (2751 days later) » 

10:00
D. The mean of the two primes
@trichoplax The mean of the two primes would be the number itself, which would be a non-sense.
I will go with option A, because OEIS, Mathematica and MathWorld pick it too
> Closest prime to n (break ties by taking the smaller prime).
Indeed. It wasn't serious. All the genuine options seem prone to misunderstanding, but A or B will probably break least code where it doesn't matter.
Poll closed.
@trichoplax Correct :P
@Mr.Xcoder why do you need one
@ASCII-only For Cthulhu, which happens to be a number-manipulation language
10:04
@Mr.Xcoder isn't MathWorld pretty much Mathematica encyclopaedia?
@Mr.Xcoder still when would it ever be useful
@ASCII-only It is. I searched all their references
@ASCII-only Of course
@Mr.Xcoder I asked when :P
For example:
8
Q: Code-Challenge:The Nearest Prime

QuixoticChallenge In this task you would be given an integer N you have to output the nearest prime to the integer. If the number is prime itself output the number. The input N is given in a single line,the inputs are terminated by EOF.The number of inputs would not exceed 10000 values. The c...

@Mr.Xcoder apart from this
I also have built-ins for next_prime and previous_prime, as well as prime factors
10:06
@Mr.Xcoder why call it Cthulhu
@ASCII-only Who knows?
@ASCII-only Let me link to the reference.
@Mr.Xcoder exactly, never :P
@ASCII-only It is a nice addition to the language
I am having trouble finding the reference, wait a bit
@Mr.Xcoder but... but it's wasting a byte that could be put too much better use
Cthulhu won't be ASCII-only, so that should not be a problem. I'll see if I keep it or not.
10:11
@Mr.Xcoder neither is Charcoal, but Charcoal is still running out of codepage space
@ASCII-only It was a comment of MEnder, which told someone that undefined behaviour means you can do anything, including summoning Cthulhu. And then I decided I should create my own language (and being influenced by that comment), I called it Cthulhu.
I couldn't find the comment. It has probably been removed or something.
You know, Cthulhu, Charcoal...
@Qwerp-Derp Is the github repo golf all the Euler's dead?
@Mr.Xcoder what's the link between the two
@Mr.Xcoder ???
@ASCII-only Ignore that
@ASCII-only It was just crazily amuzing in that context and that comment received tenths of upvotes, and was really inspiring. Cthulhu is strong, and thus has enough force to manipulate all those numbers :)
@Mr.Xcoder :| Ok i guess
@ASCII-only How's Charcoal doing?
10:19
@Mr.Xcoder what do you mean
It might need a rewrite? Not sure if it's current paradigm is as golfy as it can be
Also needs SOGL compression, will do pretty soon
Wanna steal stuff from dzaima :P
And I'll have to continue working on Wolfram Language stuff sometime
@Mr.Xcoder exactly :P
Also needs more ASCII art builtins
@ASCII-only Even more :O - Good luck doing them all. Cthulhu will suck at
@Mr.Xcoder no as in literal ASCII art
10:23
@Mr.Xcoder well yeah it's a number language >_>
Like how Charcoal sucks at numbers atm
Poll: sympy or custom algorithm?
@Mr.Xcoder custom
I already have sympy :P, since it is much more efficient. Dennis also uses it for Jelly, so I think it's safe :)
And I am a bad algorithm writer, sooo...
Then why are you asking at all lol
@ASCII-only Because I want to see if numpy is realiable
I think? it is, but I am not convinced
10:25
@Mr.Xcoder why would it not be
IDK
GTG, o/
If there's a reason to think it's unreliable, you could fix their algorithm rather than write a new one, since new algorithms will likely need more fixes than existing ones, unless what you need is a simplification of what the library algorithm does
I am back
11:28
0
Q: A program that outputs itself in reverse order

iBugWell the title says it all. Standard loopholes apply Nothing to read from stdin, and output goes to stdout 1-byte-long programs are... nonsense. They don't qualify A program with a single byte repeated is also a nonsense (like aaa) Please mark it out if your program is a palindrome Sample: ...

11:39
0
A: Sandbox for Proposed Challenges

isaacgtest-battery code-challenge word decision-problem Is it a noun? Given a string as input, determine whether it is a noun or not. You will be scored on the 1000 most common English words, by how many you correctly label as a noun or not. The program or function which correctly classifies the mo...

I'd be interested in comments on my sandboxed question.
12:17
0
Q: Maximum sub-array

iBugDefine the "maximum sub-array" of a given array as "a (consecutive) sub-array that has the biggest sum". Note there's no "non-zero" requirement. Output that sum. Sample input 1: 1 2 3 -4 -5 6 7 -8 9 10 -11 -12 -13 14 Sample output 1: 24 Description 1: The biggest sum is yielded by cutting 6 ...

> In cases where a word could either be a noun or some other part of speech, I tried to classify it by its primary part of speech.
@isaacg why?
who said that a word can only have one part of speech?
report can be a verb or a noun, so it is both a verb and a noun
That's a good point. I'll change it.
@LeakyNun OK, I changed that.
@isaacg why is "a" a noun?
I think it's from the usage as a letter
@LeakyNun That's because we are talking about context-sensitive grammar right? Or did I get it wrong?
12:28
@isaacg so is "b" a noun?
b isn't a common word, so its not on the lists
@isaacg I?
That was somehow left off my common word list - something is wrong.
A is a noun, I is not. Huh.
Oh, the usage as a noun makes sense: "I got an A on my test". Yep, that's being used as a noun.
@isaacg That would probably be because the pronoun I is more common than the letter I reference?
I switched away from primary usage to any usage. Article A is more common than noun A, but I'm counting it as a noun anyways.
Nothing's going to be perfect. I'll put a clarification to that effect in the challenge.
12:47
As long as it's well defined for the test cases, I don't think it really matters
0
Q: Translate Braille and ASCII

Roman GräfChallenge Write a program that when executed in one language translates alphanumeric ascii input to the corresponding braille symbol. If executed in a second language of your choice it has to translate the encoded input back to the initial ascii text. You do not have to handle punctuation, but y...

OK, I think I fixed stuff.
 
2 hours later…
14:32
long long long also crashes C++ (GCC)
Did anyone ever post an answer in Objective-C here on PPCG?
15:23
0
Q: What does "Standard loopholes apply" mean?

iBugI'm new to PPCG and I've seen a bunch of questions with this line in their requirements: Standard loopholes apply. A quick search on Meta tells me it's a series of restrictions, or disallowed things. However today I saw a question with this statement: Standard loopholes are forbidden. ...

@ConorO'Brien ._.
@ConorO'Brien what do you mean ._.
@miles nice! thanks a lot
@HyperNeutrino the lines are like 100+ chars long lol
oh you were reading my source code :P
15:38
that's equivalent to two expressions, each of which do absolutely nothing :P a key feature is that like Python, semicolons are unnecessary, but in contrary to Python, semicolons aren't even required for two statements on the same line
expressions can be combined using operators but if two expressions are adjacent without an operator then they are individual expressions
Like so: Try it online!
so it's like js's ASI?
what is that ._. I don't know most CS terms(/abbreviations)
it's not a cs term. "automatic semicolon insertion"
oh
I guess? I haven't used JS in a while and I forget how it works
Well not quite; a=1 b=2 breaks JS (from Chrome console) but not Proton.
right
but a=1\nb=2 works
15:41
ah, yes
that works in Python too
not the same thing, for python. python doesn't require semicolons, whereas js "does"
oh? oh so JS requires them but puts them in if you don't?
@ConorO'Brien no problem, was it what you were looking for?
CMP: In Proton, should map, range, zip, etc. give map, range, and zip objects, or should they return a list?
15:49
@miles I was hoping for something a little golfier, but it is quite nice. (I'm working on your "disappearing elements" challenge.)
using your adverb, >@(({.,>:@[}.])&.>/@|.@;;/)~^:(*@#@[) would work, but I believe I can get lower using a different approach
I see, I haven't really tried a J solution for it as I made the test cases by hand
Does proton support the *list operator?
I think my best bet would to transform the input indices from (say) 1 4 4 0 2 to 1 5 6 0 4
Something that might help is that you can perform removal using rotate, }.&.(2&|.) 'abcde'
@ppperry No; I might implement it sometime in the near future.
15:54
@HyperNeutrino proton?
For functions (or really just lambdas since functions don't exist yet), you use ... for varargs
@Maltysen new language I'm making
so like f = a, b, c..., d, e => something()
also something I quite like about Proton is that you can put varargs in the middle of a parameter list
However, you can only have one ...
in that case, I have no opinion about map/range/list
Ah okay. For map/range/zip, you'd need list(map(..., ...)) for it to give you a list, otherwise it would be a map/range/zip object
anyway gtg for a bit o/
-4
Q: Java codes for scroll bars

BURNING STARPlease what code will let scroll bar display a hidden portion of a page? I am designing a graphical user interface with Net beans. I have designed a registration page, but the scroll bar does not display the hidden part of the page

16:28
CMP: *a or a... for varargs?
for a function?
@HyperNeutrino both :p
@HyperNeutrino chat mini poll?
16:32
yes
of course *a is golfier
yes but which one is more readable? (the language is meant for readability not golfing)
and I hate a... for some reason
I like declare vararg(a) /s
It resembles Java
16:33
@HyperNeutrino Positron?
really why not both? Then everyone trying to use positron will be happy
@Zacharý No, Proton.
well I'd say *a is better than a...
I abandoned it and started making Proton because Positron is trippy
I prefer only having one though, personally. I could try implementing both
@HyperNeutrino eugh by no means it'd be confusing
16:34
*a in my opinion.
well I have no clue what a... would represent...especially since in python 3 it would be two objects next to each other (object and Ellipsis) == syntax error
I'm going to do *a then. More people like it and it's the same for Python.
Proton has much more flexible syntax than Python IMO. You can place two expressions right next to each other without borking
on the same line, without semicolons
if it takes function arguments like f a b c for example?
I was about to think Proton was a statically-typed scripting language, but then I realized int a = 2 would be int; a=2
well there are no named functions, only lambdas
so f = a, b, c => something
16:36
oh so you assign a lambda to a variable to "define" a function?
or for varargs (right now), f = a, b..., c => something
@EriktheOutgolfer yes
then how are you going to support statements in it?
(that is, well, excluding any exec-like function)
@EriktheOutgolfer {}
@Zacharý I thought I fixed that ._.
oh yeah TIO is behind
16:38
Might just not be on TIO yet,.
(ninja'd)
How hacky would it be to make an APL dialect designed for golfing by using Dyalog/GNU/ngn's for interpretation of the language?
?
like build APL into Proton?
it's not for golfing I think?
No, I might make an APL golfing dialect.
16:40
huh
Isn't APL golfy enough as it is already? :P
(Mostly abusing codepages of course)
What even was the bug that caused == to not work properly?
Halp I am getting Error: struct std.container.array.Array(T) if (!is(Unqual!T == bool)) is used as a type when I try to declare a field with the type std.container.array.Array in D
But it should work as it is used as a return type and argument type in the source of std.container.array.Array
May I see the code?
class Game {
    ...
    Array!Entity entities;
    ...
}
@Zacharý == was comparing 2 to an Identifier instance as opposed to the value it carried. That was fixed by applying f(evaluate(ident, symlist)) instead of hardeval(ident, symlist) in _ which is used by most binary operators to get objects and a symbol list and apply the regular operation
16:51
I have no idea, TuxCopter, to be honest. Is that where the error occurred?
Did you forget a semicolon somewhere? Is Entity a class or a struct?
Entity is a class, and I didn't forgot a semicolon
Wait
Well, this works fine: tio.run/##S/n/…
The error occured at the initialization where I used a new to initialize but Array is a struct so it borked
>_>
16:57
So, you're making a game in D?
Yeah a roguelike
What library are you using to make it (if any)?
Nothing except ncurses
Welcome to hell my friend.
lol the nice thing about the way I set up Proton is that I can add new syntactical components in like 10 minutes
@Zacharý o_O what is that
16:59
@Zacharý reset FTW
D runtime error along with an unclosed Ncurses window...
@TuxCopter What do you mean?
@Zacharý There's the reset command to reset the state of the terminal
It fixes unended curses windows
I wish I would've known that before, thanks.
curses in Python is confusing. Is there an equivalent to reset?
(Reset is a bash terminal command)
17:02
I found resetty() but it doesn't work properly I think
@Zacharý (there's a Python library too)
(oh)
So, you're interfacing directly to C TuxCopter?
Hey that's nice
so I just do os.system('reset') :P
anyway gtg for a bit o/
@Zacharý I'm using the Deimos ncurses binding
Oh, well, nvm about hell then. I didn't know that existed, so I interfaced directly to C. >_<
17:22
Hey, do you know how to get Allegro5's D binding to work (I have GDC)
Guess I'll stick with hacky C interfacing then.
Is there any SDL binding for D?
there doesn't seem to be any on DUB
Derelict?
Oh thanks
17:44
Hey, did you hear the news? gcc.gnu.org/ml/gcc/2017-06/msg00111.html
Yep, D will be in GCC one day!
Huh, it seems that it's not possible to get a reference to this
And auto t = this; ptr = &t; crashes
whoa
CMC: print × without × in your code
jelly 5 bytes
17:54
CJam: 215c
18ịØJ
or 215Ọ for 4
@ConorO'Brien print"\xD7" Python2
@TuxCopter heh xD
MY, 5 bytes: 7Dǵ'←
17:56
@ConorO'Brien O_O _ O_O _ O_O _ O_O
Woah.
@ConorO'Brien try running it on tio too?
@ConorO'Brien o_o
maybe it's just a coincidence or something...
click the link
17:57
then try running it locally
@ConorO'Brien Prints & on my machine
yeah I knew it was a coincidence or something...
oh yeah it is
mine prints 0xC0
Check: >215o
05AB1E, 3 bytes: Ƶ>ç
because Ƶ means "take next char convert it from base 255 and add 101"
18:01
Why is that a builtin
it's good for large numbers
@EriktheOutgolfer That's really specific
you can do from 101 to 355 like that
I guess that makes sense...
If we're allowed to print other stuff too, then Jelly, 2 bytes: ØJ
18:04
oh btw I think we should've been able to do 101 to 127, 129 to 255 and 257 to 357 though
128 and 256 are already 2-byte builtins
@Challenger5 hehe cheater
That approach also works as Wc, in CJam (push negative one, convert to character (implicit modulo 65536), character range)
But don't run it - it really breaks things (at least on TIO)
@Challenger5 no it doesn't
Well it doesn't break things, but it lags up my browser (although that may have something to do with the fact that it generates a lot of output)
In any case, most people don't really like looking at a mess of meaningless Unicode.
0
Q: Find the smallest unique sublist

Wheat WizardGiven a list of lists find the smallest list that is a sublist of exactly one list. For example if we had [[1,2,3], [1,2,3,4], [2,4,5,6], [1,2,4,5,6]] The smallest sublist would be [3,4] since it only appears in the second list. If there is no unique sublist, output an empty list (this re...

CMP: Who here has played (The Battle of) Polytopia (formerly Super Tribes), and if so, who would be interested in a Polytopia-like (simplified) KoTH?
19:04
2
Q: Is it a noun or not?

isaacgGiven a string as input, determine whether it is a noun or not. You will be scored on the 1000 most common English words, by how many you correctly label as a noun or not. The program or function which correctly classifies the most of those words in 50 bytes or less will win. Nouns A noun is ...

@isaacg yes. Pyke was directly inspired by Pyth
 
2 hours later…
21:06
@Downgoat is the VSL online interpreter just completely broken or am I using it wrong? 2 + 2 errors for me.
I've been question-banned from Stack Overflow, partly from bad questions, partly from badly-written questions and from one badly-received question that I don't understand the downvotes on. :-) Does anyone have time to have a look and suggest some more improvements?
Wait question-banning is that strict? :(
Wait, question-banning is a thing?
For this question, you've shown no research effort or code that you've tried; it makes it fairly difficult for users to help you; a minimal example that reproduces the error is usually appreciated. Now, in this case, that doesn't make sense, though you could try to phrase it more into a question than just a statement.
Wait yield from is a thing? :o
Also for that question, you can't implement both addition and concatenation; I mean, they're the same operator. Instead, if you're not using multiplication, you could theoretically use multiplication for concatenation.
Heh, duplicate duplicate.
21:17
And 3 more with non-negative net score.
@HyperNeutrino That one was intended to help other people - it was the second time I'd looked that exact error up with no relevant results and had to hunt for it - the only way I found it the second time was sort of remembering the search query I used last time.
It wasn't intended to get downvoted though. :-p
So essentially you were trying to create a marker for others to follow to the same question, or something?
@HyperNeutrino That one was asking for best practices. I had working code.
Ah okay. Makes sense; I gave it an upvote earlier too.
Some of them, like the duplicate, are unsalvageable.
RE this question, am I right in thinking that it could be implemented with mmap in C?
21:24
@Pavel You need to load the stdlib first. The version online is the one without module support so you have to manually load the STL, but I have a version I have yet to push (testing it) which fixes that
@HyperNeutrino Does this help to explain what was wrong? :-)
> Flash hacks and other crude methods welcome if they are effective enough.
Flash. *shudder*
@wizzwizz4 oh hum maybe :P
21:40
@Downgoat How do you load the stdlib?
well you have to manually get the STL files and create a ModuleInterface to read them and then subclass CompilationIndex to pass that module (as a CompilationGroup) to it so not so easy >_<
Guys, I need some help. I'm using Bash (on windows) and I need to run a .bat file. Running it normally tried to run the file as if it were written in bash, which it isn't. How do I run it as a batch file?
@Pavel The problem is you're using Windows. (I have no clue how to fix your problem)
21:55
I have to use Windows for work, can't do much about that.
Try piping into cmd?
That might work. Good thought.
Or just delete system32 /s
The solution I went with is "Stop being a lazy fuck and open powershell"
anyone good at math here? i have a small question
22:04
Although to be fair my powershell looks a little weird, I screwed something up with it.
@Maltysen Fire away
@Zacharý I recently learned about the jacobian
and the thing in surface integrals
@Maltysen I REGRET EVERYTHING
@Pavel I thought PS used unicode?
where you multiply f(r) by |dr/du cross dr/dv|
seems like the jacobian
but in 3d, its not a square matrix so how take the determinatn
@Zacharý oh lol
@Zacharý I have no idea where that character comes from. Copy pasting it somewhere else shows a backslash.
Also, even without that, it looks ugly af
Well, time to finally install Arch on Windows
22:07
shutdown /f
ಠ_ಠ
It bothers me to no end that MS went with / instead of - for flags.
uhh how would you have O(1) space complexity with variable input size?
Nvm SO answered
@2EZ4RTZ Assume all integers have constant storage size (at least for theory)
22:27
@Zacharý HMMMMMMM...... encodes all needed data as a single number
I think openAI is something everyone here would like. openai.com It is open source AI and it is very well done. The link above is a page where the AI beats the best dota players in 1v1
22:42
Anyone know how to link to a specific definition number on dictionary.com (or merriam-webster.com) like #14 at dictionary.com/browse/front
Anonymous
Friendly reminder that I still need handwriting samples for a challenge.
23:15
@2EZ4RTZ Summing a list (for example) would be O(1) because the stored vars (current_sum, and loop_counter) don't take more space as the input grows
It looks like Chemistry.SE has their own game of golf... chemistry.stackexchange.com/questions/80947/…
13
Golfing the synthesis of a molecule
2
Q: Generate a congruent list with the smallest sum

Challenger5Two lists A and B are congruent if they have the same length, and elements that compare equal in A compare equal in B. In other words, given any two valid indices x and y: If A[x] = A[y], then B[x] = B[y]. If A[x] != A[y], then B[x] != B[y]. For example, the lists [1, 2, 1, 4, 5] and [0, 1, ...

@Challenger5 If it lags up your browser there's something wrong with your browser :|
@Pavel There is no online interpreter (i.e. that's not an interpreter) wait wat
@Pavel :| this is wrong encoding is why
@Maltysen you don't?
yeah i know
but i meant how to come up with the area scaling factor
if you can't take the determinant
how is |dr/du x dr/dv| related to the determinant cuz it seems to be pretty much the same thing
23:31
O_o i just found a math question on SO
@Maltysen but isn't that the determinant
@ASCII-only in this case r is 3d
oh .-.
@Maltysen this probably doesn't help (page 8)
no thats 3 vars->3 vars
@Maltysen wait what how is that not 3d >_>
@ASCII-only im trying to do turface integrals
which give (u,v) -> (x,y,z)
*surface
@ASCII-only btw pls see slack

« first day (2387 days earlier)      last day (2751 days later) »