« first day (1599 days earlier)      last day (3343 days later) » 

12:00 AM
@crl my first move: "what the fuck"
it's not the right size :P
 
@rlemon awesome comedy, watched the whole series trice
 
crl
you can change it, wait
 
"Uncaught TypeError: Cannot read property '3' of undefined"
 
I've seen it a handful of times. watched it as a kid. haven't seen it is years tho
so this is nice to have it on netflix
 
on the line if (node.grid[x2[0]][x2[1]]===0){
 
12:02 AM
@crl it's changing by itself, wtf
it just reset everything in the middle of a game
 
@david is x2[0] or x2[1] 3?
 
crl
@KendallFrey editing the code, but I'll put an input to select the size
 
@rlemon I am watching MASH as well
 
crl
@david thanks, I'll check
 
Oh nvm that wasnt in your code
 
12:04 AM
@Matt sweet
what ep
 
S2 I think Esp7
They're under a sniper attack
 
s2e11 is great
 
I'm on e10
e11 is next :)
 
i'm on s03e09 right now
 
cool. I enjoy MASH but never watched the whole series
I hate the majors. I never liked them
 
12:06 AM
ahaha houlihan gets better
 
I enjoyed the series more once frank left
 
yea frank is a bitch
 
Mhm, I like houlihan more when frank left. Frank is just the one I really hate
 
always yellin
 
A pussy
Grr... This MathJax is annoying me >.>
 
12:13 AM
I have a distro with nothing installed
I want an http server
what's the easiest way to serve 'hello world' to http requests?
When I mean nothing installed - I mean I can echo into files, surprisingly wget is installed.
nano/vim/emacs are not :D
 
netcat
 
$ ncat
sh: ncat: not found
 
nc or netcat
 
$ netcat
sh: netcat: not found
hmm, I guess I can make a binary on a computer and wget that.
 
12:17 AM
and... we have netcat, thanks :)
 
12:37 AM
Hey all :)
 
Hey
 
How is life this monday nighit :)
 
I am working on a projects that has 2 routes pointed to the same controller, the controller has an if statement that sets its mode based on the title of the page after routing, and the template/view thing has ng-ifs spread through it that change what it does based on that mode flag
I'm pretty sure that's not the right way to do it
 
What are you trying to do?
Like what is it that you're trying to accomplish
 
12:44 AM
i want to add a 3rd route
but the existing system is crazy
so it's not as easy as it should be
 
Bigger picture
 
i sure as hell am not going to put a 3rd mode in
with nested ifs
 
Can anyone explain to me why I'm getting January 17,1970 from a Unix Timestamp of

OHH MILLISECONDS
sorry, bye
 
@david It sounds like an xy problem
 
it's not
 
12:46 AM
What's the problem you're trying to solve by having multiple routes and 1 controller
 
i'm not, i didn't build this
someone else decided to have multiple routes pointing to one controller
and now i'm stuck with it
 
Ok so for whatever reason you have to deal with that
 
yep
i guess i'm lucky in that at least this section of the app HAS a controller
 
@KendallFrey I'm showing that to my students tomorrow
 
most of the routes point to some 'FakeCtrl' thing
 
12:49 AM
I'd try to have 3 different templates
 
.controller('FakeCtrl', function () {}); lol
 
Include one if the title matches whatever, include another if it matches whatever, etc
Try to pull the conditional into the controller instead of the template if you can
 
it shouldn't be checking the title at all ><
 
anyone have an onPopState example, for ajax and using Javascript without jQuery libarary? I have read on mozilla developers page, and kind of, wondering a little.. Should I create an event state for every history state, such as an array, that finds every state? Or is it possible to combine with my already nicely working ajax and pushstate, wich is using this.url as a reference to the current anchor clicked..
As I read on mozilla developers, I see that history.back is used for going back.. How to have it go back to the previous loaded "ajax-document"?
 
So don't make it check the title
 
12:53 AM
it's not my choice, that's the way its been architected
someone decided that that was a good way to determine what page you were on
 
Ok
 
rather than it being part of the routing
 
Oh are you just complaining, not asking a question?
 
yes
i am complaining about angular and java developers ><
 
@copy it's up (one master cloud entry point hitting two compute VM instances on open stack)
 
12:56 AM
and how together they create crazy ass shit
 
o my bad
 
Really fun actually :)
 
@BenjaminGruenbaum Looks offline from here
 
Also, the inception level... this is a linux vm in a linux vm in a windows vm in a windows computer
@copy try again
It's very fragile atm
 
if I have two loops that both use i is it better that I redefine i (var i = 0;) or not (i = 0;)?
 
12:58 AM
@BenjaminGruenbaum Cute
 
inorite?
Such web scale
slow as fuck, but it scales to 100 instances that'd serve less requests than a single one :D Still pretty cool
 
@joshhunt My understanding is that there really isn't a difference
I always do var i though in case I need to delete/move the first loop though
 
ok thanks, that was my reasoning too but was just asking because jshint was giving me a warning
 
Some linters don't like that though
Yeah
Better would be var i at the top of your function
 
btw if anyone needs html / css help I'm in the web design room (I'm not a vamp, I do help others :D)
@Meredith true but it just seems a bit less logical to me
 
1:05 AM
to ask more correctly, (thou hard to ask absolute correct when terminology is so unknown), Do I have to use JSON in an onpopstate function? I want as little code as possible, while not using jQuery.. I have a website working well, in terms of navigating with mouse clicks in my menu, but back and forward, sharing, and refreshing is not working as it is supposed to in my ajax page.. Any hints, or clues? :)
 
I hate css :/
I am just really bad at trying to think of a good elegant design.
 
@joshhunt Javascript doesn't really handle variables logically
 
Probably why I got a C in art xD
 
var is more of a preprocessor command than anything else
 
@Matt design first then html/css IMO, its a lot harder to create a good design when you are constrained by your css knowledge
also study other websites that you like and try and figure out what you like and don't like about them
 
1:07 AM
No, no. It not that I can't make it look good.
It just I can't think of a good design.
 
@Meredith I mean logical as in logical to me rather than to javascript.
 
@joshhunt Are you coming from c++ or something?
Those languages all have block scope so you'd have to do int i in every loop
Javascript doesn't have block scope
 
@Matt what makes a good design to you?
 
elegent
Pleasing to the eye,
@joshhunt
 
Just learn some design principles
 
1:11 AM
That might help, I just lack artistic ability tbh.
 
@Meredith Nope. What I mean is it doesn't make much sense to me to have var i; at the top of the function and then use it only once in a loop at the bottom of the function even though it is probably more javascript correct to do it that way.
 
Do you know about variable hoisting?
The declaration gets moved to the top of the function no matter where you declare it
 
@Matt I would argue that it's less ability than you think and more experience and science
Yup?
 
what's an obvious and super simple to write distributed algorithm?
 
mapreduce?
or snap! send pairs of cards out to each worker, and the worker checks if they're the same number and replies 'snap' if they are
the master can keep track of score
@Meredith I think i'm going to bite the bullet and just refactor this entire section of the codebase
fuck this crazy ass architecture
 
1:20 AM
Either that or piss off the guy who replaces you even more
 
It will hurt me doing it though
it's so demoralising working on this
but if i just trash the existing stuff and start over
i will feel a lot better doing it
 
What is the app for?
 
it's an eduction thing for teachers
to view what their students are working on in class
cos everyone is using laptops and shit these days
 
Like spying on their computers during class?
 
@david that's a paradigm.
@david that's actually not a bad idea, thanks :)
 
1:27 AM
Anyone using gulp and found that gulp.watch is crazy slow?
 
sup amigos
 
Yeah I don't even use gulp.watch a lot of the time
 
@Meredith what do you use instead?
 
It's faster to just run the task manually sometimes
 
Hmm yeah, that won't fly
 
1:28 AM
@benjamin what do you mean by paradigm? it's still an algorithm you can run. send sets of data off to the workers, they do the mapping, send it back and you combine their responses
 
It's only slow on the initial call
 
Oh my problem is that it takes like a full second to run the task after a file is saved
 
@david that's the paradigm, it's not a specific algorithm
It's the notion of having mappers and a reducer
@phenomnomnominal well, it's faster than grunt :D
 
@Meredith you can change the watch interval
 
Really
 
1:31 AM
I've only used gulp on one app so far and watch seems okay
 
Is that seriously the issue
I'm so stupid
 
Back, anyone here ever used MathJax?
 
Well, gulp watch is for development time anyway, the problem is grunt/gulp aren't actual build systems with real dependency tracking.
 
How do I change it?
 
@BenjaminGruenbaum 38 seconds to just watch a glob of src/**/*.ts
 
1:32 AM
@Matt I haven't the first two times you've asked this in the last hour - but since then I've looked into it and mastered it, I'm now a core mathjax developer. I even have a lecture at the convention.
 
@Benjamin But you can still implement it ><
 
Rofl xD
 
@david yes, but it's not an algorithm, it's a framework for algorithms.
 
I'm sorry @BenjaminGruenbaum. I didn't know if anyone new came in and might have.
 
@phenomnomnominal hehe
 
1:33 AM
so if i said mapreduce doubling a number you'd be okay with it? ><
 
@Matt I know every single regular in this room and none of them both know mathjax and are interested in your problem, sorry. Just ask your question on stack overflow.
@david yes, totally. Although how'd you map reduce that?
 
i figured you wouldn't actually care what it did, just that it split the workload out between your workers
which is a fairly simple thing to do
 
@Meredith gulp.watch can take a options object as the second param, which gets passed to vfs.watch that gets passed to gaze which gets passed to fs.watch, which is documented here: nodejs.org/api/…
 
*Is it possible to have a back button working with ajax, or have I misunderstood something? It is confusing with a 'new' teqnique like onpopstate, and googling shows many results, that are older than html5 and onpopstate..
 
Okay lol. Sorry for being annoying.
 
1:34 AM
i dunno, the workers can double the numbers and you can reduce it by adding all the results
it's contrived as fuck but it works for testing something out
 
@phenomnomnominal Wow I would've never figured that out
Thanks
 
@BenjaminGruenbaum or if you want something a little more useful try implementing raftconsensus.github.io
 
@david how'd you distribute that workload though (doubling a number)
@david that's actually something all the class will know from another class hmm
cute quiz btw nibalizer.com
 
oh is this for students not for yourself?
i thought you wanted something quick to mess around
 
More myself to mess around than for actual students :D
I just want to demonstrate it, not to myself though
Speaking of consensus, did you see the lecture and video on fault tolerance I posted today?
 
1:47 AM
no :o
repost?
that sort of shit is quite interesting
 
Well, one was more basic and the other one was research by the guy doing the course.
Then again - the more basic one is by Barbara fuckin' Liskov
11 hours ago, by Benjamin Gruenbaum
Here, instead: http://video.mit.edu/watch/practical-byzantine-fault-tolerance-9388/
 
I'm running out of places to ask this but here we go:
what is the legal term for when a law implies that the opposite is legal. like 'no parking on weekends' means that you can park during the week without explicitly saying so?
i'm almost certain there is a cool legal term for it
 
Ooh, I used to know that it's a linguistic term.
 
but i can't for the life of me remember what it was
 
Now im curious
 
1:53 AM
everyone i've asked become super curious ><
and i've been unable to deliver
 
There is a cool linguistic term for it.
 
all my googlings bring up articles on logical operators and demorgan's laws
 
It's a type of implicature
Implicature is a technical term in the pragmatics subfield of linguistics, coined by H. P. Grice, which refers to what is suggested in an utterance, even though neither expressed nor strictly implied (that is, entailed) by the utterance. For example, the sentence "Mary had a baby and got married" strongly suggests that Mary had the baby before the wedding, but the sentence would still be strictly true if Mary had her baby after she got married. Further, if we add the qualification "— not necessarily in that order" to the original sentence, then the implicature is cancelled even though the meaning...
 
A number of Latin terms are used in legal terminology and legal maxims. This is a partial list of these "legal Latin" terms, which are wholly or substantially drawn from Latin. == See also == Brocard (law) Law French List of Latin abbreviations List of Latin phrases (full) List of plain English words and phrases == References == == External links == Database of legal Latin terms and phrases...
I'll start at the top you start at the bottom
 
Nono, it's a special kind of implicature, can't find it there though
 
1:55 AM
Ok so it's not latin
 
yeah but every time i add implication to the google search terms i get overwhelmed by logic
 
Not implication, implicature
 
2:08 AM
this is starting to upset me... i used to know this term >:E
 
2:23 AM
@david Exceptio firmat
 
2:39 AM
@taco yeah that's the general idea
but i'm sure there was an english version
 
Hello, why this is not working if i dynamically insert the id my function
 
rephrased
 
why it is not working when i dynamically insert the id in my function

resetmultiselect(myselectlist);



var resetmultiselect = function(multiselectId){

var x = $('#'+multiselectId);


$('#x :selected').each(function(){
$(this).removeAttr('selected').prop('selected', false);
});

$('#x').multiselect('refresh');
};
 
you're in the wrong part of the site jemz
 
2:40 AM
I find your code offensive.
Also, I really have to get some sleep.
 
'#x' isn't doing what you want it to do
did you try the snap thing benjamin?
 
It's 4:40 am here, and I've been playing with openstack for the past 7 hours :D
night
 
night
 
@david,so you mean 'x' ?
 
2:45 AM
@jemz you can't put x in a string and expect it to magically work. you need to change all your #x places into '#' + multiselectId
and you don't need the var x = line
 
@david, you mean liket this
var resetmultiselect = function(multiselectId){

$('#'+multiselectId+' :selected').each(function(){
$(this).removeAttr('selected').prop('selected', false);
});

$('#'+multiselectId).multiselect('refresh');
};
 
@taco yeah, but i'm almost certain there is another way of saying it that doesn't suffer from the confusion
 
@david, not working
@david, Thank you it's working
@david, I just wrap to double quotes this resetmultiselect("myselectlist");
@david, and follow your suggestion,it's working fine now.
 
3:09 AM
I guess if you had a variable inside quotes and expected it to work then it's not too much of a stretch to believe you'd have a string outside of quotes and expect that to work too...
glad it's fixed though!
 
crl
@sunto made another example of pushState, is it what you need?
 
3:48 AM
@SomeKittens @rlemon @Zirak @BenjaminGruenbaum You guys want an alpha invite for keybase.io ?
 
So... No?
 
What does tracking get me?
 
No idea
Maybe if you send out a crypto tweet those tracking you get an update?
 
m59
4:36 AM
If you were writing a client-side library to interact with a rest api, would you have an internal dependency on an ajax lib or have the ajax lib be passed in as parameter?
I favor the extra bulk of the former because the latter would require the passed in lib to fulfill a certain contract, which would make people have to write functions to translate.
 
Bundle an ajax lib with it
Or have the user pass in certain functions, but not the whole lib
 
ASR
5:07 AM
@copy hi
 
5:19 AM
@crl
I am not even sure what that does..
Here you can maybe see some reference to what I need.
http://jsbin.com/zigikeviti/1/edit
 
@sunto What's your problem?
 
I need to have back/forward button working, and I need to be able to navigate to said url, i.e. www.mypage.no/somAjaxLoadedcontent.php
Also to be able to share it..
I guess, I need help understanding the onPopstate function :o
 
Alright hold on, let me look through your code
 
how very nice of you, thanks :)
@Meredith
Maybe a little bit unclear in my question, and coding, as my skills are limited, to the keywords in javascript that I know of.. I know jQuery is a javascript libarary, so I also then know, that it is possible to achieve what I want without jQuery, maybe thats just me being stupid, as alot of people say jQuery makes it easier. Hehe but not so easy when learning javascript it self, is my goal, as well as having my website complete in way of functionality for the user's..
 
Ok so when you click a link, you want it to display the corresponding view and change the url?
 
5:32 AM
It already changes the url, with that pushstate code. What i want, is to have the back/forward button working, and to be able to share url's, in example cut an url generated with pushstate, to you, so that you can see the same content that I viewed when clicking the share button. As it is now, I have the url's changing and displayed correctly, they just dont 'work'..
If you see in the page it self, maybe easier to understand my problem?
I have link's that are working in form of user interface by click's, but not by back/forward etc.. A common ajax problem, before the popstate as far as I understood from reading on the internet..
 
Yeah I'd like to see the actual page
 
If you see there, the menu on the top is 'html' links, static if my reminology is correct.
And the ones on the left, are dynamicall genreated.. (Ignore the one with enviroment, as it is another webppage embedded)
 
Ok so a couple of things
1. You're going to want to clean up your code for the routing
Your html should only be something like <a href="/food-and-health/">Food and Health</a>
 
Aha, like using eventhandler instead of onclick in my html?
 
Yes
2. You want a loadPage method
 
5:39 AM
ok, that I will do when this is handled ;) That is, I have jsut started to learn the addeventlistener, and eventhandler :)
 
It takes 1 parameter: the url of the page you're loading
You can have an options parameter if you want, but it shouldn't be necessary
3. Your click events should do 2 things: call history.pushState and call loadPage
 
aha, is it any alternative for this other than jQuery? Like onload? maybe possible to use onload in an eventlistener function?
 
No need for jquery
 
ahh
that makes sence
 
4. loadPage should be called on page load and popstate
 
5:42 AM
Oh, no wonder I haven't got this to work
 
ie window.addEventListener("popstate", function(event){router.loadPage(router.getCurrentURL());})
 
getCurrentURL is something similar to this.href?
I will note all these keywords and read there respective functionality!
 
If you're on the page yoursite.com/food-and-health, it would return "/food-and-health/"
 
aha, sweet! And it will find the correct ajaxurl/dynamic url also?
 
If you make it do that
What do your ajax url's look like?
 
5:46 AM
If you click the menu on the left on my page, you can see on the url bar
it just changes food_and_health, to something like oliveoil
oliveoil.php
 
router.loadPage should accept the page that you want to load
 
I have in my onclicks in the html, 'this.href' as an argument inside my ajax/httprequest function
ok, then comes the real big brainer for me, how to make every ajaxpage, have a state?
 
What do you mean?
 
As I read, the popstate function takes three parameters; location, state, and something else I didn't wuite understand, maybe not a parameter, just a statement..
How to get it to 'have' a state, so that the back and forward button would work?
 
You mean history.pushState?
It takes a state object, title, and a url
 
5:51 AM
I may be confusing the two together
what does it mean that I have curly brackets{}, as my first argument?
 
Or null
 
Ahh
ok, so that is the same as null?
 
No
But let's not open up that can of worms
 
crl
!!> ({} == null)
 
@crl "SyntaxError: expected expression, got '=='"
 
5:53 AM
Realistically you'll probably want to do something like
var pushState = function(url){
    history.pushState(null, "", url);
 };
 
@crl false
 
hehe :)
 
And then just use pushState
 
Ah, okay
But okay, to get these problems I have working, and implement the popstate in a good maneour, do I only need something like the codebit you worte earlier?
If I understand, have my pushstate, not the one inside my httprequest function, but in the eventlistener outside, also call loadPage.
And then create the onpopstate, as you did, calling the loadPage, and the popstate?
Then my problem is, what do I put inside my popstate? I see so many diferent examples f this, like history.back etc..
 

« first day (1599 days earlier)      last day (3343 days later) »