« first day (1877 days earlier)      last day (3075 days later) » 

6:00 PM
Hence you might argue that if they were really smart they would let it crash sooner and come up with a better alternative
 
Well, they removed a lot of stuff for 7 - not my point though: I don't like php, I think it's a terrible language. My point is just that these people are really smart.
 
@Borgleader <3 <3 <3
 
One thing that's extremely weird for me is that no one proposes a really good migration path from php
 
Facebook, Hack. It's just also pretty shitty of a language :P
 
People keep saying how php is terrible, but no one can provide "run_to_migrate_to_x" script
@BenjaminGruenbaum yeah it's coming from Facebook, of course it's shitty
 
6:01 PM
Facebook do, you can run php alongside hack code. Some people do.
@BartekBanachewicz I take it you're not a Haxl fan?
 
languages that aim to be proper alternatives don't provide that though
@BenjaminGruenbaum I'm not a facebook fan.
I think their development practices are terrible.
 
@BartekBanachewicz they probably saved me more time in Haskell than anyone else, I really enjoy Haxl
 
@BenjaminGruenbaum Well they should come in here then :) We can never get enough smart ppl.
 
also either it's me or Starbucks made their cup handles thicker
 
@BartekBanachewicz since when do they have handles?
 
6:03 PM
@bitcode not the takeaway ones
the porcelain ones.
I have one of them at home.
But I swear it has a thinner handle
oh well. #FirstWorldProblems
 
@Borgleader the quality of people here is pretty high anyway (I honestly do think that). The php room is an anomaly of incredibly competent, helpful and smart people who are just all doing the wrong thing. I've told them so multiple times :D
 
@BartekBanachewicz I see. I just never saw one with handles. I'm not a starbucks regular
 
@BartekBanachewicz very cool indeed.
I would like to have one =\
 
They aren't that expensive, you can just buy one
 
6:06 PM
@BartekBanachewicz I have no idea where there's a starbucks in my city or even if there is one
at all
 
user1804599
@BenjaminGruenbaum cool
 
weird can't find them on ebay
 
@TonyTheLion wake up buddy
 
@bitcode should be an easy google eh? :P
 
@BartekBanachewicz I just checked. there is no starbucks nearby my city lol
 
6:07 PM
@Borgleader d'awww :)
 
I love how the other dog is just totally ignoring him
 
@BenjaminGruenbaum aaaaaand a bunch of incompetent morons who think that uWSGI is an unnecessary complication and MySQL is the best database.
 
I'm super competent
 
The other dog is probably enjoying the massage but needs to maintain a cool face to keep it hetero.
 
@BartekBanachewicz very few
 
6:09 PM
And, my personal favorite:
> what's your favorite language
> PHP
> What languages do you know
> PHP
 
Poop Hoarding Processor 4 lyfe
 
@BenjaminGruenbaum A spoonful of tar spoils a barrel of honey
 
@BartekBanachewicz I don't know, the regulars there have a habit of just ignoring newbies, they're not as aggressive as the lounge - then again C++ has a much higher entry barrier than PHP. Honestly it's a much harder language too (mostly because of the tooling and abstractions).
 
user1804599
MySQL isn't a database.
 
drool
heavy breathing
I NEED THIS
 
user1804599
6:11 PM
It's a database management system.
 
user1804599
 
It's an adult website.
 
In C++, ownership is a core and important concept. In PHP, you have no facilities to deal with it, they didn't even have finally until a fairly late version. The reason is that resources just get cleaned up with the process dies. In PHP, you don't care about memory allocation, stack vs heap, and oh-so-many-other-things. The abstraction is terrible for anything complicated but most people doing php are just doing very simple and mediocre websites.
 
@BenjaminGruenbaum sure. We also kick out morons from here.
 
Even if when I code C++ I don't really care about a lot of things that C++ lets me do I still keep it in the back of my head.
 
6:12 PM
@BenjaminGruenbaum If only they realized that in fully. Cf my comment "PHP is the only language I know".
 
user1804599
@BenjaminGruenbaum IME the argument against finally is that PHP uses reference counting so destruction is deterministic in the absence of cycles.
 
Ell
Wti man
 
@Elyse also, the process dies and all memory gets freed when the request ends (or for the very least the thread gets "recycled") so you don't really care.
 
Ell
I have to implement a "ring" for my assignment
I think that means circular buffer :V
 
Static websites are cache friendly - even if your language is slow and your code is terrible cache will take care of most of it.
@Ell probably
 
Ell
6:14 PM
you don't even need a language for a static website, right?
 
@Ell If it's Haskell then it probably means the mathematical concept of ring.
 
@Ell You do for websites that are mostly static. PHP is good at letting people who are not very good programmers pour databases to html pages.
 
@Ell Sometimes you do, for things like including headers and footers in different pages.
 
That's what it was built for.
 
It's not required, but it's helpful.
 
6:15 PM
damn I like Porsche more every day
keep discovering things about it
and it's just great
 
user1804599
My boss has a Porsche.
 
@Elyse what model?
 
user1804599
dunno
 
user1804599
not really I guess
 
6:16 PM
@Elyse why?
 
user1804599
Because it is a system that manages databases.
 
PHP is terrible at doing things that are complicated. Which is why a lot of people (me included) hate it. I can totally see the appeal of PHP for newbies though.
 
@Elyse ah then it could be a lot. Most people buy Caynennes those days I guess
 
Elyse is a newbie
 
@BenjaminGruenbaum And that's precisely why it shouldn't be recommended to newbies
 
user1804599
6:17 PM
@BartekBanachewicz Carrera
 
Has somebody here experience with a library in C++ for graph analysis; e.g. determining vertex, slope,...
 
@Elyse ah the 4 seater. They're cool.
 
@bitcode what he means is that the storage engine is not MySQL, it's InnoDB for example. MySQL just wraps it.
 
user1804599
 
user1804599
Like this.
 
user1804599
6:17 PM
@BartekBanachewicz The backseat is fucking terrible.
 
user1804599
It's worse than sitting in economy class in a plane.
 
@BenjaminGruenbaum hmm. interesting.
 
@Elyse it's made for emergencies/children only really
 
user406009
@BenjaminGruenbaum I think lots of people fail to see that PHP is actually a decent product if you primarily care about speed to delivery. PHP is popular because it provides a means for people to get stuff done quickly. I think other languages should look to PHP as an inspiration in being easy to setup. (Of course ditching the bad parts of the language itself)
 
if you want to carry more people, you buy a Panamera, not a 9xx
 
user1804599
6:18 PM
ok
 
user406009
PHP won't die until the competition is better.
 
user1804599
@BenjaminGruenbaum InnoDB is also not a database.
 
@Lalaland definitely. Languages have a lot to learn from php tooling and ease of use.
 
PHP will never die because people don't care about better, they care about familiar.
 
user1804599
The thing you create with a CREATE DATABASE statement is a database.
 
6:18 PM
@Elyse yeah, it's a storage engine, didn't want to go there.
 
@Elyse but it's still practical to have those seats I suppose
 
user1804599
Yeah, for carrying cargo.
 
@Elyse what is a database then?
 
Ell
they are extremely uncomfortable
 
Nobody here who has experience with mathematical libraries for c++?
 
6:19 PM
@BenjaminGruenbaum and they are. Static languages are trying to bridge the gap
Hence "The death of dynamic languages" and the like
 
@black The smart people are in the PHP room
 
@BartekBanachewicz dynamic languages are trying to get more popular.
 
But still, node.js, being absurdly terrible, is still a better platform than PHP
 
user1804599
Just wait for Sanity to introduce sanity.
 
@black do you have a concrete question?
 
Ven
6:20 PM
:')
 
user1804599
interface I {
    unsafe abstract def foo: int;
}
def caca: I = caca;
def baba: int = caca.foo;
 
@BartekBanachewicz nodejs has some terrible abstractions which it makes in order to gain things most people don't need. Most people are better off with PHP.
 
user406009
@black that's a pretty specialized topic. I don't think anyone here deals with that sort of thing.
 
@BenjaminGruenbaum And yet at the same time what they're facing now is the problem of not being able to express things statically
 
user1804599
6:20 PM
I just fixed this bug. It compiled before.
 
user1804599
How could have I overlooked that.
 
Where can I ask this question?
 
@black that question is entirely off topic for Stack Overflow, moreover it really depends.
 
@BenjaminGruenbaum like, the fact that node.js libraries have docs that are written manually and not generated from signatures is absurd
 
6:21 PM
11
Q: Stack Exchange Chat Status - adding Hangouts-style avatars to chat

Nathan Osman About Stack Exchange chat is awesome. But there are a couple of missing features that would complete the experience: Showing how far each user has read Indicating when a user is typing This script aims to solve both of those problems. Screenshot Download / Install Instructions for ...

 
It's a huge step back
 
user406009
@black linear regression is pretty simple. I would recommend coding that yourself.
 
user1804599
 
user406009
Formulas should be on wikipedia.
 
@BartekBanachewicz signatures are meaningless for generating signatures in most languages anyway.
 
6:22 PM
@Lalaland Ok I'll try it and thanks @Elyse thats probably the right place to ask!
 
I'd take hand written docs over generated ones all day long.
 
@Elyse what is this project you've been working on the whole weeK? just out of curiosity
 
@black a friend and me had positive experience with eigen.
 
user1804599
I don't think I'll do the (T, U) -> V-is-a-supertype-of-(T) -> V thing.
 
/**
  Returns the sum of all numbers passed to the function.
  @param {...number} num A positive or negative number
 */
@BenjaminGruenbaum yes amazing
 
user1804599
6:23 PM
@bitcode A programming language and a compiler for it.
 
Hah Jack Black's in this X-File episode
 
@BenjaminGruenbaum Eigen, the math method or is this a library?
 
the library
 
user1804599
@black Eigen is a C++ library.
 
Let's invent a new way to express signatures that aren't checked with anything at all because that's apparently more convenient.
I despise this simplistic attitude so much.
 
6:24 PM
/**
*   This method is doSomething
*   @param a - a bar the method takes
*   @param b - a baz the method takes
*   @return this method returns the result of doSomething on a and b, does so as a Foo.
**/
    Foo doSomething(Bar a, Baz b) {
        // ...
    }
 
user1804599
Well, in the absence of types, more correct programs compile.
 
Every JavaDoc ever. @BartekBanachewicz
MSDN is full of these.
 
user1804599
Also more incorrect programs compile, but people like debugging.
 
@Elyse is it a personal thing or you're doing it for a company or somethign?
 
user1804599
@bitcode Personal.
 
6:25 PM
Type systems don't express behavioral contracts, they're just tests and guidelines. No type system is expressive enough for that.
Best case scenario for safety - you write contracts.
 
@BenjaminGruenbaum Uh.
 
user1804599
Type systems are more than tests. They are proofs.
 
@Elyse tests are proofs
 
bullshit
 
user1804599
6:25 PM
And making good use of types can prevent a lot of bugs from happening.
 
Of course, I agree.
I'm just arguing against Bartek's point about autogenerated docs
 
@BenjaminGruenbaum and you're arguing against that by pointing out an example of misused autogenerated docs.
My point wasn't that you can't misuse them.
 
Right, I'm arguing that most docs are autogenerated.
 
My point was that if you can't autogenerate them that you're dead anyway
 
Ell
you can't generate docs really, can you?
 
6:27 PM
Besides doc generation is just a fraction of possibilities you gain and you know that well enough
 
Ell
you could generate a skeleton for filling in the description field
 
@BartekBanachewicz why?
Some of the most documented libraries I know don't have autogenerated docs.
 
@BenjaminGruenbaum Because you're bound to manually ensure that they are correct.
 
user1804599
With "generated documentation" people typically refer to "documentation reformatted by a tool".
 
you will really like me thesis then! I generate everything out of types, including implementations :P
 
6:28 PM
Yes, you're bound to keep them in sync anyway.
 
And i've faced dumb simple type errors in js libraries where the docs outdated
I don't really trust any js documentation anymore
I just go straight to source
 
user1804599
You want types.
 
user1804599
Can't go out of sync.
 
People writing them aren't competent enough to stick to what they docs present anyway
 
6:29 PM
Types do not ensure correctness of what a method does most of the time.
You people are smart, you got to get that.
 
@набиячлэвэлиь JS has type errors, but they happen at runtime
@BenjaminGruenbaum They do for me.
 
user1804599
Use less general types.
 
If they don't for you, then you're not using them properly.
 
@BenjaminGruenbaum They don't; but they're a damn good start,
 
What Elyse said.
 
6:29 PM
Use void pointars as your only type
 
Never heard about Free Theorems @BenjaminGruenbaum?
 
user1804599
For example, instead of making a mean function take a List<T>, make it take a NonEmptyList<T>.
 
@Puppy I'm not saying they don't. I mostly use typed languages. I'm not anti-type. I'm just saying types don't really document code.
 
I agree.
 
How is that even remotely related?
 
6:30 PM
@BenjaminGruenbaum I disagree with that a lot. Good, precise static types provide a lot of information even in the absence of docs at all.
 
user1804599
Prefer equivalents to checked exceptions (such as checked exceptions, variants, optionals) to ensure you always handle all cases.
 
@Elyse even if I do have a language that enforces that - that helps with catching bugs not with documenting what a thing does.
 
implement function prototypes

There is an additional scope for function prototypes below the global scope.
This is a temporary hack until proper linkage is implemented.
NowI should be able to write mutually recursive functions :)
 
user1804599
You want to reduce the amount of nondetermination as much as possible by restricting types.
 
I'd even go as far as to say that typed, undocumented APIs can often be nicer to use than untyped, documented ones.
 
6:31 PM
Type a method that adds an item to a collection for me in a C# like language @BartekBanachewicz
 
@BartekBanachewicz They add a lot; but nowhere near enough to qualify as docs.
 
"in a C# like language"
 
user1804599
@BenjaminGruenbaum Sometimes you can restrict types so much that there is only one possible value of such a type. Strive for that, even if it's impossible.
 
If I declare a function, call it but don't implement it, I get a NullPointerException at runtime :)
 
@fredoverflow that's nothing something to take pride in :P
 
6:32 PM
@Elyse that only works if I'm operating in a void and don't have to marshal non specific types.
 
user1804599
Then the type is the full complete exhaustive documentation.
 
@Puppy Example: it's unnecessary to describe argument invariants for a function if they are enforced by the type system.
 
yes, but not all of them can be.
 
That works with contracts, types can't enforce many invariants.
 
@Puppy A lot can using modern advanced type systems.
like Agda or Idris, and soon Haskell hopefully
 
user1804599
6:32 PM
Also: types can enforce many invariants.
 
@BartekBanachewicz a method that adds an item to a list. Type it.
 
Ell
list.push_back(item) prolly
 
@BartekBanachewicz Unfortunately, it's yet to be determined if those are actually usable.
 
That's not typing it :D
 
^ nice type
 
Ell
6:33 PM
;)
 
@Puppy Well, Haskell is. And LiquidHaskell is a thing as well.
 
Ell
@Puppy they wrote an almost-c compiler in coq which is pretty impressive
 
user1804599
@BenjaminGruenbaum It's possible, lemme do it.
 
Ell
I don't see why they wouldn't be useable
 
I love how it went from "easy-as-f" to possible.
 
6:34 PM
@Ell there's an overhead for presenting very stricly checked information to the computer
 
@BartekBanachewicz Haskell is somewhat usable. I'm not sure if I believe it's competitively usable.
 
@Elyse that question was for Bartek, you get the same question but with a set instead of a list.
 
user1804599
I don't know how to implement sets.
 
@Ell They did, but it's junk
 
Don't implement a set, just type a method that adds an element to a set.
 
Ell
6:35 PM
List a -> a -> List a
 
Ell
Set a -> a -> Set a
I'm confused :V
 
user1804599
data Nil = Nil
data Cons h t = Cons h t
cons :: forall h t. h -> t -> Cons h t
 
@BenjaminGruenbaum mappend
 
@Ell that does not enforce anything - for example that the element is in the returned list after the method was called
 
6:35 PM
hey.. have any of you played the new star wars battlefront game that came out a month or two ago?
 
@BartekBanachewicz write the type.
 
Ell
Ohh I see
it's not easy-as-f to me certainly
but I believe it's possible
 
Here are some invariants: the list if not empty afterwards, the list contains the element afterwards, the list did not decrease in size afterwards.
 
@BenjaminGruenbaum you need dependent types for that
 
user1804599
6:37 PM
It's a little more complicated with homogenous lists, but you can do it in some languages.
 
@BenjaminGruenbaum you can merge not empty and the list increased by exactly one elem into one
 
Namely, if you give me a signature for which I can provide an implementation that is actually a delete - I mock you.
@BartekBanachewicz use whatever type system you want.
 
@BartekBanachewicz no I think you need pure calculus for "contains the very element you were adding"? calculus of constructions won't let you cherry pick the value as long as the values are equal?
 
user1804599
In Coq you can do it by providing a separate proof. Proofs are arguably part of the type.
 
Proving any non-trivial semantic property of a language is an undecidable problem. I just want to point that out.
 
6:38 PM
@BenjaminGruenbaum app : Vect n a -> a -> Vect (n + 1) a enforces length, but you need another proof for containment so that you can't just duplicate something
 
user1804599
@BenjaminGruenbaum Depends on the language.
 
@BartekBanachewicz right, or add junk. Or replace all elements.
 
@BenjaminGruenbaum greetings captain obvious; even dependent types already don't strongly normalize
 
@Elyse oh, I meant language in a CS sense.
 
@BenjaminGruenbaum assuming you carry the proof of containment, you can carry the proof over to the result. Not sure how feasible that is.
 
6:39 PM
@BartekBanachewicz I don't think you can say exists x, exists y and then distinguish between x and y if they're congruent
 
you can certainly combine the dependent predicates if that's what you meant
 
@BartekBanachewicz it's possible to type, it's just hard. I just wanted to illustrate that you can't generate documentation from types easily even for very trivial properties.
 
The dependent type is a dep-product of all the constraints
@BenjaminGruenbaum I feel a moral victory.
also containment proof is far from a trivial property for me BTW
 
@BartekBanachewicz Not exactly. If n can be 0, then you can't duplicate, because you may not have anything to duplicate.
 
@BartekBanachewicz what? You totally lost. You claimed that the signature documents behavior, I gave a trivial example asking you to show it - you failed to type it.
 
6:41 PM
@Puppy that's just one specialcase
 
user1804599
Definition cons (A : Type) (hd : A) (tl : list A) :=
    hd :: tl.

Theorem cons_correct : forall (a : A) (l : list A), cons a l = a :: l.
 
which your type signature does not forbid and therefore you must handle.
although arguably you could just insert if it's 0 and duplicate otherwise.
 
And of course, there are tons of properties you simply can't prove about the runtime of a program.
 
user1804599
If you consider the theorem part of the type, then this is a type that guarantees cons adds an item to the list and only adds an item to the list.
 
You need documentation.
 
6:42 PM
@BenjaminGruenbaum Fuck you, Halting Problem
 
Stronger types are important, but they're no replacement.
 
user1804599
@Puppy Some programming languages don't suffer from the halting problem.
 
@Puppy right, more generally - any semantic non trivial property.
 
@Puppy I don't need to if I express the result as (Elem newElem result) ++ (all previous elems)
 
In computability theory, Rice's theorem states that, for any non-trivial property of partial functions, no general and effective method can decide whether an algorithm computes a partial function with that property. Here, a property of partial functions is called trivial if it holds for all partial computable functions or for none, and an effective decision method is called general if it decides correctly for every algorithm. The theorem is named after Henry Gordon Rice, and is also known as the Rice–Myhill–Shapiro theorem after Rice, John Myhill, and Norman Shapiro. == Introduction == Another...
 
6:42 PM
in light of that, expressing the assertion that the last element is the one appended is fairly trivial :P
 
user1804599
They aren't Turing complete.
 
that being said, @Ben, in JS you could return "ass-cactus" or -1 from that function and do tell how that's even remotely better
 
@BartekBanachewicz it's not, it's worse. I never claimed otherwise.
 
it's obviously a lot worse.
 
"Never once have I looked at code and thought to myself "man, I wish I had less type information right now." Brilliantly put.
 
user1804599
6:44 PM
btw Benjamin do you still like auto-assimilation in JS promises?
 
I just claimed that you're often solving a class of fairly simple bugs and none of the really hard ones.
 
user1804599
because if so then I'll short-circuit myself out of this discussion to save myself the trouble.
 
yeah, but it's fucking frustrating to have to spend days figuring out the fairly simple bugs.
 
I disagree at none
 
@Elyse yes of course. From a theory point of view I find them repulsive but I teach promises a lot and they make things a lot simpler for users.
 
user1804599
6:45 PM
all credibility instantly lost.
 
@BenjaminGruenbaum and what puppy said, the fact they are "simple" can still mean they take a lot of time to debug
 
since half the time the value isn't used immediately but stored and then passed 10 levels down and then you find it's not what you expected.
 
@Elyse come on, you're better than that sort of thing.
 
@Elyse the automatic join thing? It's awful.
 
then you have to fuck around trying to figure out where it came from.
 
user1804599
6:45 PM
@BartekBanachewicz :D :D :D
 
@BartekBanachewicz while types are nice a language like c# can feel a bit clumsy at times.
huge bloat per type
 
user1804599
reminds me of the Clojure "monad" library, where in the nil "monad", return = id and join = id.
 
@BartekBanachewicz Are you talking about like, promise.then(() => another_promise) being a promise<T> instead of a promise<promise<T>>
 
@JohanLarsson guess why I don't use languages like C#
 
To be fair, now that we have async/await it probably would have been better without it.
 
user1804599
6:46 PM
@Puppy Yes. then shouldn't exist. There should be map and flatMap.
 
@BartekBanachewicz C# is the nicest typed language I use. It has amazing tooling and a type system that I'm cool with 90% of the time.
 
@BartekBanachewicz cos you go to parties all the time?
 
@Puppy yes, that's what they're talking about.
 
I'm perfectly happy with then, but I would have preferred that the flattening functionality be provided separately.
 
@Puppy yeah, they automatically join monads.
 
6:47 PM
like I dunno, then and thenFlatten or whatever.
 
See, they don't care these are monads, they're just trying to be useful to people.
 
@Puppy Just provide thenFlatten and require Promise (pure, return) for pure results
 
user1804599
More reason to have types. :) Automatic join is one of those design mistakes a proper type system would have made very difficult to implement or even impossible.
 
no.
that would be particularly unhelpful.
 
6:48 PM
@Puppy why?
 
Theoretically you guys are correct. Theoretically we do a lot of stuff in bluebird that has problems like reporting unhandled rejections after a turn of the event loop (C# does a lot worse btw). In practice we saved a lot of people a lot of time.
 
that gives you exactly what you need.
 
@BartekBanachewicz Because the vast majority of the time, the function passed to then does not return another promise.
 
@Elyse it's possible, I typed it, you do C++ you know how easy it is to unwrap recursive structures with templates :P
 
user1804599
in PHP, 23 secs ago, by user1460692
a doubt with datetime format
 
user1804599
6:48 PM
kekkekkek
 
@Puppy Eh I know it's not Haskell but I'm still sure explicitely lifting that function to monadic level is more convenient in the end
 
promise<promise<T>> is the edge case, not the normal case.
 
user1804599
@BenjaminGruenbaum Templates are not particularly what I call a feature of a "proper type system". :P
 
@BartekBanachewicz It'd just be pointless boilerplate.
 
@Puppy You should really try that out in Haskell IMHO and then assess.
 
6:49 PM
half the point of then is that the function that you call inside then doesn't give a fucking shit whether it's in a then or not.
 
@Puppy No, it's actually a normal case. I've seen the statistics. A lot of people use that feature.
 
if it had to return a promise, I'd be eternally wrapping shit in pointless promises that are always immediately resolved.
 
<$> is one of the greatest Haskell operators
and, funny enough, it doesn't even involve monads
 
user1804599
@Puppy You are thinking of having only flatMap.
 
@Elyse :P still, unwrapping a recursive structure is easy to type, the return type of then just changes based on overloads of the function it takes.
 
user1804599
6:50 PM
You can have just map as well.
 
@JohanLarsson lol "all the time"
 
user1804599
Promise<U> map<T, U>(Promise<T>, Func<T, U>);
Promise<U> flatMap<T, U>(Promise<T>, Func<T, Promise<U>>);
 
@BenjaminGruenbaum I'm happy for you.
 
@Elyse we had that, it was then and chain. People hated it.
 
user1804599
Yes, but people are incompetent morons.
 
6:51 PM
3 mins ago, by Bartek Banachewicz
@Puppy Just provide thenFlatten and require Promise (pure, return) for pure results
 
@Elyse no, they're really not.
 
gah, my R# trial expired, ordered from IT > 30 days ago.
 
Chances are they wrote a lot more promises code than you did.
 
@BenjaminGruenbaum they tend to be when JS is involved
 
user1804599
@BenjaminGruenbaum I see, that's why they implemented auto-assimilation.
 
6:52 PM
@BenjaminGruenbaum Chances are that Elyse is the only one that understands the monadic interface of them
 
@BartekBanachewicz JS programmers are not stupid. None of you guys actually believe that language X programmers as a whole are incompetent.
Languages are jut tools to express ideas.
 
Of course not, I'm a JS programmer
 
@BartekBanachewicz the typing of them goes back to the 80s, tons of people understand it.
 
I'm just saying that the JS community has an overall spirit of overlooking details
 
@BenjaminGruenbaum They probably just didn't know if the function they were calling returned a promise or not, whereas we use Typescript so we know.
@BartekBanachewicz I get it, I just don't really care. It's a minor detail that doesn't really affect how they're used.
 
user1804599
6:54 PM
When you use an untyped language it's best to pretend it's typed (and abide to all the restrictions of typed languages) except you do all the type checking manually.
 
they're promises first and if they happen to maybe also be monads then that might be nice but don't really care.
 
@Puppy they did, they just found it annoying to type Promise.resolve around every single non-promise return value. Also, sometimes you want to return a union type (return that number, or make an API call for it).
 
@BenjaminGruenbaum That would be fine if you had both then and chain.
 
user1804599
@BenjaminGruenbaum That's why you have not just flatMap but also map.
 
@BartekBanachewicz seriously, promises aren't that hard to type. I wrote promise libraries in at least 3 languages. They just opted to what people asked for and was most useful.
@Elyse no, I mean it's common to write code like:
 
6:55 PM
I just wish people stopped treating promises as a special case
Can I get that for christmas?
 
.then(x => {
    if(x in cache) return cache[x];
    return makeRequest("/get/"+x);
});
You'd have to wrap cache[x] with Promise.resolve if it wasn't for thens behavior?
 
@Puppy Yeah and what will you do with promises returning optional<result>
 
@BartekBanachewicz promises are a special case. Just because there are a lot of monads doesn't mean people care about them.
 
user1804599
Now I want to implement caching as a generic thing, so it can be used in many more places without duplicate code.
 
user1804599
In the meantime I want to use it with objects that happen to have methods named then but are totally unrelated to promises.
 
6:56 PM
@BenjaminGruenbaum undefined is not a function
 
@BartekBanachewicz What about them?
 
user1804599
Hilarity ensues. Happy debugging suckers.
 
@BartekBanachewicz that's not really a thing anymore.
 
@Puppy assume that you have Promise<Optional<Result>> and a function Result -> Promise<Optional<Result>>
 
@Puppy exactly.
@BartekBanachewicz what about it?
 
6:57 PM
how do you chain those?
 
@Elyse most people don't care about caching as a generic thing - they have caching and caching + async and there are no more cases as far as they're concerned.
 
user1804599
Yes, but most people are incompetent morons.
 
@BartekBanachewicz .then(maybe(optionallySomething => doSomethingWithIt()))
 
@BartekBanachewicz Well, the function returns a promise, so I'd employ a chain.
 
Not many days when I agree with everything Elise says
 
6:58 PM
@Elyse they're really not, they just disagree with you.
 
It appears Benjamin has been appointed the Most People Spokesperson.
 
user1804599
Bartek is a fool.
 
@Puppy yes but it results optional<something> and you can only proceed when you have something.
 
It appears like I'm the only one who participated in the discussions where statistics were actually presented.
 
@ElimGarak To be fair, the other side does not seem to be disagreeing about the material facts of their opinions.
@BartekBanachewicz Meh. We have a map function on our Pending which does that.
 
6:59 PM
@Puppy and you totes don't see the pattern forming?
 
I see it, I just don't really care.
 
I know that Pending is monadic, but I have yet to see any way in which that could possibly benefit me.
 

« first day (1877 days earlier)      last day (3075 days later) »