« first day (1311 days earlier)      last day (3632 days later) » 

7:00 PM
@fer Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
52
A: Is there a type 'Any' in haskell?

bdonlanGenerally speaking, Any types aren't very useful. Consider: If you make a polymorphic list that can hold anything, what can you do with the types in the list? The answer, of course, is nothing - you have no guarantee that there is any operation common to these elements. What one will typically d...

 
Not sure why you left that answer there, it is irrelevant.
Of course you can have any in static typesystems, just like you can compose type checks on dynamic languages for type safety before the compiler... the reason you don't see any in languages but see dynamic used in C# in some contexts is because of syntax.
Also, why are we having this discussion again :P?
 
@BenjaminGruenbaum I don't say this enough man... you're a fucking genius man. I've barely ever seen you not know something.
 
@BenjaminGruenbaum because of the fact that most of the languages don't use string values to determine code that's being called, for a good reason
 
@RUJordan not know what? I just know promises :P
 
7:03 PM
@BenjaminGruenbaum always a good time to have a discussion about typing
let's talk about Roy
 
Did you read the books about typesystems I gave you?
 
not yet, unfortunately
 
@BenjaminGruenbaum in general I mean. You answers cover 10x more than what the OP asks for, and quite a few of them helped me that you don't even know of :P
 
I've stopped on simply-typed lambda calculus and done a few excercises
 
I promise you a solid discussion about typesystems after you a) actually use JavaScript for a JavaScript common use case (server or web app or something close), and b) read some books about type systems because that makes for an interesting discussion on another subject.
 
7:05 PM
but I am certainly going to sit down to it properly, most probably when the summer holidays start
 
@SomeGuy can't you use the share intent for "phone to chrome"?
 
Today I proved that a compiler can't really verify a type system that's nontrivial by the way as a corollary (which is unrelated but still fun)
 
would be way easier to use
 
@RUJordan I just really hate jQuery promises :D
 
LOL
 
7:05 PM
@BenjaminGruenbaum :F fair enough, I suppose. Altough chances of me writing a "javascript common use case" are rather small.
I am working on a web app, and obviously that means I am writing topological sorting for my visual scripting language compiler.
 
@BartekBanachewicz then the chances of you understanding the advantages or disadvantages of dynamic typing there are slim :D
 
@SomeGuy you should create an un-related app "Phone to Dome".
Spoiler alert: it's slang for involving a penis
 
I don't like jQuery at all... except maybe those beautiful $.ajax methods... Don't judge me!
 
user1596138
@NickDugger Agreed
 
7:07 PM
When you say topological sorting in a room full of people who don't know formal math - you make it sound like something complicated and not just ordering in a tree (well, forest, well dag but w/e)
 
@BenjaminGruenbaum I just like bashing dynamic typing in general. When I said I haven't read the books, it doesn't mean I haven't been reading at all. For example, my understanding of Hildney-Milner is a bit better now.
 
@NickDugger $.ajax sucks, the promise implementation is so bad
 
I like jQuery, I think set operations are the correct way to approach dom, rather than lists.
 
@BartekBanachewicz that's in the book iirc.
 
7:07 PM
@BenjaminGruenbaum you have to excuse me, I like adding colour to what I say :)
 
it's quite easy to promisify.
 
@BenjaminGruenbaum yeah, as I said I put down the book because it's very demanding, and instead was reading tidbits here and there
 
@FlorianMargaine I'd rather use $.ajax when I use old browsers, or use native XHR if I can in modern scenarios.
 
Native JS is beautiful to me. A lot of jQuery scripts that people author, are really messy, and hard to understand. I feel like jQuery teaches poor habits.
 
I found a paper, for example, proving completeness of Milner method. That was quite interesting (altough admittedly a bit too hard for me yet)
 
7:09 PM
I kind of lost faith in Raynos after talking to him a few times, maybe it's just my experience and he's a great guy.
@BartekBanachewicz you should read on unification, that's useful and fun for inference and it's easy to learn and implement.
Not very powerful, but fun.
Also applicable in AI when doing logical reasoning, but that's another bit of fun.
 
@NickDugger ehhhh. jQuery doesn't really teach you anything. Since it's a JavaScript library, they can properly assume you at least are proficient with JavaScript. Sadly, people think jQuery is a JS replacement.
 
@NickDugger native JS is fun, native DOM is ugly.
 
@NickDugger jQuery teaches that there's a function/plugin for everything - you'll never need to do real work
 
Nah, I learned how to (very poorly) use jQuery long before I had any understanding of Native. Most web designers start off that way. It's unfortunate.
 
@FlorianMargaine Could you elaborate?
 
7:11 PM
@NickDugger I humbly disagree.
 
@NickDugger exactly, it's not jQuery's fault that people are completely skipping native.
 
@FlorianMargaine The app does use the share intent
 
I think a fast jump start is better than having to learn it right first, and learning it right should come very fast, but after you understand the system.
 
I know plenty of web designers (not so much developers) that know only jQuery, and have no interest in understanding Native JS. It's how I started off as well.
 
I had unfortunate experiences where I learned solutions before I understood the problems being solved. Never helpful
 
7:12 PM
@RUJordan I find it funny when you call JS native :)
 
@SomeGuy oh. Just read the description on play store, it looks like you have to manually enter the url in the app
 
@BartekBanachewicz its most common compiler compiles directly to assembly, seems pretty native to me.
 
Hmm, I'll add a screenshot of the app picker, I guess
 
@BenjaminGruenbaum oh, interesting. I was thinking about generic blocks, but concluded that they would be hard right now. I am making progress though, even wrote simple codegen already.
@BenjaminGruenbaum oh, that reminded me, have you read the post about ... hmm was it mozilla, who integrated LLVM as the last step of JIT?
 
@BartekBanachewicz yeah, I did, that sounded a bit backwards but interesting nontheless.
Also, not Mozilla
There is only one company making browsers and driving clang and llvm :)
 
7:15 PM
@BartekBanachewicz why's that?
 
a friend just started working at a new company
he sent us a bit of code
elseif($type == 'cb' and $response == 1 and $statu == 'abo_direct' and ($id_offre == 3 or $id_offre == 2 or $id_offre == 18 or $id_offre == 20 or $id_offre == 21 or $id_offre == 28 or $id_offre == 29 or ($id_offre >= 37 and $id_offre <= 44) or $id_offre == 45))
(in PHP)
 
I really used to love PHP... until I used .NET/MVC/C#... now I can't stand PHP. It just always feels so weird.
 
!!s/\.NET\/MVC\/C#/anything else/
 
@SomeKittensUx2666 I really used to love PHP... until I used anything else... now I can't stand PHP. It just always feels so weird. (source)
 
user1596138
7:20 PM
Yeah I didn't have time to call gshark...
 
user1596138
I am now lol
 
@FlorianMargaine if (!$_GET['confirm'] && (!$_GET['changeemail']) && ($userinfoquery['usr']) && ($userinfoquery['FacebookID']!="") && ($userinfoquery['LinkedinID']=="") && (($_COOKIE['skiplinkedin'] !== "true") or ($linkedinskipped !== "true"))) {
almost as long
 
@FlorianMargaine seems legit.
 
@RUJordan remember that I'm mainly a C++ developer. Native means x64 for me :)
@BenjaminGruenbaum right :). It was a very nice read for me.
 
user1596138
I only got voicemail... L-eft a me-ssage. Lame.
 
7:23 PM
@FlorianMargaine :(((
 
@SomeKittensUx2666 at least you don't use and/or
 
@NickDugger well, be prepared since Microsoft are dumping MVC and WebAPI for vNext that feels a lot more like node and they're calling it MVC6
 
@FlorianMargaine Used to, I fixed those.
I got so fed up I'm rewriting the whole app
and now we're proving Zeno's paradox with the rewrite
I should have listened, Uncle Bob! I should have listened!
 
<noscript>
    alert("You must use JavaScript to use this website");
</noscript>
3
HAHAHAHA
oh my god
 
@SomeKittensUx2666 uncle Bob is a tard :D
 
7:25 PM
I'm so sorry
 
refactoring ftw.
 
@FlorianMargaine classic
 
function encrypt($str){
    return $str;
}
hmmm
 
My current career goal is to have a job that isn't full-time fixing a founder's pet project
Unless said founder is me.
 
7:27 PM
@FlorianMargaine that's that new placebo encryption
 
I use Node in my personal time. For work I'll probably have to pick up whatever vNext is.
 
user1596138
@SomeKittensUx2666 Ha
 
I use jquery language in my personal time
 
@NickDugger it actually looks much better than the current version.

jQuery appreciation room

The _best_ programming language. Got a jQuery question, let us...
 
it looks closed
 
7:29 PM
I doubt I'll get to use it (in a professional manner), any time soon. The company I work for is a bit slow... lol
 
in jQuery appreciation room, Apr 1 '13 at 11:52, by Benjamin Gruenbaum
Someone should make jQuery OS
oh lol
 
@NickDugger if you use WebForms, I just wanted you to know I'd rather use PHP4 than WebForms.
 
I don't think you've used PHP4
 
Nah, we just ditched webforms when I got hired, lol.
 
@FlorianMargaine I don't think you've used WebForms.
2
 
7:30 PM
but then again PHP
 
well, true.
 
WebForms doesn't believe HTTP is stateless. It was born before AJAX, so it passes the entire application state on every request to the server. It has one of the most horrible pipelines in the world. Seriously, I learned it and then refused to use it.
You have runat=server attributes on html tags for example.
 
@BenjaminGruenbaum that was me learning perl
 
@BenjaminGruenbaum yup, I know it tries to make http stateful. I don't really know how it does it though
 
7:31 PM
@FlorianMargaine it sends everything on every request.
 
runat="server" everywhere. First time I saw it, I wanted to die, lol
 
@BenjaminGruenbaum woa
function register()
{
    if (!empty($_POST)) {
        $msg = '';
        if ($_POST['user_name']) {
            if ($_POST['user_password_new']) {
                if ($_POST['user_password_new'] === $_POST['user_password_repeat']) {
                    if (strlen($_POST['user_password_new']) > 5) {
                        if (strlen($_POST['user_name']) < 65 && strlen($_POST['user_name']) > 1) {
                            if (preg_match('/^[a-z\d]{2,64}$/i', $_POST['user_name'])) {
                                $user = read_user($_POST['user_name']);
 
It's a completely broken abstraction. PHP is a bad language but a solid abstraction.
 
that's crazy ^
 
BTW
does any of you live in Berlin, coincidentally?
 
7:33 PM
no idea
 
I should come visit Poland some time, I have a passport after all..
 
@copy @ThiefMaster @jAndy ^*2
@BenjaminGruenbaum I have a passport, I don't have money though
although I don't actually need a passport
 
@BenjaminGruenbaum I can give you a room too stay during the summer.
 
I could drive to Berlin, but I'm scared of C++ developers
 
since it's in europe
 
7:33 PM
@FlorianMargaine You live in France, you should travel.
 
@FlorianMargaine my god, that is a monster!
 
user1596138
lol so I go to the pub to pick up my buddies last night. And they insist they aren't drunk. So I said "What's the square root of 9?" -> "Uhh... 3!" -> So I said "What's the square root of 2?" -> ..............
 
@copy we're really haskell developers
 
@FlorianMargaine A Polish one.
 
@SomeKittensUx2666 give me money
 
7:34 PM
@BartekBanachewicz where are you in Poland?
 
I'm in the US, I can travel 3,000 miles to .....the US
 
@BenjaminGruenbaum Gdańsk.
 
@BenjaminGruenbaum you're half polish?
 
@BartekBanachewicz bless you
 
@FlorianMargaine yeah
 
user1596138
7:34 PM
They insist it must be some decimal point between 1 and 2.
 
mother/father?
 
Morning chaps
 
user1596138
Hahahahaha
 
@FlorianMargaine mother, and her family
 
@BenjaminGruenbaum ok
 
7:34 PM
@SomeKittensUx2666 hmm?
 
@phenomnomnominal mornin brah
 
How is the weather there in the summer?
 
function isNegative(number) {
  if (number.match(/^-\d+$/)) {
    return true;
  } else {
    return false;
  }
}
2
 
I actually enjoyed Finland and meeting @Esailija last year.
 
@Jhawins It may be the lack of caffeine talking, but I don't get it?
@FlorianMargaine wow.
 
7:35 PM
I'd also love to come to the c++ room unconference but I won't be able to make it so..
 
@RUJordan Hows it going stud?
 
@BenjaminGruenbaum today was warm enough you could prolly spend a day on the beach. I have a garden too.
 
@FlorianMargaine not enough jQuery.
 
@BenjaminGruenbaum yeah that's why I was asking. I bought plane tickets today.
 
@phenomnomnominal good! Learn me some python. How's that wood I mean work coming?
 
user1596138
7:36 PM
@phenomnomnominal It's an irrational value. But they didn't expect that from just simply a square root. So these 3 drunk bastards are just sitting in the back trying to figure it out thinking they must be wrong because it doesn't add up
 
@BartekBanachewicz something fun for you
#define private public
#include "myclass.hpp"
 
user1596138
> No you dumbass it can't be 1.4
 
@FlorianMargaine hey I did that last week
 
That's actually not a big deal @FlorianMargaine
 
user1596138
Idk I thought it was hilarious. You had to be there.
 
user1596138
7:37 PM
Had to watch them try hahaha
 
I used that in test code, because the class was too big and I wanted to test half of it
Admittedly it was bad design though and said class got splitted later
 
oh right, sounds awesome for testability
 
not really, I mean every class should expose testable interface
 
yeah but not everyone has the chance to refactor
yeah, "should"
 
true enough.
 
7:38 PM
@capybaras Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
eh, let's see if I can get this module loader working after all
I'm armed in two Heinekens
 
@SomeGuy ^
 
function countLines($query)
{
    $res = mysql_query($query);
    $i = 0;
    while ($row = mysql_fetch_assoc($res))
    {
        $i++;
    }

    return $i;
}
oh god
this website is priceless
 
@BenjaminGruenbaum seems legit
 
@FlorianMargaine solid.
 
7:39 PM
@FlorianMargaine looks like the code I wrote in high school
 
I didn't write code in high school
wait, I'm lying
but I wrote maybe 500 lines max
in C
 
I wrote like 35k lines during 3 years
maybe more
 
I started coding my sophomore year of college =x
 
I started coding at the age of 11 or 12
 
anyone decent at d3.js?
 
7:41 PM
I did an irc bot in C, then didn't code for like... 6/7 years or something, until 3rd/4th year of college
 
@Crow yes, the documentation of said library.
 
I don't mean to toot my own horn but for 4 years of programming I think I'm doing rather well :3
 
I dunno I'm terrible
 
I started REAL coding a few months ago. I was just mucking around in HTML/CSS before then. Started that garbage at age 10, though.
 
@BartekBanachewicz you're documentation? Great I can ask you questions like you're google then!
 
7:41 PM
private static bool InvertBool(bool org)
{
	bool returnValue = false;
	if (org)
	{
		returnValue = false;
	}
	if (!org)
	{
		returnValue = true;
	}

	return returnValue;
}
 
Or in rlemon's case, "toot my own slide" I guess would be proper Canukian syntax
 
I... what?
 
I mean a year from now I thought that a year from that time I was fucking terrible
 
user1596138
I started programming like... 22 months ago?
 
7:42 PM
@Jhawins yeah. We know.
 
!!burn
 
@FlorianMargaine Thanks for letting everyone know that you discovered thedailywtf
 
you can't really learn programming in less than 15 years
 
!!undo
 
7:42 PM
@RUJordan That didn't make much sense. Maybe you meant: undo
 
user1596138
Ok...
 
@RUJordan I have no idea what happened:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>


<link rel="stylesheet" href="http://cdn-chat.sstatic.net/chat/css/chat.meta.stackoverflow.com.css?v=3e101a301527">
<link rel="shortcut icon" href="http://cdn.sstatic.net/stackoverflowmeta/img/favicon.ico?v=3e101a301527"><link rel="apple-touch-icon" href="http://cdn.sstatic.net/stackoverflowmeta/img/apple-touch-icon.png?v=3e101a301527"><link rel="search" type="application/opensearchdescription+xml" title="Chat for chat.meta.stackoverflow.com" hre
 
@copy nope, it's actually worse
 
oh god what happened
 
@copy just small bits of code: code-de-porc.tumblr.com
 
7:43 PM
Did... did I break her?
 
user1596138
@FlorianMargaine Wait no. Poo on you I get to say it if everybody else does :P
 
Hey Python bros: how would you define the keyword with?
Google told me "It is similar to the using statement in VB.NET and C#" so I said "What the hell does using do?"
 
@RUJordan I can explain what it does in Javascript
 
user1596138
Waiting on line tally....
 
@JanDvorak JavaScript has a with keyword?
 
7:46 PM
sadly
 
@RUJordan it does
 
@RUJordan using in C# defines a real (for a C++ person) scope, on the boundaries of which destructors (finalizers) fire
 
it kills performance, readability, it rends souls... but it's there.
 
Wheatly is scraping SO, and we're getting banned.
fortunately, chat works
 
user1596138
I have no idea. I know my biggest project is at ~6.5k total
 
7:47 PM
Is it shameful to just use a flat-file system of json files, or should I really, honestly, invest in a database? I've been eyeing CouchDB
 
!!wheatly
 
@Jhawins cloc
 
user1596138
Doesn't seem like that much after all this time haha.
 
@BartekBanachewicz I have next to no idea what that means
 
7:47 PM
@NickDugger what kind of queries do you want to support?
 
user1596138
@SomeKittensUx2666 wc -l
 
@BenjaminGruenbaum Hahaha. 2.9 :D
 
@BartekBanachewicz using is very weak though. C# lets you do actual RAII if you want to.
 
user1596138
I just don't want to go through and round up everything I've written :P
 
@RUJordan when you construct an object that has a hard reference to a resource it owns (a native block of memory, a GPU resource, a network connection), typically you want to clear it up in a reasonable way. using forces such finalization to happen before GC desides it's apt to do.
 
user1596138
7:48 PM
HTML and CSS don't count
 
@BenjaminGruenbaum does it?
 
@BartekBanachewicz C# has value types and structs and real destructors. People just don't use them very much
 
Fortunately chat still works
 
That's a good question, I don't really need to support much. All that I'm doing can be accomplished with my flat JSON files.
 
@BartekBanachewicz so it's like a try/catch block almost?
 
7:48 PM
@BenjaminGruenbaum BTW I wrote a project in C# recently. Wanna see?
 
em... ok?
 
I mean, if you want to take a look... Do you have a Bitbucket account?
 
@RUJordan which language do you know the best?
 
@FlorianMargaine definitely JavaScript
 
user1596138
@SomeKittensUx2666 huh?
 
7:50 PM
@RUJordan more like finally in said block
 
I'm "adept" in PHP and a few classes in Java
 
Ok, let me build an example in node
 
few == 2
Ok
 
@BartekBanachewicz inglor
 
!!> a = 5; with({ a: 3 }) console.log(a);
 
7:51 PM
@copy "undefined" Logged: 3
 
@BenjaminGruenbaum done.
 
@Jhawins i.e. PHP code that copies every profile of every SO person ever.
 
Do you like grape, or strawberry jelly? -- I like neither. -- Alright, you get strawberry jelly.
 
!!afk GoT, be back in an hour.
 
@copy that looks almost like let
 
7:51 PM
It's against SO's ToS, so they've detected it and banned our IP
 
'cept I remember it was fucked in some way, right?
 
@RUJordan hmm, JS absolutely sucks at resource management.
 
with is fucked in many ways, yeah
 
@RUJordan You've done node right?
 
I write let ... in and where in haskell often enough
 
7:52 PM
I do do node
 
mostly where
 
I do node rather mediocrely
 
@RUJordan ever had to dispose of a DB connection? Or other expensive resource?
 
lol
 
he was serious
 
7:53 PM
Yeah, I actually was having async issues because I forgot to close my db connection after a socket request
 
user1596138
@SecondRikudo yeah you were right gonna start an edit war
 
In C++, the philosophy is that everything is a resource, and that resources are instantiated when they are acquired and disposed when their scope dies.
 
@BartekBanachewicz let should be how block scoping works in C, but they probably fucked it up, I don't know
 
basically when you can't access something it dies.
 
7:53 PM
@BenjaminGruenbaum is that short for garbage collection?
 
@RUJordan BenjaminGruenbaum is afk: GoT, be back in an hour.
 
@copy my bad, I meant let .. in from haskell
 
user1596138
@SomeKittensUx2666 ..... What. Why does he want to do that?
 
{
   DB db(conn_string)
   // use db here
}
// here, you have a guarantee that the database connection is disposed
 
user1596138
Your co-worker is a dick and doesn't understand the web hahaha
 
7:54 PM
@RUJordan naah, it's way more powerful
 
@Jhawins How so, and why are you interrupting my Elfen Lied?
 
@RUJordan no garbage collection since variables are resources too, there is no "garbage", the lifetime of variables is deterministic.
 
GC means that sometime somewhere your objects will get freed
 
You know exactly when a variable starts its lifetime and exactly when it ends it.
 
@SomeKittensUx2666 dude I really don't like this Wheatly character.
 
user1596138
7:54 PM
@SecondRikudo stackoverflow.com/questions/13840429/… and... Because I didn't know
 
I'll think of a way to kill you later. Take a pick, Meteor or Vaporization.
 
Well, @BartekBanachewicz can explain RAII, I have to watch the episode ttyl
 
@Jhawins Because we find your public personal info and give it to recruiters.
 
I like Wheatly. New stories every week
 
So much knowledge. SOAK UP BRAIN SOAK UP
 
7:54 PM
@RUJordan you don't say...
 
user1596138
@SomeKittensUx2666 Yeah that's totally against ToS man
 
@RUJordan it's not that hard.
 
@Jhawins Well, all I can say is... You started it :D
 
stackoverflow.com/a/23746107/1216976 <- hacky, insecure solution. Is there a better way?
 
Back to Elfen Lied
 
user1596138
7:55 PM
And in general shitty
 
aaand we're banned again
so I can't edit said answer.
 
@BartekBanachewicz no, but I need to learn things VERY hands on. I'm a bit of a slow learner until it clicks with me
 
user1596138
lol this is part of your business plan??
 
@SomeKittensUx2666 that's horrible :/ kill the OS process listening to the port.
Use the linux fu luke.
 
7:56 PM
@FlorianMargaine holy crap I actually think I understood that
 
@SomeKittensUx2666 it's not the solution itself. It's the fact that you let anyone to tell you to die is horrible.
 
@SomeKittensUx2666 netstat -tulpn | grep :3000
 
Sorry bro, I don't speak C++
 
user1596138
What does your startup do? Well we scrape peoples personal info to compile and send to recruiters. We're kind of like an anti-anti-spam company
 
7:57 PM
@RUJordan in C#, using takes IDisposable objects, so it knows it can call the Dispose method when it's done
 
@JanDvorak Did I not cover that enough in my answer?
 
lsof is probably more useful.
 
you did :-)
 
@Jhawins We also pretend to be running 'big data' things on them, but really that's all fake.
 
@FlorianMargaine that's very cool. Thanks guys for explaining that to me!
 
7:59 PM
@RUJordan It's really not about C++. look again, this example is a bit clearer. Both a and b lifetime is well known; there's no GC.
 
@RUJordan also, in js, it's easier to do this kind of stuff with promises
 
user1596138
Sounds like a fun place to work
 
@StanislavTerleckiy Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
!!s/(anti-){2}//
 
@JanDvorak What does your startup do? Well we scrape peoples personal info to compile and send to recruiters. We're kind of like an spam company (source)
 
7:59 PM
@BartekBanachewicz that's RAII though, not just using
 

« first day (1311 days earlier)      last day (3632 days later) »