9:01 PM
@Pavel why
What's the reason for the block

dk0 is social media and inexpensivecomputers is adult content. It's... weird.

It's a freaking computer store. WTF Filter.

WTF indeed.

I'm pretty sure it makes sense for a school to err on the side of too strict

My C code is segfaulting randomly. It uses windows.h calls.
Does anyone here know enough C to help?

9:05 PM
In other news "expertsexchange.com" used to be blocked at my school due to "transgender"

@Pavel Try HTTPS.

I know that is the worst reason to block things but I can't figure out why it triggers that

@wizzwizz4 Can't connect.

@wat experts exchange --> expert sex change?

@wizzwizz4 explain "randomly"

9:07 PM
@betseg Every time I try to run it.
I don't understand what the problem is.

Do you know what line is causing it?

@DJMcMayhem Yeah.

If it's segfaulting, you're probably dereferencing bad memory

I've got the relevant co -.
@DJMcMayhem I am.
But it shouldn't be bad memory.
It should be good memory, because I asked a Windows API for it.

What's the API call?

9:09 PM
(Actually, I just passed it by reference to a Windows API call).
@DJMcMayhem PeekNamedPipe.
Should I post the relevant code here?
It's just an excerpt.

A couple lines are fine

@DJMcMayhem oic

How useful are Core Dumps when debugging?

@AdmBorkBork Every part of your A program potentially reveals something about your B program. If they're very similar (i.e., if the edit distance is small), it's easier to figure out what B might be. With a larger A, the edit distance increases and less about B is known.

LPDWORD availbytes = 0;
PeekNamedPipe(pipein, NULL, 0, NULL, availbytes, NULL);
if (*availbytes) { // <----------- SEGFAULT?
char byte;
printf("%c", byte);
}
@Pavel Very.

9:10 PM
I've never actually seen one before. I've only caused a segfault on TIO, and I didn't get a dump.

that ... formatting ...
How did that happen?

@AdmBorkBork I don't want to go into specifics since I already posted a cop (unaffected by this, A is so well golfed I actually edited another answer of mine to reuse part of the code).

wizzwizz secretly uses 1-space-width tabs

@AdmBorkBork Why would I do that?
I definitely do not use 8-space-width spaces.
@DJMcMayhem Posted.

9:15 PM
6

^ Python programmer learns C++.

@Pavel That's definitely not C++

Isn't it?

@Dennis Sure, I can kinda see what you're saying, but I think I'm not seeing it as big of an issue as you are. It seems like having a balancing act between making your code obfuscated (and thus harder to crack) or shorter (and thus a lower score if uncracked).

I have now been confused by one of the cop posts. They didn't show what environment they were using their javascript in. And using two different environments (repl.it and TIO) I managed to get two different cracks which don't work in the other environment...

9:16 PM
You can onebox any image.

That's Java

That's most definitely java

9 mins ago, by DJMcMayhem
If it's segfaulting, you're probably dereferencing bad memory
Eh?

If you ever find someone using this brace style, they're entitled to their opinion, but please take their tab key from them

... or their house key

9:18 PM
@betseg Looking up the memory value at an address that you're not allowed to access.

@wizzwizz4 That if couldn't possibly cause a segfault. It's more likely ReadFile

@DJMcMayhem It is.
My compiler says it's there, and the ASM looks like a read.

@wizzwizz4 umm, I eh'd to say "well a deref causes the segfault"

@betseg Oh. I thought you were one of those newfangled programmers who can get around day-to-day activities without knowing what stdlib.h means.

It's a C standard library header file. I know that much.
I think it defines malloc?

9:22 PM
Read it, and don't come back until you have. :-)
Oh, wait. It's not finished yet. You won't learn that from it. :-/

I was wondering...
(and yes, I did use C until I abandoned it in favor of high-level languages)

@wizzwizz4 I meant segfault, and it's too late to edit now ;_;
Ducking autocorrect

I feel you

Are C/C++ and Assembly the only languages that let you segfault?

@JanDvorak No.

9:25 PM
Lua is my first language, but it's keywords make me berry sad

Any language lets you segfault if you break it hard enough.

In C you don't even have to try

@JanDvorak printf(*NULL);
The compiler will get cross though.

(Not some brainfuck derivatives)
It's probably possible in lua, but you'd have to make it really cross

@DJMcMayhem I found the problem.
I was setting it to a NULL pointer.
I don't know why.

9:27 PM
That would do it

That'll do it

LPDWORD availbytes = 0; means "set to NULL" and not "set value at address to 0"? :-/

@Dennis sorry wasn't trying to come across as complaining. Just didn't know what was going on

@wizzwizz4 Oh yeah. You want *LPDWORD availbytes = 0;

I tried C on codewars. I was pretty delighted to learn about asprintf.

9:28 PM
Wait

@DJMcMayhem LPDWORD is already a pointer.

7 imaginary internet points for whoever segfaults Lua

@ATaco Is there a question that we can answer?

@wizzwizz4 is it a typedef?

@DJMcMayhem No clue.

9:29 PM
The segfault question would work

@DJMcMayhem unsigned long int *.

So then you want LPDWORD availbytes; *availbytes = 0;

You can use pointers to pointers to make jagged arrays

34

Write the shortest code that returns Segmentation Fault (SIGSEGV) in any programming language.

Wait no. Stop listening to me

9:29 PM
@DJMcMayhem No, because it's NULL by default.

And you want it to point to a zero?

Yep, segfaults in C are pretty much the default :P — Paul Draper May 24 '14 at 23:23

I'll put up a bounty for 100 rep when I get to a computer
I'd like to see lua break

unsigned long int availbytes = 0;
PeekNamedPipe(pipein, NULL, 0, NULL, &availbytes, NULL);
@wizzwizz4 ^

@DJMcMayhem That's the smartest thing I've read all week.

9:32 PM
Microsoft site says typedef LPDWORD *DWORD;

@DJMcMayhem You were right the number of answers within distance 2 of () is 15

Oh good

So DWORD availbytes = 0; ^^^

There are also 26568 strings within distance of my cops answer that are balanced strings

Does that mean you have a working solution?

9:34 PM
@betseg Thanks. :-)
Now my code's Microsoft compliant.

Also, that's pretty brute-forceable

@DJMcMayhem I do
It takes like a minute to run though because it is very inneficient

Good night!

Bounty deployed

'night

9:42 PM
@ChristopherPeart Nothing wrong with complaining as long as you complain to me. ;)

Heh
Love jelly tho
So clear and concise

No one truly knows Jelly. There are just varying levels of pretending. - 5h ago by DJMcMayhem
According to the sidebar anyway

I was there
I was the one who prompted it

Ok

I asked if anyone knew jelly
5

Your task will be to take a balanced-string and a integer representing a Levenshtein distance (the number of characters that have to be inserted, deleted or changed to make one string into another) and you must find the number of balanced strings with that distance from the original string (i.e. ...

Can I get help understanding this @WheatWizard

9:45 PM
Do you understand levenshtein distance?

@ChristopherPeart Sure! what is confusiong you.

I have a jelly bean, though.

So I get the one string into another
but what string do we compare to?

Oh wait
nvm
re read question now I understand
What I learned today kids is you should always make sure you read the question right!

9:47 PM
I understand the question - but I have no idea how to achieve the goal with any guise of efficiency

@JanDvorak Story of my life

And the reason why I haven't tried to answer a challenge here yet...

I have an easy one
actually 2
one sec gonna pull em up
7

The Problem You must write a program that, when the Konami Code is typed in during runtime, prints the string "+30 lives" and sounds a noise of your choice from the computer's speaker. Definition The "Konami Code" is defined as UUDDLRLRBA followed by pressing the enter key. The Rules You ma...

13

Goal: Given two natural numbers (integers from 0 to infinity), output a number that is not the sum of those numbers, but is a natural number. Example solutions (TI-Basic): A+B+1 not(A+B) Invalid solutions: A+B-1 (for inputs 0,0, it returns -1, which cannot be a sum of natural numbers) "AB...

35

Write the shortest code that returns Segmentation Fault (SIGSEGV) in any programming language.

@NewlyFeaturedQuestions Is that a new chatbot?

9:50 PM
Thanks @ChristopherPeart, I'll try those out

@NewlyFeaturedQuestions help
Hmm
I guess no commands for it (expected)

@Pavel It's been around for a while, but has only been fixed and started working correctly within the past couple of months.

That's another thing that the RO's can control

9:55 PM
0

Background Suppose that there are 2*n people to be married, and suppose further that each person is attracted to exactly n other people under the constraints that: Attraction is symmetric; i.e. if person A is attracted to person B, then person B is attracted to person A. Attraction is antitran...

10:05 PM
"Wow this is easy!" Said no Jelly coder ever
Wait
WHAT DID YOU SAY?

$x$ I'm trying to make a Chatjax Script.

It's not working.

I was starting to twitch
Removed comments before I see them really

Auto-Chatjax is now working.

10:14 PM
@ATaco If you're experimenting with things/testing out a script, it would probably be best to keep in the sandbox

I have nothing more I need to test.

OK, that's fine then.

Is this comment correct, regarding byte count in Desmos?
I think it's 20 bytes, since you're typing: (x^2+y^2-1)^3=x^2y^3...? Relevant meta post. — Stewie Griffin 2 mins ago

My personal method is just copy it and count those bytes.

Attraction is symmetric Ha! — Luis Mendo 5 mins ago

10:16 PM
\sqrt{\frac{1}{3}^2}

What does it do?
Brainstorm time

Runs the Chatjax script automatically.

Ideas for the name for my Language
Chatjax?

What's the language?
LaTeX in chat.

@ATaco a new golf language i plan on making

10:28 PM

Using the code page from jelly
Just the 257 unicode characters

@ChristopherPeart I'm still going for fluff

Do you have a design concept other than a codepage..?

10:47 PM
@ATaco What's Chatjax?

Let's you write Fancy math equations in chat
It's used over on Math.SE basically always.

Convenient.
Wait, I get it. It's Mathjax in chat.

(I probably should have opened with that)

Ataco i am writing one up

No individual defining concept?
I'm curious, I love language design.
(Backslashes aren't needed)
$x$

10:58 PM
$what is htis$

But I think my script is broken.
It's not automatically updated.

What's the point of removing a message that takes one line?

TO THE SANDBOX!

$(x-h)^{2} + (y-k)^{2} = r^{2}$

???
@DJMcMayhem canyou clean dis up

10:59 PM
@ATaco does that work

(Not yet)
The script is bork.

@ATaco Tacit stack based language. <-- subject to change

@ChristopherPeart uhhhhh maybe. It's hard to move messages from mobile

Unborked.

@ChristopherPeart Tacit stack based language. Not tacit based stack language.

11:02 PM
Isn't Tacit based and Stack based mutually exclusive?

That is also correct to an extent.

Hehe
The results of the Tacit programming will be auto pushed to stack

Can't a stack language be tacit if you only do things to the stack and don't define variables?

Yeah, I can only move one messages at a time from mobile. :/

Give me a minute to write what i mean

11:04 PM
Tacit programming, also called point-free style, is a programming paradigm in which function definitions do not identify the arguments (or "points") on which they operate. Instead the definitions merely compose other functions, among which are combinators that manipulate the arguments. Tacit programming is of theoretical interest, because the strict use of composition results in programs that are well adapted for equational reasoning. It is also the natural style of certain programming languages, including APL and its derivatives, and concatenative languages such as Forth. Despite this base, the...

It won't be full stack
wait

You can do things to a stack, but that generally doesn't help it be golfy.

05AB1E is stack based.

11:04 PM
@Mego Could probably move them for you

@ATaco pastebin is horrible.

So I want to have it be tacit but with stack support
that way more options are availible

Will eventually add support for basic code logic
If/else all that

Thank you. Pastebin is laggy, full of ads, and when I try to copy anything it grabs the line numbers.

11:06 PM
@Pavel Hit the raw button

I shouldn't need to do that. Hastebin is easier for the person receiving the code and the person sending it.
And I'm not sure about Hastebin, but I know that pastebin uses cr lf line endings.

Welp
My sister pouted about me not doing a chore for her that she did for me today
We agreed that i would do it thursday
Now I don't have to do it cuz she pouted and this is awkward
Screw it going to go be nice and do it... and parent told me not to

@Pavel Gist > anything else. One can comment, fork and clone a snippet, there are no ads, and GitHub has an exponentially safer infrastructure than any anonymous *bin service.

@mınxomaτ Right, if you're already signed into GitHub, use gist. Forgot about that.

11:18 PM
CMC: Given an input i, output the lowest value n>1 for which there is a solution to x^n=i, given x, n, and i are integers.

does .append add to an array in python? I think it does just want to make sure

Yes, and they're called lists in Python.

ok thanks

Note that appending a list to a list won't create a nested list, it will append each element of the second list in turn.

@Pavel even if you're not
you can make anonymous gists

11:21 PM
Ok

@Maltysen TIL

@Pavel that's incorrect
.extend() does what you said
.append() does create a nested list

It's correct in at least one of Python 2/3

A Gist is probably a better idea.

11:24 PM
@Pavel nope python2 python3

But why did it break my code all those times..?

Right, probably.

11:45 PM
I made a Lua script that takes perfectly good Java and turns it into this:
As such, I have a new Code-golf challenge to write.

"Perfectly good Java"
4

That's an oxymoron

Other than the monster that is the righthand side of this code, it actually looks clean.

I'd consider trying it on my Ruby code but it wouldn't do anything

11:55 PM
It might work with C++ as well.
And obviously it works with C#.

@ATaco thanks

@ATaco you wrote RProgN
right?

Correct.

How did you deal with output. IE a program that has strings and ints

Well, there's either the p function for explicit output.
Which just uses a tostring

11:57 PM
ok
well i will go eat dinner then continue the work on my languge
Still need a name
The best ideas are !Jelly and Fluff