« first day (1832 days earlier)      last day (3125 days later) » 

8:04 AM
I think heapsort is cool.
Because heaps are cool.
 
user1804599
what is a heap
 
It's a binary tree laid out in contiguous memory.
Finding index of left child is simply current_index * 2, index of right child is current_index * 2 + 1
Finding index of parent is current_index / 2.
etc.
And some other cool properties.
 
It's kind of balanced too
That's why you can use an array for it
 
user1804599
@StackedCrooked amazing.
 
that's not right
 
8:08 AM
oh
 
you are conflating the ADT heap with its storage as an array
it doesn't have to be
 
Never said it had to be
 
user1804599
He says you can use an array for it.
 
user1804599
Not that you must use an array for it.
 
3 mins ago, by StackedCrooked
It's a binary tree laid out in contiguous memory.
 
user1804599
8:09 AM
It is laid out in contiguous memory.
 
user1804599
But not necessarily contiguously laid out in memory!
 
Pedantry!
 
you can implement a heap as a tree :w
 
A heap is a binary tree that has the property that each node is greater than its kids
 
and it's not laid out contiguously in memory at all
 
8:10 AM
I think
 
user1804599
But it is laid out in contiguous memory.
 
@Elyse lol
 
@Jefffrey but what do you do when equality?!?!?!?!??!
 
@GregorMcGregor But it's an array.
 
8:10 AM
the world explodes
 
yes
 
@StackedCrooked No, that's a way to store a heap only
The only thing that matters is the relative ordering of the nodes
IIRC
 
you know you guys could just use wikipedia
 
If only there was a way to check
 
and reduce this discussion to null
 
user1804599
8:12 AM
In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: If A is a parent node of B then the key of node A is ordered with respect to the key of node B with the same ordering applying across the heap. Heaps can be classified further as either a "max heap" or a "min heap". In a max heap, the keys of parent nodes are always greater than or equal to those of the children and the highest key is in the root node. In a min heap, the keys of parent nodes are less than or equal to those of the children and the lowest key is in the root node. Heaps are crucial...
 
@AlexM. Eww null
Use std::optional<T>
 
ewww C++
 
So today I was thinking of something
 
user1804599
cool PHP ships with heaps php.net/manual/en/class.splmaxheap.php
 
user1804599
as an abstract class, LOL
 
8:13 AM
@Jefffrey optional<optional<optional<...
 
In old languages like C we used to like short concise code. So you can see int instead of integer or typedef or int* instead of integer reference and so on.
And now instead we value code that is more verbose but clear.
To a certain extent of course.
So instead of 3 letters variables, we recommend longer and clearer variable names.
If you take this premise and you consider named arguments for a moment, it almost seems like we are trying to get to a more SQL like syntax.
 
user1804599
I like short concise code ∴ I use Haskell.
 
So I wrote a couple of functions in some language that popped in my head
is user with id _ logged in? : db user id -> std boolean
is user with id [id] logged in? =
	[query] = "select exists (...)"
	run query [query] with connection [global connection]
Where [..] is used for variables
 
Most commonly used words in a language may be short since they will become so ingrained that the readability issue won't be relevant anymore.
 
is op a faggot?
 
user1804599
8:17 AM
@Jefffrey what language is that
 
factorial of _ : std integer $n bytes -> std integer $n bytes
factorial of 1 = 1
factorial of 0 = 1
factorial of $x = factorial of ($x - 1) * $x
 
@GregorMcGregor FILE_NOT_FOUND
 
user1804599
You can do that horrible shit in Agda.
 
Here I used $ for variables, but that doesn't work if you allow spaces
 
does it get more verbose than that my fingers are tired already int = 1
 
8:17 AM
@Jefffrey what's a std boolean lol
 
@GregorMcGregor lol
 
I think the argument matching is cool
 
@AlexM. Oh, I have this notion that integer and booleans should also be in a namespace
Maybe in the language spec just leave it as implementation defined
I just found it interesting, that's all
What do you guys think?
I think some older language had this sort of syntax before
Maybe Objective-C?
If you think about it you solve the problem that named arguments solve, and you can also define your own syntax basically.
 
what made you think objective c, the square parens?
 
@AlexM. Nah, the function call with: arg and: arg thingy
Doesn't it have something like that?
 
8:22 AM
yes, the naming of things in obj-c is a bit different because of it
 
user1804599
In Objective-C you can do this except you cannot have text after the last colon in a selector.
 
Apr 3 at 14:03, by Alex M.
(void)hitEnemy: (Enemy)enemy withWeapon: (Weapon)weapon andBuffs: (Buffs)buffs;
 
user1804599
You can write [xs addObject: x atIndex: 0] but not [xs addObject: x atEnd].
 
I see
 
the withThing and andThing part
I liked that but it is the only thing I remember about it
 
8:24 AM
Yeah me too
 
and the fact that unlike Java
 
user1804599
In Agda you can do this: xs addObject x atIndex 0 if you name your function _addObject_atIndex_.
 
I didn't need to go through pain to call Obj-C++ from C++ and vice-versa
 
@Elyse That's beautiful.
 
8:24 AM
Mixfix FTW
 
user1804599
It's absolutely terrible.
 
it was a joy whenever I had to do something for iOS and a pain whenever I had to do the same for Android
 
@Elyse Why?
 
user1804599
For the same reason custom operator precedence is absolutely terrible.
 
user1804599
Context-sensitivity.
 
8:26 AM
I'm not sure I see how context-sensitivity happens here
 
_a_b_ , _d_

4 a b 3 d 5
 
user1804599
The parse of if x then y else z depends on previous text.
 
hangman?
I love hangman
I pick i
there was this 3D-looking hangman in Windows 95
 
@BartekBanachewicz Can't you just reject it as it's ambiguous?
 
8:28 AM
loved it
 
@AlexM. you're dead
 
@StackedCrooked :<
 
user1804599
If there's a definition named if_then_else_ then it's parsed as if_then_else_ x y z, otherwise it's parsed as (((((if x) then) y) else) z).
 
@Elyse Oh I see
 
I can't find a pic of it but it was like this
 
user1804599
 
nothing will happen
law isn't for the rich
 
user1804599
I like the gay sex part.
 
@GregorMcGregor law of one
 
user1804599
> The prince of Saudi Arabia — where gay acts are punishable by death — was also witnessed romping with a male aide, whom the women saw stroking his penis
 
ewww gay stuff
disgusting
 
8:37 AM
"Saudi Prince" is quickyl becoming the new "Florida Man"
 
Xeo
grrrr, SO chat's scrolling is getting stuck a lot lately, for me...
 
user1804599
> Aboriginals: "Refugees Threaten Australian Surf- and Backpack Culture"
 
@AlexM. funny, I don't remember that one
 
I like his clothes
the robes and stuff
 
this looks like windows 3.1 not 95
 
8:39 AM
@BartekBanachewicz yea but something like it was on 95 too
I never used 3.1 but used 95
 
also
recommend a tune to start my day
no j-stuff
 
I start my day with the trail theme from witcher 3 :<
 
@Xeo refresh
always works for me
 
@AlexM. funny, it's in Polish
 
user1804599
Coq is based on CoC.
 
Xeo
8:43 AM
@GregorMcGregor sure. but then it gets stuck again at some point
 
Yeah :/
 
class Foo : FooBase { ... }

class Bar {
	Bar(Foo* pFooBase);
}

Foo myFoo();
Bar myBar(&myFoo);	// Doesn't compile.
			// It says that it can't find a constructor with the appropriate signature.
			// I was expecting this to compile.  After all, Foo is a FooBase.
Bar myBar((FooBase*)&myFoo);	// With an up-cast it compiles.
 
@BartekBanachewicz the band that originally produced the music that CDPR derived is also polish
this is my favorite from them
 
Oj Dildo
There, said it before rightfold
 
it has parts of the trail
it also has parts of Eyes of the Wolf
 
user1804599
8:45 AM
@NickAlexeev myFoo is a function.
 
user1804599
(FooBase*)&myFoo is not an upcast.
 
user1804599
It's a cast from a function pointer to FooBase*.
 
user1804599
@GregorMcGregor Oj vej.
 
@Elyse Yikes. I want to declare an object of type Foo. Is there a way to tell the compiler that that's an object rather than a function?
 
user1804599
Remove the parentheses.
 
user1804599
8:48 AM
Or write auto myFoo = Foo();.
 
@AlexM. I've just popped the whole W3 soundtrack
 
@Elyse [Duh. Have been writing C# for too long.]
 
@StackedCrooked I think I like the sound of heapsort.
 
Ell
Agggh
Fire alarmb
So needed a lie in this morning :/
 
@Ell Justice always wins.
There, I lied
 
8:57 AM
@Ell I suck at everything.
/lie
 
Xeo
@NickAlexeev Foo myFoo{};
if your compiler is up to snuff
 
He had more UB. Geez.
 
Hi matez
 
ey my neger
 
your mates wouldn't mate with you (unless rightfold)
 
9:17 AM
I would
 
2
A: Getting wrong output from boost lock free spsc queue

sehe You're using malloc in C++. You die. You have 2 lives left. Seriously, don't do that. Especially since using it with delete[] is clear cut Undefined Behaviour. Sadly you lose another life here: Queue obj(data,10); Queue *pqueue=&obj; q.push(pqueue); You store a pointer to a local. ...

Re-incarnated with much extra UB and even forsaken afterlife now.
For extra hilarity
@Xeo It's 2015 :)
I've made the list of UB more complete. I'm sorry it may sound a bit like bashing. But really don't use C++ if you are not going to be safe. The world is a treacherous place as it is. — sehe 1 min ago
Code like this is our best argument against nuclear energy
 
so, going form old phone to new phone, getting sim swapped over... I can't think of anything that I would need to back up on my old phone that requires the sim still
 
Xeo
where are your contacts saved?
 
you can sync contacts through email
 
should I use DBus for non-GUI applications ?
 
9:30 AM
@chmod711telkitty assumptions
@NeelBasu good morning to you too
 
reply bait not taken
 
I mean, hi.
In 9 hours I'm going to go take my Prob & Stats exam
 
morning
 
('m gonna tank it probably)
 
@chmod711telkitty Impossible since you have me plinked
 
9:31 AM
@Xeo googles
@NeelBasu sure, why not
 
Oct 16 at 6:57, by sehe
It would be a shame if you missed that. (A little nod of acknowledgement would normally be fine).
 
@ThePhD hehehehe
 
Never use DBus before. However their site mentions its for desktop applications
 
All aboard the D bus
 
is this library written on the top of GTK ?
 
9:32 AM
Is there an F bus for me? :v
 
The driver is elyse
 
D-Bus applications

There are many, many technologies in the world that have "Inter-process communication" or "networking" in their stated purpose: CORBA, DCE, DCOM, DCOP, XML-RPC, SOAP, MBUS, Internet Communications Engine (ICE), and probably hundreds more. Each of these is tailored for particular kinds of application. D-Bus is designed for two specific cases:

Communication between desktop applications in the same desktop session; to allow integration of the desktop session as a whole, and address issues of process lifecycle (when do desktop components start and stop running).
dbus.freedesktop.org/doc/dbus-tutorial.html it encourages use of DBus in desktop applications.
 
Isn't CORBA dead and buried
 
@GregorMcGregor Yeaaaaah bby
 
Refito
 
9:39 AM
I have 3 daemons running in the same machine. I need a very simple pub-sub kind of functionality. I need one daemon to send an uuid token to another. and for this simple functionality I don't want to take another tcp/udp port or use a MQ or create an RPC. I wanted to use DBus because its always available and dependency is light. But I am afraid because their website prromotes use of DBus in desktop applications.
 
@Rerito BTW I figured out your real name entirely by accident
 
a likely story
inb4 extortion
 
ITT cicada would love any cat
 
@LucDanton for once it's true I swear
sur la face du coran aley
 
ah ben dans ce cas
 
9:44 AM
@GregorMcGregor Indeed
Stalker!
 
@Borgleader Commute time already?
 
@ThePhD about to leave my house yes
 
Have fun at work, honey!~
 
@GregorMcGregor You must be playin' "The power of love" by Huey Lewis then
 
There'll be fresh, hot code for you when you get back. ♥
 
9:47 AM
@ThePhD <3
 
@Rerito No you just happened to have 1 commit in one repo I stumbled upon. "Hey that avatar looks familiar".
And then well
 
user1804599
Perl 6 allomorphism is funny.
 
Oh, that's rght.
I figured out a clever trick to solve a nearly one year old Issue Request in sol
 
@LucDanton periodic reminder
 
9:54 AM
I'm gonna implement it now because studying for this exam is futile.
 
@GregorMcGregor pls I’m reading the subreddit over and over again
 
@GregorMcGregor of what exactly
 
@LucDanton /r/hypetrain
 
> I work alone from home so forgive me for asking questions that would otherwise be posed to colleagues.
Luke Puplett, England, United Kingdom
8.3k 7 54 101
what
 
I am in a odd state... amused to point of hysterics, whilst also raging at stupidity. Why are we using GWT? It sucks so much balls
you can't even use core java things!
 
9:56 AM
@LucDanton are you like, DID I MISS A CRUCIAL DETAIL
 
@GregorMcGregor I don’t know why I keep doing it, it’s moderate volume anyway and there’s nothing useful that could appear ._. but I can’t keep the game off my mind
 
Loin de moi l'idée de vouloir insinuer quoi que ce fusse
@LucDanton which game exactly?
oh, that game
:slow wink:
 
Fred's deep voice does not match with his fair long hair ... v. weird
 
@sbi I am refusing right now to get drawn into a tedious, long winded, fruitless back and forth. Give me some grapes and then we can try.
 

« first day (1832 days earlier)      last day (3125 days later) »