« first day (1488 days earlier)      last day (3443 days later) » 

7:04 PM
That's more open than ubuntu imo:
 
7:19 PM
!!are you alive?
 
@towc Yes, absolutely
 
@CapricaSix you should have pinged me 17 mins ago :P
at least, I think
also, according to the pizza guys in the worst scenario the pizza would have arrived 2 mins ago
blame the government
no, I'm not on drugs
at least, I don't think so
 
@towc use something else, this codepen thing is down. Also abusing DOM for that is extremely meh.
 
@towc sorry rlemon refreshed me and in doing so cleared all timers. blame rlemon
 
rlemon = government?
=0
@BartekBanachewicz jsfiddle for displaying minigames is not a good thing, right?
 
7:23 PM
@Zirak does it make sense to store timers in localStorage so refreshing doesn't clear them?
 
also, is it really down? displays just fine for me
@BartekBanachewicz jsfiddle.net/ya9pgtqc/show
 
@CapricaSix (not really)
 
I know that it is bad to use dom for that, but it was just meant to be a quick thing to do for a friend. By no means I'd use that code in production
 
@BenjaminGruenbaum If I can swap Java EE for .Net at work sometime in the next year or two, I won't care what their evil hidden agenda(s) might be, it'll still be worth having real collection classes.
 
@CapricaSix was he also the cause of my pizza delay? >:(
 
7:27 PM
@ssube their agendas are not any more or any less noble than sun's
 
now I'm really upset with you, rlemon
 
@BenjaminGruenbaum Absolutely not, but having C# on all our centos boxen would be the best.
Like actual C# support, not Mono (as decent as it is).
 
Re! Are some of you native-english speakers?
 
@ssube definitely, although I'm really enjoying scala so far and that runs on the JVM
 
@Basj yeah
like, a really small minority
 
7:31 PM
@BenjaminGruenbaum Scala is interesting. I like it, especially conceptually, but have a few fatal complaints (at least for my applications). Thrashing small-object allocations and obscene operator overloading.
 
@ssube what's obscene about it?
 
The extent to which you can do, and chain, them, and how it's encouraged.
Both complaints are rooted in my C/++ days.
 
@towc ok :) Could you just check these few lines of text : pastebin.com/SbgxQpRG, I had to translate a french exercise into english... Are there some grammar mistakes ?
 
@Basj here we don't do homework :P
 
@towc It's not a homework, I'm the teacher ;) and very rarely, I have to translate exercises into english. I did it, but I wanted to be sure if there are no mistakes
 
7:33 PM
@BenjaminGruenbaum
 
also, I'm not reliable when it comes to english. I'm not one of them
 
Don't get me wrong, I like overloading in general.
Scala just encourages overloading in ways that don't match how the operator originally worked for primitives.
 
@ssube operator overloading is a lot worse in C++, in scala it's just a function and the semantics are simpler.
You can also define your own operators
 
var list = ["Bob", "george", "ass"];
var index = [0, 1, 2];

function player(targetList, indices) {
this.targetList = targetList;
this.indices = indices;
}

var player1 = new player(list, index);
var player2 = new player(list, index);

player2.targetList.splice(1, 1);

console.log(player1.targetList);
 
@BenjaminGruenbaum It's a method in C++. Is it a free function in scala, or method as well?
 
7:35 PM
Why is player1's targetList being spliced from player2's mutation?
function derp(herp) {
    this.x = herp;
}
var a = new derp(1);
var b = new derp(2);

b.x = 4;
 
@towc never mind. If anyone can look at the words in the pastebin I pasted, I'd be happy to know if the words are english-correct
 
And yet a.x here remains unmutated?
 
@Basj what do you mean by the beginning of 1997 until the beginning of 1999 ?
 
@ssube depends on how you define it, but you can also define your own. I agree that it's abuse prone - but I don't think it's more abuse prone than plain old functions.
On an unrelated note - @Shog9 I'm not getting any swag am I :(?
 
@towc average % of households with a computer on the time period 01.01.1997 until 01.01.1999
 
7:36 PM
@SterlingArcher Well, player1.targetList is also unmutated
 
Not true
 
@BenjaminGruenbaum if I said you were, then you are - we're kinda backlogged though
 
@Basj you mean the % added or the % at each of those moments?
 
@BenjaminGruenbaum Agreed, although it can be harder to read. Again, huge fan of the concept of operator overloading (makes perfect sense for string cat), but it gets... bad.
 
@SterlingArcher Yes, true
 
7:37 PM
 
The array has mutated
 
@Shog9 from June :D
 
but the property hasn't
 
I don't get it
 
There's a difference between assignment and modification
 
7:38 PM
@SterlingArcher and you never will!
 
@towc i mean for ex, in Jan 97 , there are 35%, in Feb 97, there are 35,1%, in Aug 97, there are 36.2%, etc. until Dec 98, 39.1%, ==> the students will have to computer the average % on this time period
 
But why will the array mutate for every object instance?
 
@Basj oh! the average % from 1997 to 1999?
 
because it's just an array
 
Shouldn't it only mutate for player2's instance?
 
7:39 PM
it can't know whether or not to mutate depending on what object accesses it
 
@ssube it's not just string cat, doing .then all over JS because we can't create a >>= operator and that we can't implement operators and constructs ourselves is very limiting. We can't create DSLs easily and it's frustrating - Scala was very freeing in that regard.
 
@towc yes
 
@KendallFrey I don't follow
 
@Basj then we use from...to, not since...until
 
Is it because it's the same array being used as a parameter?
 
7:39 PM
at least, this is what I usually hear
 
Have you noticed the key difference between your example and your original? assignment
 
@towc oh ok, thanks !
 
so: from the beginning of 1997 to the beginning of 1999
other than that it all seems pretty understandable, but it's better if someone else looks at it. As I said, I'm not reliable when it comes to english
 
So in order to remain abstracted, you'd have to basically make a method that re-assigns a modified temp array?
 
also...
 
7:41 PM
@SterlingArcher wat
 
@BenjaminGruenbaum It is amusing how everything being a hash map can limit you so well.
 
PIZZA GUY YOU'RE 20 F***ING MINS LATE!
I hope they wrote down the correct adress
 
@towc thanks a lot !
 
If you want different objects to have separate lists, give them separate lists, not the same one
 
@KendallFrey if you wanted to splice(1,1) for player2 only, you'd have to more or less re-assign the new array. player2.targetList = player2.targetList.splice(1,1);?
 
7:42 PM
@ssube JS doesn't sport hash maps as far as I know. No collections in JS except arrays. If you're talking about objects those are hardly hash maps (both conceptually and in practice) and they're horrible at using them as such (only string keys for one).
 
If you want me to speak plainly, well, shit, because I don't feel like it today
@SterlingArcher that would of course still do the same thing
 
Because you're still mutating the same array?
 
hence why mutator methods are nasty
yes, that's it
 
user1596138
@towc I hope he's coming to me instead
 
phrasing
 
7:43 PM
So then you could assign it to a temp array?
 
The word "it" should be banned
 
@BenjaminGruenbaum For most purposes, you can implement JS with objects being maps, and treat them as such in the language. Specifically, in that almost any x.y can become x["y"], and then things get mushy.
 
var temp = player2.targetList;
player2.targetList = temp.splice(1,1);
 
You'd think if x.y is equivalent to x["y"], x += could be x["operator+="], but...
 
7:44 PM
Since that's a new list, it's not mutating the original array?
 
It appears you don't understand reference types very well
yes, it's mutating the same array
 
Don't tell me
 
No idea what that would do to the parsers, though.
 
Because temp is now just a reference to targetList
 
there's only one array there, and you're mutating it
so it gets mutated
 
7:44 PM
@ssube Ruby: x = x.send("+", ...
 
and is
and stuff
 
So there's no way around this besides using a separate list?
 
@Jhawins just arrived :P
 
@ssube generally I agree, it's not just a very good or elegant solution. Luckily most JS code isn't very complicated and doesn't require very clever collections.
 
user1596138
@SterlingArcher umm
 
7:45 PM
@SterlingArcher At some point you will obviously need a second array instance, so might as well do it from the get go
 
That seems so... inefficient somehow
 
@BenjaminGruenbaum True. If it did work that way, JS would essentially be Lua, which isn't the worst thing (nor the best).
 
At least not being able to assign a temp array var
 
The new APIs leaking strongly-typed collections is an interesting loss of abstraction, though.
 
If you want a copy of an array, then do exactly that. Copy it
 
user1596138
7:47 PM
I too sometimes get "inefficient" confused with "it feels ugly"
 
user1596138
jk idk what you're talking about
 
Think of it as a shopping list taped to your fridge
If you stroke something off the list, anyone else that uses that list will see the item stroked off
Ideally, everyone should have their own list
 
@ssube I'd work with Lua, I think it's pretty decent. Although to be fair I find JS a pretty decent language for what I use it for. It's just not a very good general purpose language.
 
@BenjaminGruenbaum what about Fay?
 
@KendallFrey that was a brilliant metaphor, it just clicked for me
 
7:50 PM
@JanDvorak I don't know Fay, I wouldn't use Haskell for what JS does.
 
@SterlingArcher wow, I don't come up with brilliant metaphors very often
 
I know a lot of people hate state, but it's very easy to reason about in small amounts compared to immutability - function signatures are much simpler etc.
 
Since list was declared outside of the player object, player and player2 both reference list, and now when list is mutated, both players are effected
 
Actually, I'm pretty good at metaphors, just rubbish at explaining.
 
@BenjaminGruenbaum State is useful when you're working, more or less, in a single thread. Single-user, at least.
Which is almost exactly why we use JS on the front-end and Scala on the back at work.
 
7:52 PM
@ssube well, the problem with not having mutable state is that the alternative can be hard to reason about too.
@ssube also - you can't run scala on the frontend :P
 
Isn't that like saying I'm running ColdFusion on the front end?
(Which is bogus bc server language) <.<
 
@BenjaminGruenbaum It is, very much like graphics, where you have many inputs and a single output, and have to flip the logic to handle that.
 
I'm actually enjoying scala, I would not use ColdFusion.
@ssube even in scala, I don't write pure code. when I do I usually regret it :P
 
No side-effects is an interesting concept, almost as hard to get your head around at first as pointers and async i/o.
 
The only language I write 'pure' code in is Haskell, but it's only because I have no choice.
 
7:55 PM
@BenjaminGruenbaum do you know much about ColdFusion?
It has it's ups, and downs
 
@BenjaminGruenbaum I've taken a run at pure FP about half a dozen times now, and this time some of it might be sticking
mixing my metaphors
 
Why don't you like pure code?
 
Mostly downs, but some ups are pretty cool
 
@ssube I think it mostly sounds intimidating, all it generally does is turn var t = obj.doA() where doA returns an 'A' into var (obj, t) = obj.doA() where doA doesn't change the state of obj but returns a mutated obj instead (and t is still an A). I find multithreading a lot more confusing :P
 
@towc I don't like this attitude
 
7:56 PM
@SterlingArcher honestly? No, I don't. I haven't written ColdFusion code in 10 years.
 
I've been using it for about a year now, and here's a small list
 
@TomW I know that feeling.
 
@BenjaminGruenbaum is this some offspawn of php
let's talk about some interesting PLs today
 
watched a couple of Brian Beckman vids about monads, I think I sort of get what the point is
 
12
Q: JS Room Monthly Challenge Voting

Benjamin GruenbaumWe at the JS chat room want to throw short monthly challenges where everyone gets the same task in a new language/library/framework. The idea is to learn a new technology, code something fun and share knowledge, opinions and experience. The scope is meant to be rather small. It's something one s...

 
7:58 PM
like Terra
 
Pros: looping queries and lists is very easy. Great compatibility with excel sheets and pdfs, etc. Cons: 1 indexed, Structures are confusing, and functions are a massive overhead to write and call.
 
couldn't recreate one at this point
 
Monads = programmable semicolons
 
@SterlingArcher name one thing that's better/easier with it than C#?
 
@BenjaminGruenbaum funny
@JanDvorak after giving it some thought, I dislike this definition
 
7:59 PM
I would, but I don't know C#
 
@TomW so? What's the point?
 
@BenjaminGruenbaum I got multithreading (and thread safety) real quick when I started doing graphics libs. Every game a) does it wrong, b) ignores "this is not thread safe", and c) calls everything all at once.
 
@SterlingArcher oh lol.
 
@BartekBanachewicz How do you define monads, then?
 
I took a tutorial course 3 years ago, but it was more focused on end user GUI designing
 
7:59 PM
@SterlingArcher .NET is opensource, everyone should know C# now
 
@BartekBanachewicz well, erm...
 
@ssube lol, if everyone is doing something wrong then the problem isn't with everyone usually :D
 

« first day (1488 days earlier)      last day (3443 days later) »