« first day (1476 days earlier)      last day (3465 days later) » 

user1804599
11:00 PM
No.
 
it is with this formula
 
user1804599
Their importance is lower because the age is larger.
 
except it doesn't work this way
 
user1804599
Oh wait you're right.
 
user1804599
top kek
 
11:00 PM
:)
 
user1804599
Maybe I need average or something like that.
 
you could do average
median
 
variance too
 
user1804599
Which is possible to compute O(1) given a cache.
 
average?
 
user1804599
11:01 PM
Yes.
 
oh yes
yeah it can
 
user1804599
If you cache the sum and count you can calculate the new average in O(1) when adding a number.
 
yeah
I know
GOD THIS SPAMFLOOD protection
 
user1804599
I wonder why PostgreSQL doesn't have a caching mechanism that works like this.
 
user1804599
Some kind of index for full-table aggregates.
 
11:03 PM
you could keep track of it manually
 
user1804599
Possible with triggers though (ugly).
 
whenever you update something you subtract the original from the cache
and add the new value
 
why ugly?
that's an example of what triggers are there for
@rightføld is that a "dutch youtube"?
 
user1804599
Yes.
 
Why would people post there instead of youtube I wonder.
 
11:08 PM
because they're dutch
 
Or any other "international" video service.
 
we have romanian youtubes too
 
@AlexM. You can post and find dutch videos on youtube. v0v
 
yes but a dutch youtube feels more cozy for dutch people
 
you can just filter by language on youtube
 
user1804599
11:09 PM
@Jefffrey because it's much better than YouShit.
 
user1804599
And it's part of GeenStijl and GeenStijl is awesome.
 
Ell
what do you think the advantage of exceptions over Maybe is?
 
they are two different things
it's like saying: "what are the advantages of cpu over ints?"
they serve different purposes
 
Ell
maybe it's not maybe I'm thinking of
 
user1804599
@Ell They are different things.
 
Ell
11:12 PM
What do you think the advantage of exceptions over either for error handling is?
 
user1804599
Maybe can only be an alternative to "not found" exceptions.
 
user1804599
@Ell You can e.g. return a value along with a potential error.
 
well, not really
 
user1804599
Like (Either Error Value, SomeOtherValue).
 
Nothing indicates that the algorithm succeeded and returned no results, a "not found" exception indicates an algorithm couldn't finish because something was not found
they give two different semantics
 
user1804599
11:14 PM
@Jefffrey Not necessarily.
 
user1804599
You can have if (…) throw NotFound() else return value.
 
You can do a lot of things wrong.
That's still not what I would expect from a sane programmer.
 
user1804599
whatever
 
user1804599
I only implement happy flows.
 
user1804599
andere flows kunnen de tyfus krijgen
 
11:16 PM
anyone here work or have worked for microsoft store?
 
Like: "read file" -> can throw a file not found; "return the highest number of a list" -> can return Nothing
 
user1804599
Yes.
 
user1804599
I didn't say it is an alternative to all "not found" errors.
 
We're almost at 500 posts in Nomic
 
@rightføld What "not found" errors, then?
 
11:16 PM
More people should join
 
user1804599
Your max example.
 
@CatPlusPlus So much crap already?
@rightføld Yes, it depends on the precondition.
 
user1804599
Perhaps fetchUserByID :: Database -> UserID -> IO (Maybe User) since you're never gonna deal with database I/O errors (only thing that can go wrong here besides "not found") anyway, except very low down the callstack where you have a catch-all.
 
Ell
oglplus is not very well documented
 
user1804599
I decide it based on how I feel about it per-case.
 
user1804599
11:20 PM
I don't follow rules.
 
user1804599
It's not very important.
 
You are such a rebel
 
user1804599
Typically I choose Maybe if I want to make sure I deal with it everywhere I use the function.
 
user1804599
Exception if I don't care about the error anywhere or only in a small set of places.
 
user1804599
Other kinds of errors like validation errors are similar but Either instead of Maybe.
 
user1804599
11:22 PM
Like extractUser :: Request -> Either (Set UserValidationError) User.
 
user1804599
Exceptions are cumbersome and documented separately, bleh.
 
user1804599
> Brazzers
 
Ell
vim is slow
 
@Ell Are you doing Ruby?
 
Ell
11:29 PM
@Jefffrey cpp
 
user1804599
@Jefffrey Same question as your deleted message.
 
user1804599
BRAKET
 
barket
 
karbet
 
user1804599
cabaret
 
11:30 PM
kebart
 
user1804599
also lol vim
 
inb4 emacs
 
user1804599
Rainbow parentheses work everywhere, except when I'm writing Clojure code.
 
@rightføld is it common to split a clojure namespace among files?
I'm asking this because eclipse seems to use the namespace name as file tab label
so two files composing the same namespace appear the same in the tab list
 
user1804599
 
user1804599
11:31 PM
:(
 
(I mean two tabs with similar labels)
 
user1804599
@AlexM. no.
 
user1804599
Use IntelliJ, not Eclipse.
 
<3
I think I have all the ingredients to make that plate actually.
I should try.
 
I'll make this tomorrow
 
11:35 PM
Is that meat or bread?
 
with rice & mushrooms
it's chicken meat
 
Sounds yummy
 
hmm
 
Xeo
Yay JonTron
 
yeah the ingredients don't seem to be too weird, except for the curry powder
 
11:36 PM
which would be more disgusting: fried bread with rice and mushrooms, or fried chicken with rice and mushrooms?
 
curry is ok-ish, but I have no idea how much it will affect the chicken here
 
definitely the chicken.
 
Xeo
what
 
@Jefffrey What's in it?
 
Xeo
chicken is awesome
 
11:37 PM
You bastards know instinctively when I'm hungry.
 
it's a well-known fact that all forms of chicken are disgusting.
 
@EtiennedeMartel cream, zucchini, mushrooms, peas, grana and pasta
I guess
 
chicken is good
 
i have boost 1.54 — MMM 49 secs ago
@MMM I'm sure you can buy a newer version :) — sehe 18 secs ago
 
user1804599
Time to give this a try.
 
Ell
11:38 PM
chicken is white meat
 
but why did it cross the road?
 
user1804599
@Ell hence it's racist.
 
I hate you all with an overwhelming passion.
 
user1804599
It should be black meat.
 
which is racist
 
Xeo
11:38 PM
@Puppy It's also a well-known fact that you suck.
13
 
@MartinJames hi
 
@MartinJames Always?
 
@sehe I'm gonna try to fire up a pizza. I may have to claim on fire insurance.
 
Xeo
@sehe Watch the first 40 seconds of this
 
...
 
11:42 PM
@Jefffrey Hmmmm,
 
@Xeo lol
 
Chicken owns
 
I saved the recipe for this after seeing it in Windows 8's food and drinks app
I want to try it but I'm a bit skeptical
mainly because that's fucking toasted bread with caramelized bananas and chocolate sauce
what the fuck
looks good though
 
Xeo
looks good
 
Sounds too sweet
 
11:44 PM
Oh boy
 
@CatPlusPlus yeah that's what I'm afraid of
it seems they also say there should be sugar in the butter thing you use on the bread
 
Send it to me by mail if you don't like it.
caramelized banana, mm
 
Mumble kinda sucks server management wise
 
bananas are so underrated
 
We should try out some alternatives one day
 
11:47 PM
chocobananas are underrated
 
banana chips are awesome
 
user1804599
banana crisps
 
user4655569
Can somebody help me ? How to call the constructor of an object declared in the header file ? I want to initialize it in the .cpp file.
 
I kinda thought about running Asterisk lol
Imagine Loungephones
 
Ell
asterisk o.O
 
11:48 PM
I think you can do free-join group chats with it
Never tried it though
 
user1804599
@YannikKlubertanz objects don't have constructors.
 
It is a PBX software, so it'd be gloriously overengineered solution to a simple problem
 
user4655569
@righ
 
user4655569
@rightfold: Yeah but i can call the constructor of that class
 
user1804599
You call the ctor by doing class_name object_name;.
 
Xeo
11:51 PM
alright, time for sleeps. g'night
 
user4655569
i know that, but ... not the default
 
He probably means he wants to define the constructor in the .cpp file
 
user4655569
no
 
user1804599
class_name object_name(ctor_argument);
 
user4655569
Yes, in general that works, but i declared the object with ClassName objectname already in the .hpp file, so i want to initialize this object not a new one.
 
11:53 PM
@YannikKlubertanz You mean inside a class?
 
user1804599
It's initialised automatically before main is called.
 
user4655569
Yes inside a class, in his constructor.
 
You use otherclass(...) : objectname(...) {...}
 
I need to read some networking book
I still have no idea how this shit works
 
Ell
11:55 PM
@CatPlusPlus for implementing networking code or networking machines together?
 
@CatPlusPlus they say tanenbaum is great
 
user4655569
@Jefffrey Err i dont think you get what i mean.
 
Linux networking specifically
Though I'm rusty on physical level stuff too
 
What do you mean by linux networking?
Some kind of networking within the OS?
 
Configuring routing, bridging, that stuff
 
user4655569
11:58 PM
In the header there is Class object declared. In the constructor i want to call the constructor of this "class", but not the default one. but object(arg1, arg2); doesnt work.
 
4 mins ago, by Jefffrey
You use otherclass(...) : objectname(...) {...}
 

« first day (1476 days earlier)      last day (3465 days later) »