« first day (2171 days earlier)      last day (2655 days later) » 

4:01 AM
@quartata thx
@Dennis thanks and you're welcome lol
tbf I was plannign on bountying on it anyway
just a question of yours or flawr's (on my other challenge) first
 
Hey guys what's the consensus on ><> quines with g?
 
@flawr Woah, that's so cool. It's mind-blowing that p=2 gives the minimum value of pi for L^p norms.
 
@DestructibleWatermelon cheating. It reads source
 
I feel pretty good about being 6th for most hats earned on PPCG.
 
ok then
well, time to start the programming
 
Anonymous
4:15 AM
#2 is nice
 
meta.codegolf.stackexchange.com/questions/11103/… is finally generating upvotes on it's answers!
 
Anonymous
I was #1 for a while, but fell behind because the only hats I have left are really difficult to get
 
@DestructibleWatermelon You going to solve this? codegolf.stackexchange.com/q/298/34718
 
Anonymous
Especially the gold hat
 
@Qwerp-Derp You didn't then define var2
@Mego hue hue
 
4:16 AM
@Mego I got the gold one, but the silver one is hard for me.
 
Go vote so hopefully we can have consensus soon.
 
I got it recently
 
@mbomb007 actually I'm just going to improve my current solution
 
for something... idk what.
 
@EᴀsᴛᴇʀʟʏIʀᴋ thanks for what?
 
4:16 AM
Oh right. Just came from there.
Forgot that was yours.
 
Anonymous
The only gold badges I have left to get are marshal, socratic, copy editor, legendary, illuminator, and all non-code-gold tag badges
 
@mbomb007 Necromancer is probably the easiest silver badge IMO
@Mego Great Question or Answer can be awarded multiple times
 
The next one I'm closest to is Archeologist
I'm currently tracking Fanatic though, to make sure I don't break my streak.
64/100
 
Anonymous
@quartata I need ~50 more upvotes on my highest-voted question or answer to get one of those. Not gonna happen.
 
I'm also really close to Copy Editor.
 
4:19 AM
@quartata jle doesn't work for some reason
%include "io.inc"

section .data
var DB 0
var2 DB 0

section .text
global CMAIN

forLoop:
    PRINT_DEC 1, var
    inc BYTE [var]
    mov eax, var
    cmp eax, [var2]
    jle forLoop
    ret

CMAIN:
    GET_DEC 1, var2
    call forLoop
    ret
Sorry if I'm harassing you with questions...
 
Anonymous
Even if I found 181 things to flag, I doubt they'd all get handled by the end of WB
 
p in fish quine is ok though right?
 
Also, I know people have cooperated on solving challenges together before. I'd be open to someone helping me create an extendable prime checker in Minecraft (for the indefinite bounty)
I've got the plans on paper, and a partial .circ file.
 
@mbomb007 It's my one right?
 
Yeah
 
4:23 AM
Can I have a look at what you have right now for a "module"?
 
Idk if it would make enough sense without my paper
Maybe I'll take a pic
 
@Qwerp-Derp What exactly are you trying to do with this code
 
@quartata Ummm I'm trying to do a for-loop that outputs numbers up to an input n
So with input 5 it should output 012345
But it keeps going forever
 
As in outputs forever or doesn't output anything?
 
@quartata Outputs forever
The inc works but the cmp and jle doesn't work
 
4:26 AM
 
Oh I see
 
@mbomb007 You could use Logicode for that :)
 
Eh.
It has to be easy to convert to Minecraft
 
True
 
so I'm laying it out in sections
 
4:27 AM
how to duplicate a stack in fish...
 
such that it's extendable by adding a new section, which adds one bit
 
or part of a stack anyway
 
@Qwerp-Derp You have your mov in the wrong order
 
@DestructibleWatermelon this is tastefully vague
 
You should probably just keep thr counter in another register though.
 
4:29 AM
@Qwerp-Derp Simply put, the number to check will be commited to the P register. Then, check all numbers from 1 to P-1 and see if they divide P.
 
Oh kule
 
That's what the A and B registers are for
 
I want to take the stack, print it out as a string, and then print out a substring at the end again
 
A is the counter from 1 to P-1, and B will be adding 1 to it.
 
hmmmm, the quine part of this will be the hardest part I suspect
 
4:30 AM
@DestructibleWatermelon you could use a pseudo for loop with the register being a counter
 
@quartata So something lie this?
%include "io.inc"

section .data
var DB 0
var2 DB 0

section .text
global CMAIN

print:
    PRINT_DEC 1, var
    inc BYTE [var]
    mov eax, var

forLoop:
    call print
    cmp eax, [var2]
    jle forLoop
    ret

CMAIN:
    GET_DEC 1, var2
    call forLoop
    ret
 
And if the carry bit is set, then an overflow occurred, and the number is greater than P, so we stop.
 
@ConorO'Brien register?
 
@mbomb007 Whoa kule, and all of that without command blocks right?
 
you know, @
 
4:30 AM
Nevermind I think I misread your mov
 
@Qwerp-Derp Yeah
But all the circ file has is the registers, bit adders, and equality comparison.
 
@ConorO'Brien doesn't seem like that would work easily at all
 
I don't have any "if" logic, register init, or edge cases yet. Or any RS-Nor latches to maintain state and stuff.
 
also I'm working on one dimension
 
@DestructibleWatermelon what are you trying to do?
 
4:32 AM
You're missing brackets is the problem. mov eax, [var]
 
Oh
@mbomb007 Don't you need a less-than check as well?
 
When it's put into MC, there will need to be latches and repeaters and delays to ensure operations are complete
 
Pretty sure
 
No
 
@quartata Nope, still doesn't work
 
4:33 AM
If the carry bit is set, then R < P.
 
@ConorO'Brien I'm trying to take the Turtlèd program embedded in the ><> program, print the Turtlèd program, then print the end of the python program that is in the Turtlèd program
 
So the > check is if the carry is not set.
 
It builds properly without brackets, without any errors
@mbomb007 Ah
 
oh. well the general quine framework in ><> is something like "r1b3*+!;>?o?|;<your code here>
 
I'm very bad at assembly one second
 
4:33 AM
huh, just realised I could probably simplify the python quine
 
@quartata Wot I thought you were expert
 
maybe not though
maybe someone else could
argh
 
@Qwerp-Derp Wait no you need the [..] in nasm
 
why did I pick a 2d language for 1d
 
what was the error with brackets
It's probably size
 
4:36 AM
@quartata I don't think this is NASM... there's no build errors now
 
What do you mean this is NASM syntax
 
this will be irritating
 
[...] is dereference in NASM
 
@quartata Where did I say it was NASM
I don't need brackets for this, so I doubt this is NASM now
 
4:37 AM
In your code because it's written in NASM
 
So apparently I just spent around ~40 minutes debugging a bug where I misspelt constructor as constractor >_>
 
@quartata Is this NASM?
 
hmmmm, maybe I should use a similar language
 
@quartata There's no difference in output with or without brackets
 
wait I just realised what a pain this would be to write into the Turtlèd program
 
4:39 AM
It stills outputs infinitely, incing up to 128 and overflowing to -127 over and over again
 
that's it its a Turtlèd python 3 python 2 one
 
@Qwerp-Derp AT&T syntax looks different
mov eax, var will move the address to var into eax
 
well, I think I'll have to change some stuff up a bit
 
Have you verified what's actually in var2
 
4:55 AM
I made a python 2 and python 3 thing now
now to add the other language
probably Turtlèd, but IDK
 
@ConorO'Brien do you know if it's possible to overload an implicit string cast? e.g. "" + myClass with toString and all?
 
@Downgoat in JS?
 
yeah
 
yeah. define toString for that class
 
:/ not working for me
 
5:03 AM
code?
 
> let n = require('./bindings/number')
undefined
> var a = new n(5);
undefined
> console.log( a );
CheddarNumberBinding {}
 
what's the problem?
 
It should output 5.000000
FFS— Boost is like the jQuery of C++
 
Boost really isn't necessary in C++11. There's only a few things missing now.
 
Idk, I am just trying to convert long double into string and std::to_string doesn't give full precision
otherwise I'll have to manually specify prescision
which I don't want to do because how do I know that, I read that it depends on compiler
 
5:07 AM
ok I think I can get a three language quinelike thing done
 
and lots of ifndef are ugly
 
OK, for some reason this doesn't output anything
%include "io.inc"

section .data
var DB 0
var2 DB 0

section .text
global CMAIN

print:
    ; PRINT_DEC 1, var
    inc BYTE [var]
    mov eax, [var]

forLoop:
    call print
    cmp eax, [var2]
    jle forLoop
    ret

CMAIN:
    GET_DEC 1, var2
    PRINT_DEC 1, var2
    call forLoop
    ret
 
@Downgoat console.log doesn't make a cast to string
 
wait what
huh TIL
I could swear I remember hearing it casts internally
 
> class MyNumber {
... constructor(val){
..... this.val = val;
..... }
... toString(){
..... return "{" + this.val + "}";
..... }
... inspect(depth, opts){
..... return "[" + this.val + "]~";
..... }
... }
[Function: MyNumber]
> let a = new MyNumber(51)
undefined
> console.log(a)
[51]~
undefined
>
 
5:15 AM
:O
thank you so much :D
 
my pleasure :)
 
../src/ops.cc:55:17: error: invalid operands to binary expression ('num_t' (aka 'long double') and 'long double')
    self->value %= value;
    ~~~~~~~~~~~ ^  ~~~~~
no comprendo gcc error messego
Can I not do mod with long doubles?
 
nope.
#include <math.h> then use fmod iirc
 
<cmath> in C++ IIRC
someone please explain to me this design choice
it make 0 sense to me
Or did devs like forget to do % for doubles and they didn't want to change operator?
 
Now I have to ask SO a question, which probably won't get answered because it's Assembly... :(
 
5:22 AM
@Qwerp-Derp there's always bounties
 
@ConorO'Brien But I have 132 rep
 
maybe you'll get rep from the question
CMC: parse a string formatted in CSV into a table/2d string array/reasonable output. You may assume that no "s will appear in the string and that the string will be valid CSV
 
0
Q: Assembly - jmp and cmp result in infinite loop

Qwerp-DerpHere is my code: %include "io.inc" section .data var DB 0 var2 DB 0 section .text global CMAIN print: PRINT_DEC 1, var inc BYTE [var] mov eax, [var] forLoop: call print cmp eax, [var2] jle forLoop ret CMAIN: GET_DEC 1, var2 call forLoop ret When giv...

Here's my question:
 
Random question: how do you all feel about posting summary messages every now and then? Like, maybe twice a day or after discussions on this or that topic have come to a close, posting something like:
Assembly: 22:15-? (Qwerp-Derp, Conor O'Brien, quartata, Downgoat)
Python and zip: 22:20-22:50 (Wheat Wizard, quartata)
Cheddar: 23:55-0:05 (Conor O'Brien and Downgoat)
 
@Qwerp-Derp have you tried jge instead of jle?
 
5:27 AM
@Downgoat Yeah, that just terminates with 0
With any input
 
I assume then that's your GET_DEC not wokring
wait you are on windows, no?
 
@El'endiaStarman that could be actually quite cool
though the time might be a little hard, being a fixed value for people in non-fixed timezones
perhaps including the duration as well as the participants would help
 
Would be nice if we could make a bot to do it
 
Hmm. Yeah. I got those times from scrolling back through the messages, but really, they should be pulled from the transcripts.
 
Anonymous
 
5:30 AM
@Downgoat Yup
 
@Qwerp-Derp GET_DEC is linux.
Though it would throw error if that was problem AFAIK
 
@Downgoat No errors
I'm using SASM if it helps, and GET_DEC is built-in in io.inc
 
oh
try printing what var2 is after oyu read it
IIRC if system fails to parse number, it'll put 0
 
@Downgoat I think it might be a little too difficult to have the bot pick out the topics perfectly. We could perhaps have the bot pick out what it thinks are distinct topics, and then a human signs off on it.
 
Actually we could just use bookmarks and bookmark the conversations like that
It'll store the users and all
Won't work for overlapping conversations however
 
Anonymous
5:34 AM
@ConorO'Brien Actually, 11 bytes: '\n@s`',@s`M
 
@Downgoat Fixed the problem
 
@Mego lol I first thought this was "Actually, [here's a python solution for] 11 bytes: ..."
 
I saw
 
Anonymous
@El'endiaStarman We might be able to use something like the tl;dr bot on reddit
 
Anonymous
@ConorO'Brien It sort of is a Python solution. It's the same thing as the Python solution, but highly compressed using a custom compression scheme called Actually :P
 
5:36 AM
@Downgoat Indeed. And it'd take a lot of work.
 
@Mego wow, 400% compression. that's fantastic!
 
Anonymous
@ConorO'Brien The great thing is, 400% compression is pretty normal for Actually vs Python 3
 
Speaking of Python golfing languages, why all the JS golfing langs die out? :(
 
@Mego huh, that's kinda cool actually.
@Downgoat they didn't? Japt is still used (2 users), Jolf by me sometimes (0.75 + i users; there was this one user who outgolfed me once)
I should go now. It's almost 0100 here. peace
 
Japt is super rarely used though. I've seen like 1 or two solutions in the past forever. Jolf I guess is used occasionally
@ConorO'Brien g'night .o/
 
5:40 AM
@ConorO'Brien Good night!
 
this is rather annoying
so many tiny bugs to fix
aw yiss it works
 
Any glaring issues with meta.codegolf.stackexchange.com/a/11174/60042 ? It has an upvote and a downvote and I don't know what the downvote is for.
 
1
Q: Detect MS Windows

Challenger5No, it's not what you think. A Window is an ASCII-art square with odd side length of at least 3, with a single character border around the edge as well as vertical and horizontal strokes in the middle: ####### # # # # # # ####### # # # # # # ####### An MS Window is a window where the ...

 
@Pavel perhaps the randomness is underspecified?
 
ok, now I have 3 langs for this challenge
0
A: Quine that takes as input the name of a language and outputs the same thing implemented in the input language

Destructible WatermelonTurtlèd, Python 2, and Python 3, 3 languages, only competing for bounty all oneliners follwed by newline Turtlèd @##'@r,r,r-{ +.r_}r{ +.r_}!!-.(3"';m=ord(input()[-1]);_='x=%r;m=ord(input()[-1]);_=%r;print(_.replace(chr(100)+chr(40),chr(100)+chr(40)+chr(114)+chr(97)+chr(119)+chr(95))%%(x,_) if ...

 
5:55 AM
@Pavel maybe also say it only needs to work for oeis as is now, not account for future expansion
 
@xnor what do you mean by underspecified?
 
@Pavel in this sense
 
It does say every sequence should have a chance of being output, but not an equal chance.
Do you know if sequences can be removed from OEIS?
 
missed that line, looks good
i don't know if sequences get deleted
 
Because if they don't, you can just hardcode the last sequence and pick any value lexicographically before it.
The requirement for future expansion necessitates writing code to validate that the random sequence id is actually valid
 
5:59 AM
oh, they are all filled in contiguously?
 
Yep
Starting at A000001 and increasing
 
i see
is there any upper bound people can use if they validate the sequence?
 
Every single existing sequence starts with A. This will only change after the 999999th sequence, which doesn't exist yet.
 
i.e., someone assumes there will be never more than 10^10 sequences
@Pavel you definitely should emphasize that if answers need to handle it
 
Ok, I'll add that the program can assume that Z999999 will be the last sequence, since it can't be known how they'll handle it afterwards.
 
6:02 AM
i see it's in the regex, but it's easy to mmiss
 
Actually, apparently I was wrong about them being filled in in order.
Earlier today I checked oeis.org/search?q=keyword:new&sort=created and found three sequences sorted lexicographically descending, which they aren't now. Must have been a coincidence.
In that case, I actually don't have to support future expansion. On the other hand, I kind of do because generating a random letter is just more code that needs golfing over a random 6-digit integer.
On the other hand, maybe I was right earlier and am wrong now.
Go to any sequence, and try checking the one 1 below it, and the one 1 below that, etc.
 
@Geobits, is this guy your British counterpart?
10
 
Does it look fine now?
 
6:18 AM
Question: What's the smallest integer type I need to cast a long double too to avoid loosing prescision
 
I don't know, but int is only 3 bytes.
Actually, try all of them until it compiles.
If it could lose precision it will throw a compiler error.
 
Anonymous
@Downgoat What do you mean?
 
Anonymous
The size of a long double is entirely dependent on the compiler
 
The size of a double usually depends on the bartender in my experience.
9
 
Anonymous
Since IEEE 754 floats' ulp is > 1 after 2**(digits) (refer to this table for values for digits), you need an integral type whose size is at least digits to store any integer representable by a IEEE 754 float
 
6:30 AM
@El'endiaStarman no comment >_>
 
Anonymous
So for a regular double (53 digits), you need at least 53 bits, so int64_t or uint64_t
 
oh ok thanks
I was doing a long
Maybe long double is too big for default number type?
 
Anonymous
A long double can be the exact same as a double (53), an 80-bit value (for which a 64-bit int should still work), or even up to a quadruple (128 bits, so 113 digits, which needs a 128-bit integer)
 
hm ok.
Oh yes, I see.
 
Anonymous
Using long double will just cause headaches
 
6:35 AM
So should I just use double?
I don't want that to be too slow
but then again I added implicit promotion to bigints
 
Anonymous
double may be slightly slower and somewhat less precise, but at least you know it's going to be the same thing on every standards-compliant platform
 
Double would be slower? Won't all double operations take 1 CPU instruction?
 
Anonymous
Theoretically, yes
 
So with double I can use a int for all integer values?
 
Anonymous
int64_t
 
6:42 AM
for double? ok
 
Anonymous
Please please please use fixed-width integers (or guaranteed-minimum-width integers, like int_least64_t or int_fast64_t)
 
wait what are those O_o
15
Q: int_least64_t vs int_fast64_t vs int64_t

user722528I'm trying to port my code to 64bit. I found that C++ provides 64bit integer types, but I'm still confused about it. First, I found four different 64bit ints: int_least64_t int_fast64_t int64_t intmax_t and their unsigned counterparts. I tested them using sizeof() and they are 8 byte so they...

 
the thing about ouroborus programs (quine loops) is that only one of the programs does any real work
 
Anonymous
int64_t is exactly 64 bits. int_least64_t is at least 64 bits. int_fast64_t is whatever the compiler thinks will be the fastest type that is at least 64 bits.
 
> typedef int64_t int_fast64_t
OK
 
Anonymous
6:47 AM
On 64-bit platforms, they are usually all the same type
 
Anonymous
But it allows for future-proofing
 
Anonymous
Once 128-bit platforms start being used, they may not be the same
 
Anonymous
Look at the 32-bit versions: they're all the same on 32-bit platforms, but int_fast32_t may be 32 or 64 bits on a 64-bit platform, depending on which is faster for the platform
 
Solution: Use softfp.
 
7:07 AM
Anyone know why this isn't working?
Now, I didn't get a lot of sleep last night, and it's getting pretty late, but that seems to be exactly correct.
Yet, it fails.
@KritixiLithos You know Java, right?
 
@Pavel TIO don't have ArrayUtils
 
It does now.
You'll notice that the above code compiles, which it wouldn't if ArrayUtils did not exist.
 
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang3/ArrayUtils
	at g.main(Main.java:1)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.ArrayUtils
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
 
The import statement does work though.
Which means ArrayUtils does exist.
 
I think C++ is crazy but is there any reason this wouldn't work:
self->value = -((int_t) self->value) - 1;
int_t is int64 I think
Is that not big enough?
 
7:12 AM
Basically, I'm trying to determine if this is my fault or if Dennis implemented Apache Commons Lang wrong.
I don't want to ping him and get told that it's because I fucked up.
 
@Pavel I think Dennis implemented incorrectly
 
Ok.
 
It looks fine to me
All int64_t should be able to fit into double right?
 
Anonymous
@HelkaHomba That's specifically talking about the "standard" integral types
 
Anonymous
7:23 AM
Fixed-width types are a different story
 
Anonymous
@Downgoat Yes, but some values above 2**53 won't be representable with a double (since the ulp for a double is greater than 1 for those values)
 
;-; The problem turned out to be with Dennis' implementation, but it was caused by me improperly telling him how it should be implemented.
Can't Dennis just randomly be wrong? At least once? Ever?
 
one time there was unicode issues with the tio 2?
 
Amazon needs to fix something when a kitchen scale is the "Best seller in Recessed Lighting Housings"
 
@Pavel It's because you cannot simply print out the contents of an array using print(array_name)
 
7:29 AM
That's not what I was doing.
 
I'm talking about this: tio.run/nexus/…
 
Oh, well, I've already been corrected there.
Within seconds, in fact.
My java has just been all over the place today.
 
@Pavel Better than your Python
 
I really need to get my shit together in terms of coding.
I couldn't stand having to use global every time, so sushi interpreter uses classes now.
 
I was making a bad joke
 
7:32 AM
Except now I have to use self every time.
Hopefully when it's done and I upload it to be added to TIO, I won't mocked by anyone who actually pythons.
ApacheCommonsLang would be great for golfing in java, except the import statement alone is longer than some existing java submissions.
 
If you're using a function, you can just return an array instead of printing it
 
Some questions ask for a complete program.
ApacheCommonsLang has a lot of other features.
 
This is shorter: tio.run/nexus/…
 
I know.
That was just an example that it works now.
Processing should benefit from it too, if it uses the JVM.
 
just saying, functions are shorter
 
7:41 AM
I need the boilerplate for it to compile anyway.
It's not a submission.
 
7:54 AM
0
Q: Must a question have an answer?

PEMapModderI have designed some mechanisms that makes private properties in a class to be inaccessible from other contexts using whatever methods. I want to know if it is really inaccessible given any code. Can I ask a question here to challenge for accessing the private properties? Or should I ask them on ...

 
8:23 AM
0
Q: Output a random OEIS sequence

PavelYour challenge: Connect to the Online Encyclopedia of Integer Sequences OEIS.org, access any random valid sequence, output it's ID, and ouput all of the members of the sequence provided by the OEIS entry. The only website you're allowed to connect to is OEIS.org. Hints: Sequences are found in UR...

 
8:49 AM
hmmm how program this thing
 
Which thing
 
Would a golfing language be considered esoteric?
 
@Pavel a thing in my koth that applies shooting damage.
hmmmm, this might be annoying
 
@TrojanByAccident Depends on the context
 
@Pavel Explain.
 

« first day (2171 days earlier)      last day (2655 days later) »