« first day (1624 days earlier)      last day (3324 days later) » 

6:06 PM
I'm trying to work a bit with chrome console.
I dont understand this. If I for example type window and press enter.
Then chrome will make some nice tree structure for me.
And then I can for example select the CodeMirror object and another three will unfold.
But I type directly window.CodeMirror
then chrome will print an ugly variable instead of some nice tree structure
Any ideas how I can let chrome show the tree structure for me ?
 
@Loktar around?
Having DK2 issues
 
@BenjaminGruenbaum @FlorianMargaine You guys may like this. newsoffice.mit.edu/2015/…
 
6:28 PM
I'm having CMD+C CMD+V problems on my Mac's Chrome...
 
@SomeGuy nice, but I can't seem to find the program anywhere
 
@BenjaminGruenbaum Does this actually work? gist.github.com/benjamingr/2a98d0d1d5fdc4710d07
 
@Mosho not that I know, but you can do all(promises).map(r => r.data).then(res => {})
 
yeah, that's nicer
hmm
is that even possible though
 
hi guys
 
6:34 PM
@GabrielTomitsuka probably, I have a working version of that - that gist was to show an issue. Didn't release it since I wanted the community to align behind PromiseKit so I provided feedback on that instead.
@SomeGuy nice
 
@FlorianMargaine that would have to be all(promises).then(res => res.map(r => r.data)).then(res => {}), at least with angular's implementation
 
@Mosho put a map method on promises.
 
but but :P
 
@FlorianMargaine no.
Why are you working on Saturdays anyway...
 
if this is working then you are almost always working
 
6:38 PM
I never work, I just look busy
var proto = Object.getPrototypeOf($q.defer().promise);
proto.map = function(fn){ return this.then(res => res.map(fn)); };
all(promises).map(r => r.data).then(...
 
yeah... :P
 
@HatterisMad yeah, it is normal
 
user2620028
@awal looks like i am not getting the participants name from the participantName.innerText
 
You shouldn't be using innerText anyways
always use textContent
 
user2620028
:P it has been ages since i have JS'd so my bad.
 
user2620028
6:44 PM
But wait that makes no sense..... because the output in javascript and in php after the javascript sent it had the participants name in it :/
 
Put your html in that fiddle. Without it, it is somewhat hard to actually identify your problem :p
 
hey guys
any one have idea about using node js for turnbased games in
 
user2620028
well the problem is that it isn't just html
 
user2620028
its a hellish network of a custom php template and html and javascript
 
user2620028
all in the markup
 
6:47 PM
just copy the rendered html?
 
user2620028
can do
 
user2620028
@awal take a look at this shit... this is the var dump of what was generated by JSON.stringify after i changed it from innerText to textContent jsfiddle.net/ty4swLat
 
looks good?
you got rid of the slashes atleast :D
 
user2620028
i did but dafuq is this innnnnnt shit lol
 
user2620028
 
user2620028
6:52 PM
i added the html that was relevant
 
user2620028
i use that word loosely
 
user2620028
Hangon i am cleaning up the html and narrowing it down a bit hahahaha - jsfiddle.net/ty4swLat/2
 
@HatterisMad ^ I just put a breakpoint in your own code and it worked
 
user2620028
so i handled the client side issue and now im progressing back to server? lol
 
1 hour ago, by Awal Garg
@HatterisMad I parsed and stringified your very string and it doesn't do it. So unless you are doing something with the resolver of stringify, I don't think this has to do with the client.
that's what I said :P
 
user2620028
7:02 PM
but did you see my hacky way to make it work?
 
user2620028
var tempvar = JSON.stringify(participantResults).replace(/\\/g, '');
results.value = tempvar.substring(1, tempvar.length-1);
 
no not that. I just put your javascript from the first fiddle in the html of the second fiddle.
 
user2620028
the replace to get rid of the back slashes and the substring to get rid of the enclosing double quotes lol
 
user2620028
:/
 
Neo
Hi, I'm facing an issue similar to this : stackoverflow.com/questions/17880977/… but the solution proposed doesn't work in my case
Actually I send a file through a form
 
7:04 PM
jsfiddle.net/ty4swLat/4 this is the version that works, and it is a merge of two of your fiddles only.
 
user2620028
@awal dafuq.... cause thats my code from the beginning of the day that randomly started erroring out and me to tinker with it in the first place!
 
Neo
the file is then read by a method in my web service and the method returns a json object (data extracted from the file)
and what I would like to do is to access this json from the page where the first form is located
 
yeah, as I said previously and previously, your issue is at the server.
 
Neo
so I guess I have to do a redirection after the form is submited
 
@Neo how is the form submitted? ajax? simple post?
 
user2620028
7:06 PM
what the fuck changed on the server..... because json_decode just bombs
 
Neo
@AwalGarg simple post (it's an html form)
 
@Neo then whereever the post redirects would already have the data, right? If you need the original form to recieve the data, then you can have the server side scripts be merged.
 
Neo
@AwalGarg sorry I don't understand what you mean
 
@HatterisMad I told you already that your issue is with php, but you didn't listen :p
 
user2620028
@awal yeah my json_decode of that supposedly valid JSON returns null
 
7:09 PM
post some php code, maybe someone can help
 
user2620028
$results = json_decode($_POST['results'],true);
var_dump($results);
This returns null lol
 
then I believe you aren't sending the data to php properly
 
user2620028
the var_dump($_POST['results']) returns the json string with backslashes and enclosing quotes
 
also, sorry but your html is way too ugly dude
 
user2620028
back to the starting point of about 16 hours ago
 
user2620028
7:11 PM
who me?
 
yep
:P
 
user2620028
Have you ever seen IPB?
 
nope, what is that?
 
user2620028
It is the que that i can give up on life lol
 
:D
 
user2620028
7:12 PM
Invision Power Board... a forums software and the programming for it is the worst thing i have ever had to work with
 
haha makes sense lol
 
user2620028
More or less it forces you to do things its way and all good coding you can just promise is not plausible
 
Neo
@AwalGarg actually I want to come back to the page where the form is located after submitting it, then access the data and store it in a javascript array, the json data being sent at a particular URL
 
@Neo I won't be able to explain how get/post works in detail here. I recommend looking these up and understanding some underlying principles first. When you get stuck at some point of code, someone from here would be willing to help to your efforts.
@Neo store the data in session variables?
what is your backend?
 
user2620028
for example... they wrote their own version of angular from the ground up when people asked for capability with angular for their forums. So instead of just including angular they wrote it themselves and gave very little documentation
 
7:15 PM
lol
 
Neo
@AwalGarg i'm not using php, I'm using java in the backend with this framework : britesnow.com/snow/overview
 
@HatterisMad as for your issue, I inspected the network logs and you are doing everything right until the point where you dispatch the data to php. I am not sure where in your html are you doing that. try trimming your html to the necessary parts.
 
> you are doing everything right until the point where you dispatch the data to php.
3
this sentence sounds right regardless of context
 
(html because your html has javascript mixed up...)
@BartekBanachewicz lol you... XD
 
user2620028
@awal i set the value of an html hidden input with the json.stringify value
 
7:18 PM
@Neo not sure how java handles session variables. if javascript is an option, you can use localStorage or sessionStorage.
@HatterisMad wat. why.
 
user2620028
because i haven't adapted this to use ajax yet lol
 
why can't you just let the browser do a simple http post?
 
user2620028
because i didn't dynamically generate the html to work with that
 
saw some more html code... dude, if I were you, I'd have ctrl+a deleted till now :P
ahh
 
user2620028
because i planned from the start to make it ajax lol
 
7:20 PM
well, good example of sphagetti structure :D
have fun debugging :P
 
user2620028
and just haven't yet... and it worked from day 1 this way the first time i tried it.... no idea why it is fucking up now
 
user2620028
uhhh what part is sphagetti?
 
user2620028
just to give you an idea of what this looks like in the actual code -- jsfiddle.net/g6f61ez7
 
lots of it :D
 
user2620028
I have also had another developer making the html for it.... the stuff that could have easily been done with nicer css and less div's.... that was him lol
 
7:23 PM
wait... this is there implementation of angular? :O
 
user2620028
nope
 
user2620028
this is their php templating
 
user2620028
they have their own implementation of a lot of different things... and none of them have proper documentation and all of them SUCK
 
i... uhh.. i am sorry for you
 
user2620028
I am actually moderately proud of the code i have created for how little crappy i have let ipb make it by just being the worlds worst platform.
 
user2620028
7:25 PM
actually you want to see something funny.... the documentation for the version of the board i am on......
 
@BartekBanachewicz says he likes to debug old php :P
 
user2620028
i can't find the page links through google at the moment but if you do happen to find the documentation for the version of IPB i am running then every single page returns a 404 error from their server
 
:P
 
user2620028
7:29 PM
@awal you lyin to me?
 
user2620028
@awal why would modifying the value before submitting it to php remove the backslashes and double quotes by the time it got to the php.....
 
document.observe("dom:loaded", function(){
	var _thisHtml	= $('n
wow what ^
@HatterisMad that's what is difficult to find
 
user2620028
lol who knows.... i have seen that in every debugger but i have no idea what it gets pulled in from.... They have their own template manager and it pulls in from like hundreds of different files to make one view..... its really really stupid
 
if( $('user_link_menucontent') ){
									$('user_link_menucontent').hide();
								}
uhh...
I'll keep this code as sample reference for future
 
user2620028
looks like something the other monkey developer did for his custom made navbar lol
 
user2620028
7:32 PM
or maybe that is ipb? i dunno lol
 
how did they manage to put a style attribute of the same useless z-index value on all the elements, is beyond my imagination
 
user2620028
lol dude go look up ipb forums development and you will see the special kind of hell this is
 
I am just reading it and laughing because I am bored :P
 
1 message moved to JS trash
Only English, please
 
oh sure
 
7:36 PM
@BulletRaja there is an indian room, people there would appreciate your poetry there more.
 
where?
 
u r not indian @AwalGarg
 
@AwalGarg Unless you have <user_link_menucontent>, I'm pretty sure that's wrong.
 
7:39 PM
that is some level of surety you achieved :P
@BulletRaja Sure I am.
wait, they are using 3 different versions of jquery... holy hell
 
@AwalGarg That's a whole 3 versions of jQuery too many.
 
true
 
user2620028
@awal i figured it out
 
	<style type="text/css" >
		/* Inline CSS */

/* CSS: ipb_search*/

	</style>
...
@HatterisMad great
 
user2620028
hahahahahaha yeah its a beauty right
 
7:45 PM
what level of developers write this kind of stuff
 
user2620028
I solved it client side.... still feels wrong.... lots of subsstrings, .replace, and .trim lol
 
@AwalGarg Company we work with still use document.write
@HatterisMad can you explain the problem for me?
 
30 mins ago, by Awal Garg
@HatterisMad as for your issue, I inspected the network logs and you are doing everything right until the point where you dispatch the data to php. I am not sure where in your html are you doing that. try trimming your html to the necessary parts.
@SecondRikudo ^ tldr
 
user2620028
@second i am tired and it is almost 3 am lol..... essentially for some unknown reason JSON.stringify today decided to add backslashes and enclose the entire string in a set of double quotes
 
@HatterisMad That sounds like part of a solution, not a problem.
 
7:48 PM
nah, it is not the json.stringify. your script is doing something wrong before sending it.
ipb.vars['member_id']			= parseInt( 0 );
...what is this i don't even...
 
user2620028
It had me chasing my tail for a very long time trying to figure out why it was happening and i eventually had to just sit down and write a work around instead of finding the problem
 
user2620028
@awal SO THAT IS WHERE THEY ASSIGN THE GUEST MEMBER ID TO 0
 
ipb.vars['use_swf_upload']		= ( '' == 'flash' ) ? true : false;
2
 
user2620028
i had wondered why in the hell and where in the hell they did that lol
 
oh... my
 
7:51 PM
@AwalGarg That's a good one XD
 
@HatterisMad have you considered suing them for mental torture or something?
 
user2620028
absolutely lol
 
@SecondRikudo ikr :P
 
user2620028
i would change your member id to 1 or something and get full admin rights hehe
 
@HatterisMad can you make changes to that code?
As in, will your company allow it?
 
user2620028
7:54 PM
@second it is not a company, it is a community and I am not investing my time to make huge changes to this hell hole of a software. Especially when we are currently out of date by many versions.
 
@HatterisMad In that case, I'd persue a different direction in my career.
One that doesn't force me to spend 60% of my salary on psychiatric therapy, perhaps.
 
lol
 
user2620028
I would like to pursue a career. That would be a nice first step.
 
Pick a saner job, like coding in Visual Basic.
 
VB6 was a thing
 
7:55 PM
@HatterisMad Well, what's stopping you?
@BartekBanachewicz So is Satan.
 
I still have original Microsoft Books for VB for Windows 3.1
I really enjoyed using it
 
VB = virtual bullshit
 
kinda felt like Atari programming
 
@BartekBanachewicz VB6 was awesome when I learned it. I could actually write software it felt amazing.
 
@BenjaminGruenbaum +1 that
 
7:56 PM
@AwalGarg VB6 = Virtual Bullshit times 6 :D
 
I didn't know any better at the time, it was just fun.
 
:P
 
yeah I wrote a few quite funny gui apps
 
haha dragging buttons around is so much fun lol
 
I really liked it
 
7:56 PM
It was just so trivial to make little helper programs for daily tasks with vb6.
 
then I started learning C++ and lost ability to do GUIs
it was sad
 
I first made a game with a smiley that goes away from your cursor and you had to click on it to win the game. you never win it lol
 
I remember the first calculator I wrote. Could even find the roots of a parabola/line. Was the shit.
 
I made a tool to sort out books in my personal library
 
user2620028
@second a little bit of not knowing where to look, and i do not know how to judge what jobs i am suited for as i have never been hired as a programmer before. 100% my fault for not applying every day, do not get me wrong i am procrastinating.
 
7:57 PM
and a calculator too ofc
 
Yeah, VB6 was the first place doing UI and actually coding clicked for me, I learned C++ and QBasic and Pascal before but couldn't really "make stuff"
 
@BartekBanachewicz haha that was my 4th or 5th project I guess :D
 
@BenjaminGruenbaum well I already knew Pascal pretty well when I started using it
 
@BartekBanachewicz hahaha yes that feeling! Once you surpass some point where you can no longer just do something
 
Heck, I could write some assembly back then
 
7:58 PM
Me too (VB) but I didn't really make cool stuff with Pascal, Pacman tops
 
@BenjaminGruenbaum I did quite a lot in 13h
also ASCII UIs were cool
I wrote an ASCII windowing system by hand
 
Ascii UIs were cool to make but not to actually use for a while.
 
well TurboPascal's UI wasn't that bad
at least it was easy to use with just a keyboard
I had a monochromatic display back then btw
 
These days you can have that fun with JavaScript
 
^
Totally that.
 
8:00 PM
threejs <3
 
@copy the point is once you get to the point when you realize how bad JS is, it kinda spoils it
I kind of envy people learning JS nowadays
they don't see the problems that make me turn away from it
 
Then use OCaml or TS
Or at least ES7
 
new TS is pretty cool admittedly
ADTs and language builtin Nullable and better inference
I might do something in it
maybe the new Lounge Jam (btw there's one now @copy)
 
hello
 
Jefffrey started it, it lasts a week and the theme is "snake"
 
8:04 PM
@BartekBanachewicz :lol:
 
FTR haskell records almost made me throw my keyboard through the window today
 
@BartekBanachewicz I'm on vacation next week. Also the JS room jam should happen pretty soon
 
maybe I need a break in another language alright
@copy is it JS-only?
 
I think so, yes. But nobody would complain about TS
 
Does anyone know how the caching strategy to keep SQL record information in memcached using hash keys of the request query and invalidating the key when the information changes is called?
I am trying to find information for it without much luck
 
8:06 PM
@HatterisMad I learnt that I have to stay away from ipb at all costs. thanks for that. and also, I hope you get rid of it soon :P
 
@copy mmm.
dunno someone plink me when it's time
 
nvm
 
a jam started by a particular room?
 
@BartekBanachewicz why ftr? We all know they're horrible.
 
no they're badder than horrible
seriously I'm amazed at how bad they are
 
8:10 PM
@BenjaminGruenbaum How so?
 
he clicked wrong message
 
@copy yeah, I meant the record one, sorry.
 
I meant that too
 
hmm... is there someway to grab hold of the activation object inside a function in es6?
 
No
 
8:13 PM
:(
 
No, assuming I remember what an activation object is.
 
that mysterious object to which local variables are attached and stuff
 
@copy they're really a pain to work with
they could be designed in million different other ways and pretty much every one would be better
 
@AwalGarg then no unless you can run v8 with different flags
 
@BenjaminGruenbaum I am allowed to do that. What flags would they be?
 
8:16 PM
@BartekBanachewicz Well, they have to be immutable, obviously. Do you have problems with nested records?
 
@copy with updating nested records and with name clashes in particular
immutability != inability to update
 
Oh yeah, the field name thing
 
@AwalGarg well shit - I'm supposed to know that.
 
in particular, I'd like RecordFieldSelector -> (RecordField -> RecordField) -> Record -> Record
or just dunno, make Lens standard
 
@BenjaminGruenbaum There was a v8 call to get the scope as a js object?
I don't recall one
 
8:18 PM
:D some keywords I can look for?
 
I think Benjamin's thinking about --allow-natives-syntax
 
@Zirak I know how to get it from and to a function in a native module and I recall a flag for it but I don't recall what it is.
It's not --allow-natives-syntax that just allows %stuff calls
There is a way to allow access to what the debugger accesses. After all the debugger can see all this - I just can't recall it.
 
oh, thought you knew a native call that I didn't. hrm.
 
this is all over my head :( I know pretty much nothing about v8.
 
What are you actually trying to do?
 
8:21 PM
trying to call Object.defineProperty on the activation object in strict mode.
 
What? why?
 
for a getter and setter
 
@BenjaminGruenbaum The debugger calls native code through some weird devtools bridge
 
@AwalGarg what are you actually making?
There are dark ways to do things, if we knew more we could help more.
 
@BenjaminGruenbaum not "making" something, just having fun with corner parts of JavaScript.
 
8:23 PM
Oh, then it wouldn't be JS anyway it'd be v8
 
still interested to know :D
 
There are magicals in old SpiderMonkey iirc - locals and parent or something like that
I messed with it such a long time ago
If you run on an old copy of firefox which should technically work just fine - you can use .__parent__ to get the whole context.
 
hi @BenjaminGruenbaum
 
Well, originally I just did a function which is called when accessed. So foo would do foo(). Now I am just trying to do more odd things with eval and getters and setters. :D
 
8:28 PM
Wait, maybe that's not it whereswalden.com/2010/05/07/…pare‌​nt-property-has-been-removed/
 
i want to ask one thing may be u can help
?
 
@AwalGarg oh, you can override Function.prototype.apply and hook on every single function call, just be sure to delegate back and avoid infinite recursion - it's really fun.
 
@BenjaminGruenbaum yep, did it already :D
 
8:30 PM
i want to use node js for realtime turnbased game in ios any link
but not able to know how can i integrate it with ios
 
@BenjaminGruenbaum nice. those must be fun times :p
 
You could set a global and then change it on every function.prototype.apply - it could be a nice exercise to shim that as this
So whenever a function is called that is set
 
hmm, nice idea
 
(btw don't actually give your dog ice cream)
 
8:46 PM
@BartekBanachewicz Googled "haskell record", got here, got to baseCircle, got annoyed, realised there was reason, got annoyed some more. Seeing baseCircle and baseRect is begging a single base(Shape, ...constructorArgs) function.
But can't seem to find a way to define base's type signature
 
@Zirak not possible. Note how the base functions fill out some fields with default values. In haskell, there's a Default type class, but a lot of types don't instantiate it
 
Exactly. Isn't that annoying?
It's annoying
 
How doesn't that annoy you?
 
8:52 PM
if you, say, wanted base to always mean "origin 0" then it's fairly easy
 
Elaborate?
 
@Zirak well, you need to supply the parameters anyway, right? and they can differ between types
say, for a Circle you need a Float, and for Rect you need to floats
in this case there's little gained between:
base Circle' 1
base Rect' 2 3
-- vs
baseCircle 1
baseRect 2 3
might as well make it:
base (CircleBase 1)
base (RectBase 2 3)
 
@Zirak That's what you get if you forbid polymorphism
It has disadvantages, but also certain advantages
 
That makes sense, but I'm still a tad annoyed. Maybe it's the natural incline against type signatures.
 
@Zirak "against"?
how could you be "against" type signatures
every function has a signature vOv
you mean against explicit type signatures?
 
8:58 PM
You get really good type inference because of that
 
If you wish, yes
The advantages are clear, absolutely. Still.
 
what advantages?
I don't get what you mean really
 
Type inference comes at the cost of type safety - just saying.
 
In OCaml, you can't even use + with floats
 
how is your "base(Shape, ...constructorArgs)" supposed to work
the constructor args have to fit the particular constructor anyway
in which case see my last code example
 
9:00 PM
@BenjaminGruenbaum How so?
 
If I didn't have to type the signature, then base Circle r = Circle 0 0 r etc
And base Rect width height = Rect 0 0 width height
 
@Zirak what's base Rect r = ? then
 
@copy in Haskell, in the larger projects I played with type errors ended up propagating 4 stack frames up if inference was used. It makes tracking errors down a pain and GHC isn't too great at error messages anyway.
 
@BartekBanachewicz I'll concede that it's the specific signature. However, I can't give base a type signature.
base :: Shape -> ?
 
@BenjaminGruenbaum That's not unsafe
 
9:03 PM
@Zirak you'd need ad-hoc overloading for that
I don't think it's actually that useful
 
@copy it sort of is though, since the compiler verifies types for you and if you let it infer the types you're no longer adding assertions.
 
in C++ it's a source of a lot of annoyances
 
@BenjaminGruenbaum Yes, but you can't get run time exceptions out of it. Just less useful compile time exceptions
 
you could fake it with dependent types
but it's not really practical here Imho
 
@copy mostly yes but it is still making less assertions, you can get run-time bugs (not type errors) because of it. Although the bigger part of it is the cryptic messages.
 
9:05 PM
@Zirak the point is that the type of the base depends (would need to depend) on the first value passed to it
(hence the remark about dependent types)
 
@BenjaminGruenbaum I wonder if that would have happened with OCaml (which is mostly praised for its type inference)
 
that's why it's typically saner to make that parameter a compile-time value and be done with it
 
It's so cute when dogs tilt their heads when they're confused
 
All of a sudden my XAMPP complains about not finding Apache, when the folder is clearly there
 
time to switch to lerpp
 
9:56 PM
Hello
 
10:07 PM
@BenjaminGruenbaum totally
dude I could tell you so many cute things they do
for example when they sleep and they have dreams
you can almost see them running in their dreams
 
10:43 PM
Hello!!
I am asked to state the two versions of the Knapsack problem and their differences. Could I formulate it as followed??

The Knapsack problem is the following:

There are $n$ items, where the $i^{th}$ item has a benefit of $v_i$ and it has weight $w_i$.

We want to pick some items so that we maximize the total benefit while keeping the total weight of $W$.

The difference between the integer and the fractional version of the Knapsack problem is the following:

At the integer version we want to pick each item either fully or we don't pick it.
 
@MaryStar replace your $ with backticks `
 
What are backticks? @CSᵠ
 
@MaryStar `
 
I am asked to state the two versions of the Knapsack problem and their differences. Could I formulate it as followed??

The Knapsack problem is the following:

There are n items, where the i-th item has a benefit of `v_i` and it has weight `w_i`.

We want to pick some items so that we maximize the total benefit while keeping the total weight of W.

The difference between the integer and the fractional version of the Knapsack problem is the following:

At the integer version we want to pick each item either fully or we don't pick it.
 
10:59 PM
@MaryStar I think the fractional case isn't a "problem", it should be trivial
 

« first day (1624 days earlier)      last day (3324 days later) »