« first day (1999 days earlier)      last day (2836 days later) » 

12:00 AM
Your system needs to know every encoding because it cares about what the chars represent and not what they are
And multi-byte chars will get parsed. They'll be parsed into one code point
 
@Downgoat There's no such thing as a "perfect string." Unless you're okay with that's displaying as that’s.
 
@quartata buffers are solution. cheddar has simple support for custom encoding
 
@Downgoat Buffers are bad solution
 
Encoding { /* encode code */, /* decode code */ }
@quartata why?
you can treat them like normal srtings
 
Anytime I want to take an arbitrary binary string from STDIN and see if one byte in it equals a character I have to encode it in something
Usually CP437
 
12:02 AM
IO.stdin.read(1)[0] == 0xwhatever
 
@Downgoat The only time Pytek will ever need to implement a new encoding is if the Unicode standard is completely abandoned and replaced with a completely different variable-width standard
 
@Downgoat Until you make a web service and Иван can't sign up.
 
@Doorknob why will he not be able to sign up?
 
exactly cheddar has sane unicode support
 
12:04 AM
@Downgoat Bytes are not characters. You can't treat an array of bytes like a "normal string" (whatever that is).
 
you don't need to do foo.match(/<suprt long regex>/)
@Doorknob exactly.
you want to be able to treat input like an array of characters
 
Yes. And it's that easy
end of story
@Downgoat \input[FIXED_8]()[0] == "a"
 
Surrogate pairs will take a little extra work but not a lot
 
hi again guys
 
12:09 AM
> if you are a programmer and you don't know the basics of characters, character sets, encodings, and Unicode, and I catch you, I'm going to punish you by making you peel onions for 6 months in a submarine.
 
@Quill hahahahahaha
Can goats peel onions?
I don't think they can do that with hooves
 
@quartata ...
> a little
 
For me at least
 
@Doorknob i know what an encoding is tyvm
 
The programmer won't notice a difference
Lemme clarify a little bit:
 
12:11 AM
@quartata i don't see what's wrong with (lemme draw an picture)
 
A character is a visual symbol with no association with bytes/encoding
A code point is the index of that character in an encoding
A byte is a (usually more complicated) representation of that code point
 
@quartata No a character is a person in a play, novel or film
A code point is what noobs call SO rep
 
hehe
 
and bytes are for sandwiches
 
Anyways, Pytek's strings will be lists of code points, not characters or bytes
If you want just to take your binary data, you use FIXED_8 or FIXED_32 or whatever. If you're working with something Unicode related you use VARIABLE_UTF_8 or VARIABLE_UTF_16
 
12:14 AM
@quartata I think downgoat gets the idea.... he did write a blog post on it.... blog.vihan.org/index.php/2016/05/31/…
 
> Now, with the \u{...} syntax, you can simply enter the unicode code-point of the character without having to figure out the surrogates
 
user image
2
 
cONGRATULATIONS you just described the basic IO diagram
 
Because WHAT IF THERE IS NO ENCODING
yeesh
Do I have to use CP437 to read arbitrary binary data? Why can't I just use \input[FIXED_8]()?
 
@quartata well it becomes a buffer
 
12:17 AM
@Downgoat Suppose I have a library
 
ok
 
You know, in all this talk of code points, I'm yet to hear an actual point.
 
@Quill thanks for the link. I got 4 views :D that's my weekly-high!
@Quill ....
i don't know if you're serious or you just wanted to make the pun
 
\o/ V is shorter than retina! \o/
 
maybe it's time for me to stop shitposting and get some work done
 
12:18 AM
@DrGreenEggsandIronMan \o/
 
That searches for the first instance of the ASCII letter a in an arbitrary string
 
@quartata ok?
 
Trivial example but you get the idea
I'd have to write two methods
 
Oh yeah, reminds me of one of my few SO questions:
0
Q: Encoding of Console.Read

LegionMammal978I am currently developing an application that takes input from the console but also supports input redirection. For this, I usually use Console.Read to receive a single character. However, I cannot find any resource that states what encoding it uses (ASCII? UTF-16? UTF-8? <random codepage>?), and...

 
@quartata mybuffer.find(0x61)
 
12:19 AM
Why, when the ASCII letter a is just the number 97?
@Downgoat And for one of your "strings"?
I could cram it into one function but it would be ugly
 
@quartata mybuffer.to(<encoding>).find("a")
I'll probably have a "binay" encoding which just puts bytes straight into a string
without any fancy encoding
 
Oh, and one of my more derpy questions:
 
You can't, not with how your system is designed
 
3
Q: fscanf not scanning any numbers

LegionMammal978I am currently developing a simple C application. It takes a single file as a command line argument, which is formatted like: 1,2,3 4,5,6 7,8,9 etc. However, for whatever reason, fscanf never scans the numbers! Here is an example: #include <stdio.h> int main(int argc, char **argv) { FILE...

 
Strings don't have bytes, just characters.
 
12:21 AM
@quartata how what why
 
That's the point of having strings consist of code points instead
 
@quartata well internally they do have bytes
for operations such as .chars Cheddar needs to know what encoding to use
if you want the bytes I'll probably just have a .bytes
 
No it doesn't. All it needs to know is if it's fixed or variable width
That's the point
The code point ba dum tish
 
@quartata okay so how does it do that?
 
@Downgoat You tell it
23 mins ago, by quartata
5 mins ago, by quartata
FIXED_8, FIXED_16, FIXED_32, VARIABLE_UTF_8, VARIABLE_UTF_16
These are the only "encoding" constants Pytek will have
 
12:24 AM
no love for UTF_32? ;_;
@quartata ok, good idea
 
UTF-32 is FIXED_32
 
wait that's what im already doing
._.
@quartata oh yeah >_>
 
If everyone just used UTF-32 our world would be so much better
but sadly that's not to be
 
3
Q: We need a funny 404 image

Agent CrazyPythonStack overflow's custom 404 image is a polyglot that prints "404". Our 404 image is just 404 in a blue color. Some theme-graduated sites have a gray 404. Stack overflow users requested a custom 404 image, like Physics.se or InfoSec.se. Some sites like crypto.se have their own custom image. We sho...

 
@NewMetaPosts dammit normal changed their username again
keep doing double takes
 
12:26 AM
0
A: We need a funny 404 image

dorukayhanWe can put something related to the memes of PPCG on the 404 page! Here are some suggestions: A 404-character long Java program that writes 404 to STDOUT or a file A 404-character long paragraph that prints 404 to STDOUT when interpreted as a Foo program This text: Undo Font This text: 4ಠ4 A c...

 
@quartata for programmers yes, but I'm not sure I want every character encoded in 4 bytes.
 
the maths tags look really weird through Porkchat
 
12:34 AM
question: I want there to be shorthand for foo.map((i)->i.bar) I was thinking foo.map(@.bar), good idea?
 
how many heavily downvoted posts do i have to make in order to get an answer ban on ppcg meta?
 
@Downgoat Do you have a Symbol type (or similar)?
 
@Quill They look weird here too
@Doorknob He will
<symbol> I think
 
I'd be better at golfing if i had a clue about lambdas
but i don't
 
@Doorknob we were recently talking about their design in the Cheddar room. It's probably gonna be <name>
 
12:35 AM
;-;
 
@Downgoat Then use that
 
foo.map(<bar>)?
hm. ruby uses &:foo
 
:foo is the Symbol, and & is sugar for to_proc
 
question: are ruby symbols just like Js symbols?
 
12:44 AM
@SuperJedi224 Hey, never knew that you were into googology ;)
 
@SuperJedi224 hi
 
@Downgoat I don't know what JS symbols are. Ruby symbols are like a convenient way to refer to constant strings (i.e. :foo will always be the same as :foo, while just because two strings are "foo" doesn't mean they're the same object).
 
JS symbols essentially are unique objects. Two symbols will never equal eachother. their "Name" or description has no semantic value
 
@Quill \o/ \o/ \o/ \o/ I'm at 13 views!
 
12:50 AM
Anybody want a new keyboard? qwerkywriter.com
 
@Quill 0/10 looks very difficult to use with hooves
> $349.00 USD
 
@Quill This page is taking forever to load
 
page.load().then(() => console.log('never mind....'))
 
@Downgoat define symbol?
 
1:03 AM
14 mins ago, by Quill
@Doorknob http://blog.vihan.org/index.php/2016/05/17/es6s-unique-symbols/
like Ruby's symbol
18 mins ago, by Doorknob
@Downgoat I don't know what JS symbols are. Ruby symbols are like a convenient way to refer to constant strings (i.e. :foo will always be the same as :foo, while just because two strings are "foo" doesn't mean they're the same object).
 
Jeez, I always knew adfly was cancerous and full of obnoxious ads but now all adfly links I've tried just flat out doesn't work. (Trying to skip the adblocker notice thing either makes me click on one of the million ads buried beneath it or doesn't do anything)
I can't wait for the day when all modders use Curse instead
 
Anonymous
@quartata Isn't curse literally Satan for their obnoxious/shady ads on gamepedia?
 
@Mego Does Curse own gamepedia? Didn't know
Anyways the ads on the Curse minecraft mod hosting thingy (which is what I was referring to) are very minimal
 
Anonymous
Yeah, there was a big hubbub recently on the POE subreddit because the official wiki (on gamepedia, owned by Curse) was showing malicious ads that covered up a huge part of the screen. It took several escalations to actually get them taken care of.
 
Anonymous
So my solution was to write a userscript that removed the ads entirely and fixed several other formatting problems :P
 
1:15 AM
might as well while you're editing the page :P
 
Anonymous
The siderail (where the ads were placed) was causing content to get squished, to the point that it was unreadable on mobile.
 
Anonymous
And the ads overflowing the siderail and covering up the already-squished content just made it worse
 
I just stopped visiting gamepedia because of the massive page load time
 
Anonymous
With adblock and ghostery it's much more bearable
 
1:21 AM
@uoɥʇʎPʎzɐɹC But that doesn't fit the "404 not found" idea.
 
1:37 AM
so I started writing another tokenizer
 
@uoɥʇʎPʎzɐɹC wtf is/was wrong with you.
@Quill for what?
 
I was going to write a SQL dialect that would fit over mongodb, as a troll, but ehhh, I'm just slacking off
 
@Downgoat This is what Pytek does (cc @quartata):
elendiastarman:~/workspace/src (master) $ cat namedArgs.pytek
func:foo(a,b,c){
    \corePrint("a" a)
    \corePrint("b" b)
    \corePrint("c" c)
}

\foo(c=2 a=1 4)
elendiastarman:~/workspace/src (master) $ python3 pytek_main.py namedArgs.pytek
a 1
b 4
c 2
 
Oh, I thought we were doing it like Python
where kwargs are separate
 
I decided to make it more flexible.
 
1:45 AM
Oh OK.
 
There was actually a bug that was revealed in the course of doing this, in fact, which I fixed. So, thank you @Downgoat for that. :P
 
at last
 
?
@CᴏɴᴏʀO'Bʀɪᴇɴ what he do this time
 
i finally made a 404-byte long program that prints 404
 
1:49 AM
@EᴀsᴛᴇʀʟʏIʀᴋ just read the transcript :P
 
lel
@dorukayhan lang?
I can do that in python rn.
 
@dorukayhan prog?
 
class PPCG {
    public static void main(String[] args) {
        int i = (4 >>> 2) << (3*3);
        int j = ((51 + 50) << 2);
        java.io.PrintStream p = null;
        try {
            p = System.out.append(String.valueOf(i ^ j));
        } catch (java.io.IOException e) {
            e.printStackTrace();
        } finally {
            if (p != null)
                p.close();
        }
    }
}
 
oh please
sighs golf
 
@dorukayhan Python 2, 404 bytes:
print'404'##########################################################################################################################################################################################################################################################################################################################################################################################################
 
1:51 AM
BBL obfuscating 404
 
@dorukayhan beware the wrath @CᴏɴᴏʀO'Bʀɪᴇɴ when he obfuscates/antigolfs.
._.
@CᴏɴᴏʀO'Bʀɪᴇɴ only do it halfway, kk?
 
do what halfway?
 
@Downgoat Seems like your @ will have a function like that of my _.
(Which I still haven't implemented, incidentally.)
 
2:04 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ obfuscating
 
@EᴀsᴛᴇʀʟʏIʀᴋ I am unclear as to how to do that
 
Hey the tokenizer turned out pretty well :) pls can has thoughts @Downgoat @Cᴏɴᴏʀ
 
It's only basic (because there isn't a variable or type system in yet), but still
@CᴏɴᴏʀO'Bʀɪᴇɴ <_< just a basic tokenizer, in the future it'll probably be for a SQL dialect like SELECT DeepLink from Directories WHERE UpdatedDate >= 131341419
 
2:16 AM
did anyone downvote this just to get it closer to the score of -404?
 
The Java idea is pretty good, but every other idea is terrible.
 
C#, 404 bytes:
  namespace \u0053\U00000079\u0073\U00000074\u0065\U0000006d
{ using \U0001F612=\u0043\U00000068\u0061\U00000072
; using \U0001f615=\u0052\U00000061\u006E\U00000064\u006f\U0000006D
; class \U0001f622
{ static void Main()
{ \U0001F615 \U0001f61C=new \U0001f615(0x334BdE)
; Console.WriteLine(""+(\U0001f612)\U0001F61c.Next(0xFf)+(\U0001F612)\U0001f61C.Next(0x0eE)+(\U0001f612)\U0001F61c.Next(0xDd))
;
}
}
}
(Actually outputs 404)
 
Why am I not surprised that you're all trying out ways to output ways to output "404" in 404 bytes?
 
still working on mine
I'm planning on packing mine with actual info
 
2:31 AM
@El'endiaStarman :3 np. mind sharing the source for how they named and arguments are matched together?
 
I'm just going to make an image that displays 404 in a funny way. Beat all of you...
 
console.log("404 Not Found");"                                                                                                                                                                                                                                                                                                                                                                                    ";
JS, 404 bytes
 
@Quill lgtm, but idk what it does or how it works >_>
 
Hey! The "Abandon all work, ye who enter here" is gone!
Does this mean I'll be able to leave freely?
 
console.log("404 Not Found");//aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
2:32 AM
Yes, that happened months ago.
 
Un-\u-ified (215 bytes UTF-8):
  namespace System
{ using 😒=Char
; using 😕=Random
; class 😢
{ static void Main()
{ 😕 😜=new 😕(3361758)
; Console.WriteLine(""+(😒)😜.Next(255)+(😒)😜.Next(238)+(😒)😜.Next(221))
;
}
}
}
2
 
@LegionMammal978 oh my god that's beautiful
 
Me wish to see output
 
@Zizouz212 404
 
That's it?
 
2:35 AM
Yup
 
That's not fun at all -_-
 
Hey, generating random seeds is hard
 
@LegionMammal978 question: what chars are valid vars in c# (i think thats what your using)
pls
 
@Downgoat You'd have to look at the earlier version for a working program, lemme check the specs
 
at 304 bytes
not good enough :/
 
2:44 AM
@Quill @CᴏɴᴏʀO'Bʀɪᴇɴ do you know if quicksort/heapsort is faster than js's native .sort()
 
@Downgoat nope
 
idk perf it or something
 
jsperf is downt tho
 
do your own perf tests. screw the man
 
@Quill ( ͡° ͜ʖ ͡°)
 
2:52 AM
@LuisMendo esta
 
@El'endiaStarman Because they are given a one tick pulse
 
@Downgoat Here, valid start characters and valid subsequent characters (warning: very slow); the compiler doesn't seem to follow the spec so closely on this.
 
yay i made another 404-byte long program that prints 404
> It was a good day, me stepping through challenges in Codegolf.SE, outgolfing everyone (except for Dennis) who dared to stay on my way with Pyth. Then, I stumbled upon a challenge where the goal is to write a function that recites pi backwards. Meh, is that even possible? But the challenge had a whopping 43 answers... I got to take a look at it. I clicked it, and all I got was the page that says "404"!
it works in foo
 
@LegionMammal978 bai
@LegionMammal978 question: what is a legion mammal
 
3:03 AM
Done!
E=(g,a,p)=>(n)=>(a=g(),p=(n)=>(n?p(n-1,a.next()):a.next().value),p(n));F=(n,a)=>{a=[];for(let i=1;i<=Math.sqrt(n);i++){if(n%i==0){a.push(i)}}return a.map(e=>[e,n/e])};P=(n)=>/^(?!(..+)\1+$)../.test(([[],[]]+[]).repeat(n));c=E(function*(){let c=9;while(true){if(F(c).some(e=>{f=(a,b,c)=>(c=Math.sqrt(b),(c==(c|0))&&P(a)&&P(c)&&c!==a);return f(e[0],e[1])||f(e[1],e[0])}))yield c;c++;}});console.log(c(48))
404 bytes, prints 404
 
@CᴏɴᴏʀO'Bʀɪᴇɴ wat
how dragon obfuscate so obfuscately
 
I tell ya, it's my hobby thirdto code golf and esolang making
 
how can your hobby be second to two things wat
 
^
 
is your fourth hobby defying mathematics
 
3:06 AM
no, that's my 2+ i th hobby
with a second to spare
 
stahp with the maths its hurting my goat brain
TypeError: Expecting a function in instanceof check, but got #<CheddarVariable>
@Quill do yuo know what that error means
 
did you read the error
also you shouldn't swallow stack traces
3
 
yeah but what does #<CheddarVariable> mean
it is a class
 
I use long john for error messages github.com/mattinsler/longjohn
 
class = function
@Quill 10/10 name
 
3:10 AM
It's fairly lengthy, so I'll just describe it. First, the guiding principle: assignments in the arguments should be executed first, then the remaining arguments should be assigned to parameters not already assigned to, preserving order.

I have two indices for the arguments and parameters. I loop through the arguments first. If an argument is a kwarg, like `c = 2`, then the assignment is executed and the argument name (`c`) is added to a list of variables already assigned to. If an argument is not an assignment, then I loop through the parameters until I find the first parameter whose name
@HelkaHomba Huh, interesting. Is that new(ish)?
 
22
A: What does this instanceof error message mean?

user113716Objects are instances of a constructor function, so the test is to see if the left hand is an instance of the right, so the right must be a function (and it must be the constructor that constructed the object to return true). [1,2,3] instanceof [].constructor; // true So to answer the quest...

 
@Quill it is a clas not an instance
 
@El'endiaStarman No, afaik. Been around since early 1.8 at least I believe
 
Counts up forever!
init main
set i number 0
label loop
push main print get i
set i exec main -- func inc
goto loop
presenting my new lang, eacal
 
3:19 AM
@Downgoat Hey, could you do me a favor? If you open neovim and insert <M-q> (alt+q) what character shows up?
 
@mbomb007 We could change it to "A man takes a byte, the byte takes a byte, the byte takes a man."
(Hopefully someone, possibly Irish, gets that :3)
 
@DrGreenEggsandIronMan <M-q>?
 
Yeah, M == meta == alt.
 
@HelkaHomba I get it :3
 
3:37 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ Then you'll appreciate 🍺
Hmm, why is the "please" part only in spanish - washingtonpost.com/national/…
 
@HelkaHomba Are non-ppcg users allowed on the minecraft server? I'd like to invite a rl friend of mine.
 
@DrGreenEggsandIronMan it inserts like a "oe" character
 
They need a SE account with 20 rep so they can ping me personally in the chatroom
 
@HelkaHomba not until I acn drink >_>
*can
 
@Downgoat drat. That sucks. I was hoping it would insert a ñ.
 
3:45 AM
Now I must leave. bai
 
@HelkaHomba if it's urgent, I can give users write access to chatrooms for you
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Your words are already slurring..
 
@HelkaHomba he has an SE account and he pinged you a couple days ago.
 
shh they can't know I am under the influence
 
@CᴏɴᴏʀO'Bʀɪᴇɴ @Quill @MᴀʀsUʟᴛᴏʀ I get a discount the more Cheddar shirts I order, so do any of you want a Cheddar shirt? I can purchase them but you'd have to be OK with giving me your address so I can ship them >_>
 
3:46 AM
@Quill No. The point is that they need to show a little internetability and have a 20+ rep SE account
 
@HelkaHomba okay, no worries. just offering :)
@Downgoat sure, when you do so, PM us over Slack about it
 
@DrGreenEggsandIronMan Oh, sorry! I somehow missed that :I
 
Haha, no worries. I didn't want to pester so I figured I'd wait a little bit before asking.
How many users are on the server now?
 
@Downgoat Same as Quill
 

« first day (1999 days earlier)      last day (2836 days later) »