« first day (2421 days earlier)      last day (2507 days later) » 

10:00 PM
Just so that I can have someone to chat about page sizes
 
@BalarkaSen serialization is the key to writing programs that can talk to other programs. I'm interested for a variety of reasons.
 
I think the main difference between types and sets is that if $A, B$ are sets, a "function" $f : A \to B$ between them is a different sort of object than "set". But if $A, B$ are types, a "function type" $f: A \to B$ is also a type.
@DanielSank Ah, interesting. What does it do?
(Sorry, might be a naive question)
 
@BalarkaSen Woah wait a second.
Given a set $A$ and another set $B$, a function $f: A \rightarrow B$ is a type.
Oh I see what you mean.
 
Right, yup. The types formalism captures all of it, putting sets and functions on an equal footing.
(along with a lot of other things)
 
@BalarkaSen Like I said, it's the idea of writing code that can receive bytes and turn them into a typed object with static type safety.
 
10:03 PM
@0celouvskyopoulo7 You talked about powder and stuff...I thought of something like this youtu.be/6vYnas6q3Sg
 
Here, let me give a dumb example.
Suppose we're a server and we receive bytes over a TCP socket.
The bytes come according to a particular protocol. If the first byte is 0x01, the next four bytes are an integer, but if the first byte is 0x02, then the next four bytes are a float.
 
In either case, our job is to return the square of the number.
 
@Mostafa Oh dear god
 
So you do something like this (pseudocode)
 
10:06 PM
I can't believe they can make such a song (and video)
 
bytes receive_bytes_and_dispatch(bytes):
    if bytes[0] == 0x01:
        result square_int(int(bytes[1:]))
    elif bytes[0] == 0x02:
        result squre_float(float(bytes[1:])
    return convert_to_bytes(result)
 
Right.
 
This function expects a byte array, and returns a byte array.
However, internally, it calls functions which have more specific static types.
 
Yup, I can understand that.
Hm, what do you mean?
 
Well, you'd have:
int square_int(int x):
    return x*x
float square_float(float x):
    return x * x
 
10:08 PM
Oh, I see. So you go bytes --> types --> bytes
 
Right so here's the big deal: you write square_int and square_float without worrying about any of this.
You just think about normal strongly typed code. No problem.
The receive_bytes_and_dispatch function handles the type casting of the incoming bytes to int or float as appropriate.
 
Got it. This is a cool way of thinking about it.
I like it.
 
@DanielSank You need magic bits though, right?
 
@Mostafa @SevenSidedDie is this allowed?
 
@BernardoMeurer wat?
 
10:11 PM
@0celouvskyopoulo7 That is allowed for everyone on YouTube (no age restriction)
 
@BalarkaSen This is how rpc systems often work.
 
@Mostafa I am not asking you
I am asking @SevenSidedDie
 
@DanielSank When you send the bitstream it must have a header with some type annotation, usually this comes as magic numbers/magic bits. Is this correct?
 
I would like a definitive answer
 
You write a file specifying what remote calls you want to be available over the network. Then you get code generation to make you the dispatch function.
 
10:11 PM
Otherwise how does the client figure out what type it's receiving
 
Your job is then just to write the implementations of the target functions, which have nice static strong types.
@BernardoMeurer Yeah, read my messages. We're pretending we have a dumb-ass protocol where the first byte tells you the type.
 
JS doesn't even have integers
@DanielSank Ah, alright
I KNOW CS
 
@DanielSank Remote calls being, getting the appropriate types on?
 
Right so normally you use some standard thing like protocol buffers or JSON rpc.
@BalarkaSen No no. I mean suppose I want to run a calculator server.
I have a few remote procedures like "square this number" or "add these numbers".
 
Mhm
 
10:14 PM
Uh, that's all.
I thought you were confused about what remote procedure meant.
 
Well, those procedures are technically types, right?
 
Uh, well, more abstractly they are remotely invokable functions.
They do have type signatures, yes.
Here's my favorite serialization library:
 
Ok, I get it.
Thanks, that's a nice explanation to a layman like me :P
 
@BalarkaSen I'm no expert.
I'm using a toy project to learn about all of this:
On top of the serialization, you often want asynchronous behavior so your server doesn't block new requests if it needs to wait on another server to give it some data.
 
Heh, cool
 
10:17 PM
So far, in cappy, I've gotten the asynchronous event loop working, and I got a really dumb RPC working.
However, it was in python where the typecasting is sort of trivial (because there is no static typing).
 
@DanielSank We should learn more Rust
I'm trying to get Musync to work
 
@BernardoMeurer Come up with a project.
Unfortunately, Bernardo, I have too much to do.
 
I do have a project
Musync
 
@BernardoMeurer did you watch the period video?
 
When you get here, I want to work on DigitalPhase. I'm also working on Magichack.
 
10:20 PM
Lies, you don't even have a job
@0celouvskyopoulo7 Not yet
 
Gotcha, I didn't know python was type-friendly.
 
I also need to play guitar more.
 
@DanielSank Get a bigger house
 
I need to choose hobby projects carefully. I'm not sure Rust is going to fit now.
 
Or ditch your flatmate :P
 
10:21 PM
Ok should we just say we're not working on DigitalPhase for now?
It's been on my mind.
it would help me to just say it's in hibernation.
 
Yes. We will start when I get there
 
or not
 
Cause we can listen to stuff together
 
Either way, I will clear it from my mind.
 
On the same equipment
Yeah, do that
It's on hold right now
 
@Avantgarde Watch this closely: youtube.com/watch?v=m1InCrzGIPU
Good song, @Mostafa
 
@0celouvskyopoulo7 (Yeah, that's fine. My warning the other day was sterner than it needed to be — sorry — mostly, just try to handle stuff like that with care, like it's potentially explosive. That way the topic won't take over the chat or veer into stuff that is actually a problem.)
 
Good song? Are you kidding me right now
 
It's fantastic, what do you even mean man
 
@BernardoMeurer and I need to start a new batch of mead.
Ugh
 
10:27 PM
@DanielSank It needs to be ready for my arrival from the skies :P
 
@Mostafa ok well you're not off, since Reagan's time some parts of the government get funding through cocaine sales
 
@DanielSank We should do a hackathon :P
 
My ears cry when I listen to that song.
 
@Avantgarde Let me show you a little something
 
i like get got more
but that's a good song too
 
10:32 PM
@BernardoMeurer Yeah, I know Death Grips. Eclectic group
 
@Avantgarde They're the best
@BalarkaSen get got is for normies
Giving Bad People Good Ideas is the real deal tho
 
Oh that's just fantastic
 
@BernardoMeurer on what?
I like code sprints but they require an agenda.
 
Experimental music is great
 
I don't know yet
 
10:33 PM
if done right
 
One of the projects
 
death grips is progressive dance pop
not experimental
 
@BernardoMeurer a colleague and I recently said "Let's do the same website using three different front-end libs and see how we like them".
I'm working on the AngularJS one.
 
@BalarkaSen you mean garbage
 
@BalarkaSen You said it
 
10:34 PM
I originally implemented the site using a python server and Jinja2 html templates.
 
@0celouvskyopoulo7 go away man
 
@DanielSank That's pretty dope
I know 0 web
 
go hear justin beiber
 
yeah, we have traditional server-rendered templates, AngularJS, and we'll do react.
 
bieber
or whatever
@Bernardo I also like the music video for Good Ideas
Really good
 
Yeah that video is amazing
 
@Avantgarde What was wrong with it?
 
lol
Nothing
 
@Mithrandir24601 Hey, please check my approach to question: Consider a two level state $| \psi(t) \rangle = \cos(at)|0\rangle + \sin(at)|1 \rangle$ where $a$ is a number. A measurement then projects the system on state $| 0 \rangle$ or $|1 \rangle$. If we consider that this measurement was made after a time interval $t = \Delta t \ll \frac{1}{a}$ then what is the probability that the observer will project the system into state $|1 \rangle$ (hint: taylor expand sine and drop higher order terms)?
Proposed answer: We consider the initial state as $$\rho = | \psi(t) \rangle \langle \psi(t)| = [\cos(at)| 0 \rangle + \sin(at)| 1 \rangle][\cos(at) \langle 0 | + \sin(at) \langle 1 |]$$ we note that this is a Von Neumann measurement since it projects onto a basis state, hence we have probability of measuring $|1 \rangle$:
$$p_{| 1 \rangle} = \langle 1 | \rho | 1 \rangle = \langle 1 |[ \cos^2(at)|0 \rangle \langle0| + \cos(at)|0 \rangle \langle1| + \sin(at)\cos(at) |1 \rangle \langle 0 | + \sin^2(at) |1 \rangle \langle 1 |] |1 \rangle = \sin^2(at) \approx (at)^2$$ (where I used taylor expansion $\sin(a t) = a t - \frac{(at)^2}{3!} + \frac{(at)^5}{5!}-...$). What do you think about the proposed answer, do you have any ideas? Thanks for any assistance.
 
10:40 PM
@0celo what kinda music do you even like man
you have rejected everything i suggested
 
@BalarkaSen And even called my suggestion illegal
 
meh drugs are okay
 
Try this https://youtu.be/ZD71JeX4Vk0
@0celo
 
@Mithrandir24601 Having difficulty logging on Doe email account for some reason.
 
@Mostafa opened link, cringed, closed link
@0celouvskyopoulo7 Oh did you see the song of 80's?
The meme thing
 
10:44 PM
@JohnJack Why are you bothering with density matrix?
You just want to compute the squares of the coefficients of the state vector for $t \ll 1/a$.
 
@BalarkaSen That was intended for 0celo in the slightest hope that he may like it
 
@DanielSank Yeah I understand, it's a convention I'm used to. But it is the same thing isn't it?
 
@BalarkaSen dont think so
 
@JohnJack yep, same thing.
 
@0celouvskyopoulo7 here you go: youtube.com/watch?v=NOl0MhHsOwI
 
10:47 PM
but what you wrote looks wrong to me.
Oh I see.
 
you will enjoy it, i promise. if you don't you're probably an arcane alien
 
It's confusing because the mathjax line is too long.
 
@DanielSank Why?
 
Use multiple lines, dude.
Yeah, the answer looks right.
 
10:55 PM
@DanielSank Thanks for checking. If we got $| \psi(t) \rangle$ above by evolving $|0 \rangle$ using hamiltonian $H = a \hbar \sigma_{y}$, then after the measurement mentioned above, if we made repeated measurements interupting the evolution at time intervals $\delta T$ then what would we get? My idea is that we would next get $| 0 \rangle$ now with probability $(at)^2$ and the probability would alternate between $|0 \rangle$ and $|1 \rangle$ in that way. Is this the correct thinking?
 
You don't know what you'd get.
The outcomes are random.
All you can do here is compute a probability for each sequence of measurement outcomes.
 
@JohnJack You get potato^2
 
@DanielSank The question is, consider what happens if we make repeated measurements,
interrupting the evolution at intervals $\Delta t$. What is the probability that the observer will find the system to be in state $|1 \rangle$ after $N$ measurements?
 
@0celouvskyopoulo7 I hear that 5 times a day
 
11:02 PM
@DanielSank I forgot to mention in the first part that you start with state $|0 \rangle$ and then evolve to $| psi(t) \rangle$ in time $t = \Delta t$.
 
@BalarkaSen but seriously, I like rap, trap, RnB, hard dance (hardstyle, rawstyle, hardcore)
 
@JohnJack That is a well defined question.
Well you tell me, what's the probability to be in $|0 \rangle$ after one time step?
 
@DanielSank $1 - (at)^2$
 
Do you want to know the probability of being in $|1 \rangle$ after $N$ steps, or do you want to know the probability that we made at least one transition to $|1\rangle$?
I think you want the latter...
 
@DanielSank Former I think.
 
11:05 PM
Are you absolutely sure?
I mean, that's fine, it's just slightly harder to compute.
 
@0celouvskyopoulo7 Gotcha. Those are the things I have little to no exposure on.
 
@DanielSank "What is the probability to be in state $|1 \rangle$ after $N$ steps", that seems like the first option.
 
@DanielSank Yeah I'm sure.
 
Slowly going/plan on going through Kendrick Lamar
 
11:06 PM
@BalarkaSen I would like to listen to "real" dubstep, but I'm not sure where to begin
 
@BalarkaSen (一_一)
 
skrille$\chi$
 
@JohnJack what have you tried so far?
 
@BernardoMeurer the people above me are at it again
 
@Mostafa ? :)
 
11:07 PM
it's 7 o'clock for pete's sake
 
I hear he's good
 
@Avantgarde is he even still around
 
@0celouvskyopoulo7 No idea. That's the only dubstep artist I know
 
@DanielSank Will tell you now.
 
@0celouvskyopoulo7 Ask if you can join
 
11:09 PM
@BernardoMeurer +1
 
@DanielSank Actually no my idea doesn't work out yet...Can I think about it and ask you again what you think of the idea.
 
@JohnJack Of course.
 
I had my headphone volume up 90% man!!
 
bye bye ears
 
11:11 PM
@BalarkaSen sory
angerfist is pretty good if you're feeling edgy
 
@DanielSank Thanks. It seems unavoidable that I need to know how the state evolves starting with state $|1 \rangle$, which is not given...So I'm working that out first.
 
Good idea, but you can get it from symmetry.
 
god what the hell is that
it's death metal with dubstep
it's blasting my ears out
 
@BalarkaSen It's hardcore
literally
that's the genre
 
@DanielSank Yeah I thought so, was going to check that now.
 
11:14 PM
@Avantgarde yup
 
@BalarkaSen haha
 
@BalarkaSen might be loud youtu.be/8SkYD5Cxtlo?t=3m43s
 
@0celouvsky Is this what Russians are into these days?
 
@BalarkaSen I doubt it
But that's hardcore
 
I must say, I am not a big fan of this
 
@BalarkaSen hardstyle youtube.com/watch?v=d9AKbaeecKI
the anthems tend to be ridiculous synths on 150 drums
the raw side has become more interesting lately
it used to be just screeches and stuff
 
@Balarka Although it's a bit long, I highly recommend listening to this album: youtu.be/PZwQeZh6rP0
The genre is post rock, but quite unconventional in their approach
 
@Avantgarde the start is incredible
 
11:36 PM
@avantgarde thanks a lot! I am listening to it right now
the comments below are fantastic, regardless
 
@JohnJack Oops - sorry, I'm just spotting this now :P At least you're sorted :) It's possibly worth generally mentioning that I'm going away for a bit more than a week this Friday, so won't be on a lot during that time
 
@BalarkaSen Protip: never get down to the comments section if you want to enjoy the video
 
@Mithrandir24601 Okay cool, you going on vac? Not quite sorted yet I'm still working through it, trying to get sorted...you know how it goes.
@DanielSank Starting in state $| 0 \rangle$, after evolution $H = \hbar a \sigma_y$ for time interval $t = \Delta t$ we get $| \psi(t) \rangle = \cos(at)|0 \rangle + \sin (at) | 1 \rangle$ with probability $\langle1 | \psi \rangle \langle \psi |1 \rangle = \text{sin}^2(at) \approx (at)^2$.
Then we are in state $|1 \rangle$, after evolution $H = \hbar a \sigma_y$ we get $| \psi \rangle = \cos (at)|1 \rangle - \sin(at) |0 \rangle$, with probability of $|1 \rangle$ $\langle1 | \psi \rangle \langle \psi |1 \rangle = \cos^2(at) \approx 1$...Seems a bit dodgy but after $N$ measurements we get $|1 \rangle$ with probability $(at)^2$ (using taylor approximations).
 
11:54 PM
@Mostafa I try not to, at least on the good stuff
Brilliant xkcd by the way
 
@bolbteppa @BalarkaSen Yep. Hope you enjoy it. :)
 
do you have the same mucked up sleep schedule i do
 
Yep
 
welcome to the club
i have to sleep now, though.
 
I got no school right now so :D
Goodnight
 
11:58 PM
#envy Night
 

« first day (2421 days earlier)      last day (2507 days later) »