« first day (1122 days earlier)      last day (3809 days later) » 

7:00 PM
meh, that's not really that relevant
 
JavaScript makes it trivial to have contexts talk to each other. Simple, straightforward mutable state that plays nice with eventing makes writing IO code and gui code very easy.
 
but in general, Haskell is by far superior language to Javascript right now and what it probably will ever be.
@BenjaminGruenbaum And then it fucks over because of the bugs introduced in the process.
 
@BartekBanachewicz It's not superior, it's different. It solves different problems. I'd like to code in Haskell because I find it a lot of fun but I don't think it's somehow better inherently.
 
@BenjaminGruenbaum if you weigh the benefits vs flaws in both of them, I can't really see how one could prefer JS
 
@BartekBanachewicz Not if you know your shit. I don't really have interesting bugs that a strong type system or side effects cause.
@BartekBanachewicz I have a hard time with the term "better language", every language has a domain of problems it tries to solve - there are plenty of places I'd pick Haskell over JS and plenty of placed I'd pick JS over Haskell.
 
7:02 PM
@BenjaminGruenbaum Statement that says "I don't make mistakes" pretty much lost you credibility there.
@BenjaminGruenbaum I fail to see a place where I would want to pick JS over Haskell, really.
 
@BartekBanachewicz I make mistakes, they're just not something a type system would easily verify - it's logic.
 
@BenjaminGruenbaum Are you trying to say that type system can't help you in avoiding logic errors?
 
0
Q: Theme customizer live preview JS- Trying to bind to an html image url without luck

user1632018I am having a little trouble binding the theme customizer live preview javascript to an HTML <img src>- more specifically it is my logo. Here how the html looks on the page(which is fine and dandy): <a class="footerlogo" href="#top"><img src="<?php echo mytheme_theme_mod( 'footer_logo' ); ?>" /><...

 
You rarely spend over two seconds debugging a problem caused by the type system. The great thing about the type system is that it forces your application to make some sort of sense.
 
@BenjaminGruenbaum you haven't used statically-typed languages much, have you?
 
7:04 PM
The compiler to enforcing that for you is a nice plus, but it's not the goal.
 
@BenjaminGruenbaum if something doesn't compile, it doesn't make sense
 
@BartekBanachewicz I use them every day. I probably write more C# than JS.
 
JS will run code that doesn't make sense
how's that better?
 
@BartekBanachewicz Usually if there is a logic error in that code - it compiles anyway. Those are the errors that are hard to catch.
 
How's running code that doesn't make sense helpful in any way?
 
7:05 PM
@BartekBanachewicz doesn't make sense? it makes perfect sense to me :D
 
If you have a reference error or naming error - even if you don't use the obvious tools to catch that - it takes you a second to debug.
 
@BenjaminGruenbaum Also that's usually because people can't use types to express meaning.
@BenjaminGruenbaum that's a bold statement which you can neither prove nor shouldn't rely on anyway
 
@BartekBanachewicz It's damn hard because typing is behavioral by nature - otherwise it doesn't make sense and that's something compilers can't really figure out well.
@BartekBanachewicz Have you ever had a reference error or naming error cause a long bug in JS?
 
@rlemon I care! What will you write about?
 
This is a room of people who have been doing JS for years. has anyone here ever had a naming/reference bug that took more than a few seconds to debug?
 
7:06 PM
@BenjaminGruenbaum I had considerable problems that took long to debug that could be solved easily by more comprehensive static analysis, in dynamically typed languages in general
 
Hey, that's the Terraria animation!
 
@BenjaminGruenbaum also static typing is way more than "naming/reference" problems, and you should know that already.
 
@BenjaminGruenbaum I have had naming issues
 
@BartekBanachewicz Of course, that was an example of something C# would do for me.
 
7:07 PM
but they were because i'm a moron
 
@BenjaminGruenbaum Maybe before naming conventions
 
@BenjaminGruenbaum Totally. Mostly when I think I'm modifying one variable, and I'm actually messing with a different one.
 
@BenjaminGruenbaum Really? I didn't know the room was for only people who are experienced.
 
large application, VERY close but not the same global variable names
 
@SomeKittens that's not a naming error :P
 
7:08 PM
@BenjaminGruenbaum Yeah
 
@copy when?
 
@nderscore that would fail verification in a language with more static analysis
 
@BenjaminGruenbaum In my opinion, it's a naming error if it confuses the programmer like that.
 
@BartekBanachewicz Behavior is extremely hard to convey in a type system and conveying structure is pretty worthless. Not worrying about something that doesn't really help you all that much makes me code much faster.
@SomeKittens I'll rephrase, it's not something that a clever checker would solve.
 
I think I used Math.LOG2 or so, then it became NaN and propagated in a weird way
 
7:09 PM
I never write bugs personally, so I don't have an issue with dynamically typed languages...
 
@BenjaminGruenbaum I think you've just openly admitted "I can't use static typing"
Or I've read that as that.
 
But also, if it gets type-checked, I know the fault before running the program and actually reaching that part of the code
 
In general, dynamic languages tend to work acceptably in small applications.
However, with WebGL out, games will become much bigger.
And without static analysis all I can see is a huge mess.
and that has been proven in the industry years before Javascript was even born
 
@BartekBanachewicz No, I admitted "I can't use static typing to enforce behavior" - that's completely different. No one can really enforce behavior with static typing. Languages just don't let you do that. Well, in EIFFEL you can - but that's constraints and it's different.
 
@BenjaminGruenbaum What about Haskell's type constraints?
What about statically typed units and conversion?
What about C++ metaprogramming?
 
7:12 PM
@BartekBanachewicz They're nice, and I started this conversation with "Haskell comes close" but it's not there and it slows me down for most of what I need.
 
I don't know if I'm the only one, but whether I am in static or dynamic, bugs I have are never related to types. I write "static type" in js anyway...
 
@BartekBanachewicz Hah, no, not at all, not even close.
 
@BenjaminGruenbaum you know it's Turing-complete, right?
 
@BartekBanachewicz So what? That's meaningless in that regard...
 
CSS3 is turing complete
 
7:13 PM
A is turing complete and A can verify behavioral typing are not the same thing. Also what Florian said.
 
@BenjaminGruenbaum because it won't allow you to run code that doesn't make sense?
I can't possibly imagine Haskell code being really larger in terms of LoC
 
Conway's Game of Life is turing complete
 
so you should type it roughly as fast.
 
^ *3 show off
 
7:14 PM
if you have any more ideas feel free to comment
 
Where's the "slowing me down" factor here?
 
@BartekBanachewicz Seriously? Have you coded I/O centric things like GUI or servers for very long?
 
0
Q: Enqueue Wordpress plugin scripts below all other JS

SheixtI am developing a simple Wordpress app but I am having an issue as all of the plugin scripts are rendered before those which are enqueued in my functions.php. Here is a sample section of the functions.php: function my_scripts() { wp_register_script('app-js', get_template_directory_uri() . '...

 
but you know, that's really not all that important
writing code is about 20% of the work related with it
 
No, it's not - I was just wondering.
 
7:16 PM
what about reading it?
what about maintaining it?
 
The way a problem is approached is different, iterations are usually much faster, changes are much faster, and things need to compose.
JS code can be very maintainable and readable, you just need programmers that are not bad.
Those are hard to find :/
 
Honestly wondering: isn't IO monad just a way to say "I'm doing everything I can to work around doing something as simple as IO"?
 
@FlorianMargaine an IO Monad is a way to separate impure and pure parts of the program
so, umm, not at all.
 
I don't know much haskell. Just went through the basics. So no bias there.
 
@BenjaminGruenbaum that could be said about any language and thus is meaningless blabber.
 
7:17 PM
Woah, I wrote a page that doesn't need to be aware of document ready or even put scripts in the bottom, things just run when they can via promises. Neeeeeaaaaat.
 
Fact: due to less requirements in static analysis, more JS code will be badly written and hardly maintainable.
Fact: Most of Js programs are one-line hacks.
 
@Bartek hmmm yeah, what I said.
 
@BartekBanachewicz Well, this argument is getting me nowhere. I did some Haskell and I did some JS and I'd take JS over Haskell for things I do in JS any day. There are lots of things I'd do in Haskell but certainly not everything.
There is a reason Haskell hasn't exactly taken over the world of programming in a storm.
 
My point is, things that are done in JS now are overgrowing it.
@BenjaminGruenbaum because imperative programming is being taught instead of functional?
 
No, it's not. You can create very simple, maintainable and scalable JS apps easy.
 
7:19 PM
@BenjaminGruenbaum exactly, simple. It just doesn't scale.
 
@BartekBanachewicz In the university I studied they only recently switched from FP back to "imperative" languages like Python.
Functional programming isn't new.
 
@BenjaminGruenbaum Universities are terrible, so I don't see how's that meaningful
 
It's very useful for many things, just not everything.
 
@BenjaminGruenbaum I'm aware of that.
@BenjaminGruenbaum It's way better for a lot of things that are commonly solved nowadays using imperative programming
 
A big program is simply many simple programs. If you're doing it another way, in any language, then you're doing it wrong.
 
7:20 PM
NO! It's useful for everything!! la la la la
stahp
 
@BartekBanachewicz People scale big JS apps every day... they don't really complain much. It's really a pleasure to work with for me.
 
@FlorianMargaine No, a big program is a big program.
 
HAMMAHTIME!
 
@BartekBanachewicz Of course there are!
 
A big program is unmaintainable in every language.
 
7:21 PM
if you deny the fact that a big program is a big program, I don't see what I can say
 
That has nothing to do with the type system though.
 
@FlorianMargaine however they are usually more maintainable in ones over the others
@BenjaminGruenbaum actually it does.
 
@BartekBanachewicz Because all functional languages are Haskell...
 
@BenjaminGruenbaum Oh I hear a lot of complaints from JS developers actually
 
Not really. Anyway I'm off
 
7:22 PM
Imho, maintainability needs to be done at the IDE
 
@BenjaminGruenbaum Haskell is irrelevant.
FACT Static typing helps maintain large codebases.
 
@BartekBanachewicz Yeah, because most developers approach JS and expect it to behave like some other language , JS typing, idiomatic JS and so on are really hard.
 
<3js
 
@BenjaminGruenbaum and they rarely make sense, unfortunately.
But hey, there's actually a bunch of reasonable people trying to do something about it, no?
 
@BartekBanachewicz s/static typing/tests/ - you can verify the behavior of your code easily with unit tests, functional tests, integration tests and so on. People just spend the time writing that in JS and it provides much better coverage from my experience.
 
7:23 PM
@BenjaminGruenbaum that's a whole different thing
 
It is, and still.
 
and you still haven't told me why it's really faster to code in Js than in a statically typed language
 
@BartekBanachewicz It makes sense, it's just hard to get. It takes a long time to understand how to structure JS code well and JS is everywhere so you get a lot of shitty programmers writing shitty code in JS.
 
@BenjaminGruenbaum I am not ranting pointlessly. I am not trying to bash it mindlessly. But when I'm saying that its scoping is utterly dumb, I mean it.
and there's way more reasonable people on the world that will agree with me than not.
 
@BartekBanachewicz Because I worry about typing once in every iteration or feature addition when I design it and then I don't have to worry about it at all - there is no "oh I forgot this type related thing here" overhead.
 
7:25 PM
@BenjaminGruenbaum you can't forget typing, that's the point
you create a program structure with types.
 
@BartekBanachewicz Still, I feel like your argument is "it works differently, in a paradigm I'm new in so I assume it's worse".
 
@BenjaminGruenbaum no, my argument "the paradigm is bad"
which is followed by "so bad that no other language would ever do anything that stupid"
 
@BartekBanachewicz Static languages let you do that, that's the whole case. You can't really enforce behavior well.
@BartekBanachewicz Which is why and more code is written in dynamic languages...
 
@BenjaminGruenbaum any data on that?
 
I'd love to have better typing in JS, but that doesn't mean a strong type system. There are lot of other things I'd change.
 
7:27 PM
@BenjaminGruenbaum but you can enforce way more sense in the code you're writing
I can't add a number and a picture.
 
@BartekBanachewicz A lot of anecdotes (github repos/universities teaching/etc) - nothing I really trust but it's the sense I keep getting.
 
JS will allow me to compare apples to oranges and to add 1 to a picture of monkey.
 
@BartekBanachewicz Countless people have written JavaScript and gone on to lead normal lives.
 
That's the thing, in the eyes of JS what defines apples and oranges is the way they behave.
 
@BenjaminGruenbaum "my sense I keep getting tells me more code is written in dynamic languages"
 
7:28 PM
If I call a type "Apple" that's worthless - I'd like the program to tell me what an apple is
 
@BenjaminGruenbaum so if, by chance, something successfully disguises as an Apple, JS will happily execute the code
 
@BartekBanachewicz No, if something behaves like an apple it is an apple in the eyes of JS and for all meanings.
 
@BartekBanachewicz sometimes I like to compare apples and oranges. as long as I understand how they are compared and know what result to expect, there's nothing wrong.
 
much want
 
@nderscore and that's what you tell the compiler in the types
 
7:30 PM
Substitutability is a principle in object-oriented programming. It states that, in a computer program, if S is a subtype of T, then objects of type T may be replaced with objects of type S (i.e., objects of type S may be substituted for objects of type T) without altering any of the desirable properties of that program (correctness, task performed, etc.). More formally, the Liskov substitution principle (LSP) is a particular definition of a subtyping relation, called (strong) behavioral subtyping, that was initially introduced by Barbara Liskov in a 1987 conference keynote address entitl...
 
I know what LSP is TYVM
it's used in class hierarchies.
with static typing.
 
But they don't enforce it
 
:goes back to PHP :(:
 
Nor do they enforce behavioral typing - in any way.
They give you an illusion of it, you feel safe.
 
@BenjaminGruenbaum so you telling me you want the interpreter to tell you what you can't tell to the compiler?
@BenjaminGruenbaum safer
 
7:31 PM
@BartekBanachewicz Fine, feel safer.
 
> You can't tell the compiler how an Apple should behave in types
> Interpreter will tell me how an Apple should behave
that's, um, interesting.
oh wait a second that's complete BS.
 
@BartekBanachewicz That's a huge strawman and not what I said at all...
What interpreter?
I'm telling you that I expect everything that is an apple to behave like an apple.
 
var seconds = 5; //seconds
var minutes = 10;
print (minutes + seconds);
 
@BartekBanachewicz That's not the syntax for value types, and the syntax for value types is not implemented in browsers yet.
 
auto seconds = 5_s;
auto minutes = 10_m;
print (minutes + seconds);
 
7:33 PM
Those are just literals...
 
@BenjaminGruenbaum now tell me what will first and second print
 
The compiler didn't save you there. Those are not really types either. Moreover your example does not illustrate typing.
 
@BenjaminGruenbaum they are.
 
You just gave variables names, that's meaningless.
 
@BenjaminGruenbaum it does :)
I mean UDLs are syntactic sugar, so well
auto seconds = Seconds(5);
auto minutes = Minutes(10);
print (minutes + seconds);
 
7:35 PM
Right, with value types JS will let you do
 
but right now it doesn't.
 
let [seconds,minutes] = [Seconds(5),Minutes(10)];
console.log(minutes+seconds);
 
!!weather kitchener ontario
 
@rlemon Kitchener: 2.36C (275.51K), moderate rain, mist
 
@BenjaminGruenbaum cute.
 
7:36 PM
Right, because in your example you only have numbers... there is no typing. All your behavior is using the plus operator.
 
@BenjaminGruenbaum Excuse me?
Minutes and Seconds are types.
 
The + operator doesn't have a nice way to overwrite its behavior in browser JS yet.
 
@BenjaminGruenbaum poor JS, then?
 
I can define a seconds type and define a plus action on it and do seconds.plus(minutes).
That'd just look really bad.
Not having value types in browser JS is sucky. No argument there.
 
foo :: String -> [String]
foo = words

foo "lol omg lol"
var foo = words;

foo(IMAGE_OF_A_MONKEY());
 
7:38 PM
function Seconds(n){
    this.n = n;
}
Seconds.prototype.valueOf = function(){
    return this.n*1000;
}
function Minutes(n){
    this.n = n;
}
Minutes.prototype.valueOf = function(){
    return this.n*1000*60;
}
I can do that in browser JS and do Minutes(10)+Seconds(5) but that'd really suck, and is not how you write JS.
 
yea
you write it like this:
 
@rlemon waiting eagerly
 
$.plus($.seconds(n), $.minutes(n));
^ that is JS
 
@BartekBanachewicz var foo = words; Why wrap it :P?
@rlemon The jQuery arithmetic plugin again :P?
 
didn't you hear? they are making that standard
 
7:40 PM
Also, why image of monkey global etc?
If you don't like the bracket syntax you can use CoffeeScript, it's pretty much JS but with comprehensions, arrows etc. It's a lot less verbose than TypeScript.
 
@BenjaminGruenbaum why not, interpreter doesn't mind
 
@BenjaminGruenbaum performance. they needed a million monkeys and this way they just clone the global ref.
 
@rlemon haha
 
hello how are guys
?
 
Will ES6 have a way to reasonably overload operators?
 
7:41 PM
@BartekBanachewicz The thing is - a good compiler and good static analysis are not an excuse to write bad code.
 
guys are fine. The ladies are angry at the moment but no one understands why. every time we ask they just sigh and tell us everything is just fine!
 
@BenjaminGruenbaum they simply won't allow you to
 
@BartekBanachewicz Yes, it's ES7 - like what I showed you with seconds/minutes - lemme find a presentation on that.
 
:v
Oh I see I can start coding in JS around 2020 then
 
@BartekBanachewicz Only for browsers, server-side JS gets stuff a lot faster and there are ES6-ES5 transpilers.
 
7:43 PM
Well, I'll do whatever I can to get ASM.js reasonable support by 2020
and then we can use any language we like and end the monopoly
@BenjaminGruenbaum But all that is very interesting anyway.
 
Haha, you should try writing JS for a while, it's a lot nicer than it seems originally.
 
@BenjaminGruenbaum I think that TypeScript will work for me well just now. And it has cooler lambdas :)
 
You just have to get used to it. I have the "pleasure" to work with lots of other languages too. I like JS best.
 
Format your code please.
 
@rlemon thanks
 
7:44 PM
@BartekBanachewicz All the cool stuff you see in TS is just ES6 stuff :P Anyway, this argument isn't really going anywhere.
 
@BenjaminGruenbaum I thought I like C++ and Lua until I've learned about Haskell
 
I don't like C++, I like Lua and I like Haskell. LYAH was an eye opening experience.
Just because I like it doesn't mean I think it's a silver bullet.
 
@BenjaminGruenbaum it is, at least for me. I've learned a lot of things, even if it doesn't show. :)
 
I absolutely LOVE js
 
0
Q: Isometric Movement in Javascript In the DOM

deepI am creating a game using Javascript. I am not using the HTML5 Canvas Element. The game requires both side view controlles, and Isometric controls, hence the movementMode variable. I have got the specific angles, but I am stuck on an aspect of this. https://chillibyte.makes.org/thimble/movemen...

 
7:45 PM
fav language ++
 
@BartekBanachewicz cool.
 
@Feeds DEEP IS NOT ALLOWED IN HERE FFS!!!!!
6
 
@BartekBanachewicz Like "walking into a room filled with people who really like a language, and talking about how much it sucks might not be the best decision"?
 
@Feeds oh god him again
@Retsam why, I would still drop "PHP sucks" in PHP room anyday
 
@BartekBanachewicz I do that any day.
 
7:47 PM
@BartekBanachewicz There's a difference between something being "true" and "a good decision"
 
@rlemon I like how we know it's him without needing to click on it
 
Seriously, right now
in PHP, 7 secs ago, by Benjamin Gruenbaum
PHP sucks.
 
his question is basically calculating rise and run given an angle and length?
 
Also, I think JS sucks in many ways, it has a lot of room to improve. I just don't think Haskell is the solution.
 
tl;dr I just skimmed it
 
7:48 PM
any body tell how can i resolve my tap issue
 
switch the tap with a no length swipe and you're set
 
and for taphold
 
no length swipe and hold
duh....
 
it will work for dynamic content
 
no only iContent
wait. let me get my sign.
 
7:52 PM
i working for this from 2 days but enable to resolve issue .
plz help me guys
 
!!/slidepoop
 
Mar 13 at 1:40, by rlemon
(Random Fact, when rlemon was 13 he pooped on a slide. he isn't proud of it, but he felt it was time to confess. I'm sorry slide.)
 
@rlemon 3D rotation in canvas? Awesome! Let me know when you write that one!
 
I don't care if english is not your first language. plz just makes you look like a retard.
 
@Shailendrsingh did you post a question to SO?
 
7:54 PM
@SomeGuy well I have kinda started figuring out how the transform matrix works.
 
no i did not
 
when all else fails, turn it off and then back on again
 
I need to really get into it before I write that one
 
posted on November 11, 2013 by ericbidelman

HTML Imports allows you to include HTML/CSS/JS in other HTML documents.

 
@rlemon Let me know when you do :p I haven't wrapped my head around those yet
 
7:54 PM
Does anyone agree with me when i say that having a slideshow in a route it a bad idea?
 
@SomeGuy they suck :P
 
so when you press the back button it slides back through the images...
 
you can see my feeble first use of them in the Confetti stuff
 
@Shailendrsingh I suggest you add a question to SO.
 
@rlemon Have you tried drawing a triangle with WebGL?
 
7:55 PM
no
 
@connor.js I hate that.
 
It feels like you're writing it in Assembly
 
I haven't touched WebGL yet
 
ok wait i am going to post.
 
but when I do! 3d slide poop! ANIMATED!
 
7:55 PM
@Shailendrsingh afterwards, please don't post the question here. Let SO deal with it.
 
PUSH EAX
NOP
NOP
NOP
RETN
 
Lesson 1
 
50 90 90 90 c2
 
7:57 PM
I just know 0x90 :<
 
he's a nice guy?
 
I can almost do the whole instruction set without looking it up
 
@copy, I love you
0x90 is the only opcode I remember :(
 
Probably as useful as learning digits of pi
 
I need to brush up on my x86 - it's been a while
 
7:58 PM
did you pick them up while writing emulator
 
@nderscore Back off
 
@BadgerGirl learn to share!
 
I want the brain
 
@rlemon No, penis and brain are taken. You can have a lock of hair.
 
@Esailija Yeah
 

« first day (1122 days earlier)      last day (3809 days later) »