« first day (2039 days earlier)      last day (2925 days later) » 

8:01 AM
In episode 611, it is revealed that Tyrion Lannister is the Stallion Who Mounts the World
 
@MadaraUchiha is it supposed to be a puzzle or straightforward?
 
@Neil Puzzle
 
@MadaraUchiha ooo, then I am officially interested
 
@Neil Same as above ^
 
pass
 
8:04 AM
I will do this (bit differently though) next to next weekend for stars on Github if I remember it by then.
 
Wait, so the reward is a job? I got one of those. I don't think I like'em so much
 
@Neil You're not going to solve the puzzle
You're going to develop it, for others to solve and be awarded with jobs
 
in short you get a job without even solving the puzzle
(that's the loophole)
 
@DenysSéguret sneaky sneaky.
 
and you pave the path for more jobs in the world. you get karma for freeeeee
 
8:11 AM
@AwalGarg Not really, the job opening is there for ages, we're just looking for the guy to fill it up
 
@MadaraUchiha this is an interesting way to hire people anyways. is your company some top 4 like fancy massive cool ass money attracting black hole?
 
@AwalGarg There are frontend people like sand on the beach.
Good frontend people are nearly impossible to come by
 
@AwalGarg not really, karma goes for 0.35 euros a kilo now
 
Ask @BenjaminGruenbaum, he's recruiting too.
 
@MadaraUchiha fair enough
@Neil lol
 
8:15 AM
I like the puzzles that give you too much information, some useless
You have to reason through why a particular piece of information is helpful at any given stage
 
@Shmiddty as in "cyberspace deck"
 
There is that puzzle game where one guy gets a bomb defuse manual and the other guy has to rely on him to actually defuse the bomb
It is very impressive to watch the best players win at that game because it is madness
Some of those puzzles must be regularly dealt with or the timer speeds up
 
Somebody made a simple Ruby script to play the manual guy.
 
@JanDvorak probably far more efficient
 
8:41 AM
I will not have access to a Linux machine for a few days.. I'll have my Android tablet with me. How do I spend teh time?
I'll be having Internet access, just not a PC running a sane OS.
 
Define insane OS
 
Windows
 
@MadaraUchiha osx
 
yeah, that too
 
@littlepootis meh, as long as you don't enter your bank account or something
Do whatever you want
 
8:45 AM
Is it fine to run FreeBSD off my USB (3.0) for a few days..?
 
My wife was telling me the other day that we're real geniuses when it comes to naming our products. I never really thought about it before, but she's right
 
@Neil obligatory 2 hard things in compsci.
 
Now I know who to go to when I want to name my projects.
 
Naming a project is easy. Having that name accepted by marketing is hard.
 
@MadaraUchiha I suppose if we were good at names, we wouldn't be programmers
OSX means something to those who know the acronym, but not so easy to sell
Not that they need to sell it. ..
 
8:47 AM
OSX was a easy sell in my opinion at that time, when OS9 (which was supposedly to be a change of paradigm) was an obvious failure
 
OSX is practically free
You pay for the hardware, not the software.
 
@DenysSéguret it means nothing to a layman
 
That's the exact difference between Apple and Microsoft, Apple sells hardware, while Microsoft sells software.
 
laymen weren't the target at that time
 
@MadaraUchiha of cost
 
8:49 AM
@littlepootis Yes
 
That is like naming a car a quadcylinder 1000cc
Rather than say, a Rover
 
"Apple Lion"
 
@MadaraUchiha At that time Apple was trying to recover from a stupid attempt to separate software and hardware activities (other companies were supposed to ultimately be the hardware vendors while Apple would concentrate on software)
(the same stupidity which killed Palm, and maybe Nokia)
 
(Admittedly, I don't know much about cars)
Depends on the audience I suppose, but operating system was important enough to the end consumer that it was written on the specs
Intel caught on to that and stopped naming them like 586
 
ok, im doing more learning... and i think im going wrong lol
 
8:52 AM
Most "end consumers" I know couldn't tell me if they ran Windows XP or seven.
 
why cant that console log return the result of the function? w3 schools said it could :S
 
Why do I get sucked to this tab every time I go to the browser to look for a technical solution ?
 
@KirstyHarris myFunction expects a parameter
You're not passing a parameter.
 
oh right ok, so if i passed xml for example?
surely it should pass the result of me getting the tag name Country Code?
 
@MadaraUchiha can you blame them? Why would XP or 7 be memorable versions to the end consumer?
 
8:54 AM
@Neil They look completely different
 
Granted, this has always been somewhat of a problem with software
 
Also, it says the version is relatively big letters on the opening screen of both.
 
@MadaraUchiha and yet the fact remains
 
The "problem" is that users don't care, and they never will
Computers don't interest them, they are a tool to complete a job, more often than not, it's an obstacle on the way to a goal, and not a helper.
(i.e. bad programming, bad UI/UX)
 
Maybe they would recall the version better if one version were called "clown car" and the other "beagle toy"
 
8:56 AM
Everybody who was still using a mac when OSX was at least achieved did know what OSX was about. That wasn't a lot of people, and certainly not normal os-agnostic people...
 
i think rlemon was right last night. W3 does not really go into great detail for learning lol
 
They get stuck, they get viruses, not because the computers are bad, but because the users don't give enough of an eff to maintain it as well as they maintain any other physical possession they have.
@KirstyHarris W3school is a horrible website.
Stop using it.
 
@KirstyHarris please don't call "w3school" "W3".
 
ok, will do. Sorry Denys, ive always called it that and most recognise what im talking about :S
 
the problem is that w3schools only exists because of the confusion with w3c and the W3 legit world
 
8:58 AM
It's misleading. Lures novices into thinking it's related to w3c
 
oh right ok, gotcha
 
that's my only problem with w3schools: this confusion with w3c
I don't give a shit about their tutorials, I do care that they're being completely assholes about their name.
 
fair point
 
@FlorianMargaine That's what patent and trademark laws are made to prevent
But when they're pursued, we like to say "assholes" too.
 
I wish plebs knew that a programmer cannot fix every goddamn problem that their computers have.
 
9:00 AM
its useless when im trying to learn and its not remotely helpful
 
I had this guy phone me and ask how to remove this virus called .net framework.
 
@littlepootis but you're a programmer! You can rewrite programs like they did in the matrix, right?
 
thanks for that Madara
 
@littlepootis He wasn't wrong.
 
9:02 AM
@MadaraUchiha no, we say "assholes" to patent trolls.
 
@FlorianMargaine The line isn't always that clear.
 
@littlepootis how big is the tablet?
 
@AwalGarg The size doesn't matter, it's how you use it.
 
ding ding
 
yeah... right...
 
9:04 AM
@AwalGarg 7 inch
 
The patent system is awful. But there should be some system, at least
 
Should I.. spend my time reading novels?
 
@#$@$^$%&$@@!$#^#&%$&%^&%$#
 
awful.
 
@littlepootis not bad. you can read programming theory and philosophy books and install a linux vm in an emulator
 
9:05 AM
We need open source type patents where you would only have to credit the original patent
 
@MadaraUchiha diffie hellman mix of tabs and spaces
 
@AwalGarg yeah
 
I find small size screens (yes, screens) irritating and non-productive. A big screen (emphasis: screen) size is important to please me.
 
I installed it about 10 min ago ... same reason
 
@MadaraUchiha what's wrong?
 
9:16 AM
@FlorianMargaine I am guessing he's a "space indent" kinda guy
 
I need a function, which will go through nested objects, and get all there properties that are number
 
@Mathematics what have you tried so far?
 
@Mathematics loops through all properties
 
@tereško Intellij can do it for free
That's not the problem here, really
 
    :30558819

var numberProperties = [];
var result = data[0];
for (var property in result) {
     var type = typeof result[property];
                        if (type === 'number') {
   						numberProperties.push({ text: property })
                        }
    					else if (this is an object ??)
    					    // save it later on
                    }
 
9:21 AM
It's that fixing it would make the PR absolutely impossible to read.
 
this is not what I exactly I want though
 
(It's a 50k line file, all like that)
 
I want to get properties of main object first
then all number properties of 2nd object and so on...
var numberProperties = [];
var result = data[0];
for (var property in result) {
  var type = typeof result[property];
  if (type === 'number') {
    numberProperties.push({
      text: property
    })
  } else if (this is an object ? ? )
  // save it later on
}
 
@Neil I don't mind spaces or tabs
I mind spaces and tabs.
 
@MadaraUchiha oh, man. Shivers down my spine
 
9:26 AM
var numberProperties = {};
var objectProperties = {};
var result = data[0];
for (var property in result) {
  var type = typeof result[property];
  if (type === 'number') {
    numberProperties[property] = result[property];
  } else if (this is an object ? ? )
  // save it later on
    objectProperties[property] = result[property];
}
@Mathematics ^
 
@Mathematics well for one, you access the first with 0. That should already be a queue to put in a loop
Second, depending on how you want to handle the nested object case, you should recursively call itself for the nested object and apply the returned value
 
is there anything like linq in JS, so if I have a tree of objects, I say... get me all properties that are numbers along with there parent name
 
@Mathematics I am sure something exists, but it is a little excessive to include a library for this simple task
 
pTi
9:55 AM
hi
im having a question in javascript
 
!!welcome pTi
 
@pTi Welcome to the JavaScript chat! Please review the room 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.
 
Hey guys!
 
@AbdulelahAlJeffery Welcome to the JavaScript chat! Please review the room 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.
 
seems like I'm the last person who jumped on javascript's bandwagon :)
Is it true that I can't make a deep copy of two numbers?
 
10:10 AM
what does that even mean?
 
user6225166
java script so cool.
 
@AbdulelahAlJeffery everyone gets that message once, except for maybe rlemon. I think he may be immortal
@AbdulelahAlJeffery what can't you do that you could do if you could "deep copy" numbers
 
var board_size = 8;
while(board_size > 0){
	var size = board_size;
	var temp1 = temp2 = "";
	for (var i = 1; i < 8+1; i++) {
		i % 2 === 0 ? temp1 += " #" : temp2 += "# "
	}
	console.log(temp1);
	console.log(temp2);
	board_size -= 2;
}
you see that for loop
 
var num = 42;
var deepCopy = Array(num).fill(1).reduce((a,b) => (a+b), 0);
var simpleCopy = num;
 
@AwalGarg mmmm why it has to be that way?
@Neil
 
10:19 AM
Hi, I am haveing issue with simple jquery dropdown.
can anyone have a look.
http://hastebin.com/avofexupuk.js
 
@AbdulelahAlJeffery it is still not clear to me what you mean
 
issue is the shown element dissaapears the moment link is mouseout
 
board_size is decreasing by 2 every time the for loop is entered ... which mean I can't use it in the condition of the for loop, so you simply try to make some temporary variable that stores the original value of board_size and that variable has to be a deep copy of the original one to use it in the for loop
 
@AbdulelahAlJeffery sorry that was joke code. deep cloning literals or primitives doesn't make much sense in JavaScript atleast.
 
@AbdulelahAlJeffery did you mean to move var size = board_size outside the loop?
 
10:22 AM
^
@AbdulelahAlJeffery because size = board_size is inside the loop, size will always be updated with the new value in every iteration
Also, start your loops from 0, not from 1
 
I originally want to use size in the condition of the for loop, but it is actually decreasing as board_size decreasing :/
@AwalGarg deep cloning does exist for Objects
 
because objects are not primitives
 
@AwalGarg I'm simply looking for an elegant pice of code
 
3 mins ago, by Jan Dvorak
@AbdulelahAlJeffery did you mean to move var size = board_size outside the loop?
 
lol
 
10:26 AM
1
Q: Cleaning up json includes and usage

IljaI am importing data from json like this import data from './data.json' where data.json looks somewhat similar to this { "data": [ {"title": "Some title", "text": "Some text"}, {"title": "Some title", "text": "Some text"}, {"title": "Some title", "text": "Some text"} ] } so t...

so many bad answers
 
@JanDvorak I meant to use size in the for loop
 
You sure can
 
@MadaraUchiha nit: your answer is incorrect as well. there is no standard loader currently which allows importing JSON in the first place. The JSON file will be parsed as JS code and would throw.
 
size shouldn't be a shallow copy of board_size
 
@AwalGarg Yeah, but since he's using it today, he's using Babel, and it would work with Babel.
 
10:28 AM
@AbdulelahAlJeffery that concept doesn't apply to numbers
numbers don't have identity
 
mmm
I just want this trivial code to look familiar to someone who's never used javascript
 
4 mins ago, by Jan Dvorak
3 mins ago, by Jan Dvorak
@AbdulelahAlJeffery did you mean to move var size = board_size outside the loop?
 
b0y
hei sashi :)
i saw your pen there.. i don't see any issue there.
tell me what are you expecting
 
@b0y Welcome to the JavaScript chat! Please review the room 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.
 
@JanDvorak yes I meant to store board_size outside the for loop
in var size
 
10:31 AM
then just do it(tm)
 
let me guess. you come from C background?
 
babel-core is api. what is the purpose of babel-loader?
 
@AwalGarg yes
 
time to unlearn all the things
 
hi
any GAE user online?
 
10:34 AM
LOL
in python it's as simple as importing 'copy' from the standard library
num1 = 14
num2 = copy.deepcopy(num1)
 
what does that even do?
 
and you get two distinct objects in memory
 
@AbdulelahAlJeffery no. ewwww. you forget that right now.
 
@b0y when user hovers the div (which is being shown on hover of the link) tha content dissappears.....that is because I have added toggle() on hover of the link on the element.....its like section should not dissappear when you hover <li> inside a drop-down right ? it should stay there.
 
you are not allowed to write any python until and unless you completely forget that thing.
 
10:36 AM
<_<
@AwalGarg what thing?
 
@b0y I solved it :) thanks for your time though (y)
2
 
I'm concerned more with the look of the code first, and the performance second
 
update code
 
@AbdulelahAlJeffery copying numbers like that and the facct that deepcopy will create two distinct objects for primitives. see this:
 
Jesus, you have to deep copy a number in python?
 
10:39 AM
>>> import copy
>>> num = 14
>>> dum = num
>>> bum = copy.deepcopy(num)
>>> (id(num), id(dum), id(bum))
(140508632781216, 140508632781216, 140508632781216)
>>> (num, dum, bum)
(14, 14, 14)
>>>
@Neil no... python doesn't do stupid things like JS
 
@Neil let's abstract to concepts rather than examples
 
What's the point of storing the same number in multiple places?
 
@AbdulelahAlJeffery well even concepts are born from necessity of use
 
Does Python have mutable number objects? That's crazy.
 
one more baseless accusation on python and I will come find you and hurt you
@JanDvorak >:(
 
10:41 AM
You don't often see copying of objects in javascript
 
@JanDvorak it's not totally unlikely to come to a point in your code where you need two distinct numbers
 
@AbdulelahAlJeffery you mean two number instances with the same value?
That's crazy
 
@AbdulelahAlJeffery JavaScript does not have passing by reference like PHP has.
 
@Neil well then consider the trivial case in the example, you need to copy the original number once, use the copy in the for loop's condition, and decrease the original one in the outer while loop
 
Primitives are always passed by value, no exception.
@AbdulelahAlJeffery You were given the answer to that at least 3 times now.
 
10:49 AM
Anyone can help me solve this problem stackoverflow.com/questions/37189147/…
 
@mishraoft Welcome to the JavaScript chat! Please review the room 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.
 
@MadaraUchiha I wasn't talking about passing values, I was talking about making distinct objects and why it's not a straightforward thing. I'm just discussing the idea here and not looking for solving my issue or something
 
@AbdulelahAlJeffery In JavaScript, Objects are always passed by reference
And everything else is always passed by value
And there's no way around it :)
 
cough Proxies cough
 
@AwalGarg Go away
 
Ekn
11:09 AM
@MadaraUchiha ... I just finished the game.
 
@Ekn What did sans tell you in the end?
 
Ekn
sans?
 
Both in his judgement and his voice message
Sans the skeleton
With the skeleton puns
 
Ekn
ah... ugh
 
Ekn
11:11 AM
I left them to die in there...
 
lol oops. wrong button
 
Ekn
lol!
can't say I've never been a RO now :p (I was, for ~1500ms)
 
11:34 AM
Homework question: Design an NFA such that

L3 = {w ∈ {a, b, c}∗ | |w| ≥ 3, and w does not end in abc}; use no more than 6 states.

Have to use a "feature" of an nfa, so it can't just be a dfa. I can't think of any way to do it in 6 states
 
@Cereal just to be sure, | means or?
 
That | means such that. eg, w exists in {a,b,c}* such that the length of w >= 3, and w does not end in abc
 
oh
that doesn't make sense to me
doesn't that mean it must consist of only a,b,c?
 
Any combination of a,b,c
Of any length
 
ohh, derp it's not ending in "abc" not not ending in a or b or c
 
11:41 AM
Yeah!
 
well i don't expect to be any help, but it's an interesting problem
you need a state that represents abc has been read
and one for ab
and one for a
hmm
 
Yeah, checking for a b c in sequence is 3 states + initial, which only leaves 2 states for everything else
Likewise if you check length that also requires 3
 
so those need to be the same 3 states, effectively
in regex this could be [bc]..|.[ac].|..[ab]
dunno if that helps
and i guess a .* at the start
 
Build the canonical DFA and hope it suffices
Your regex should be possible to compile into a small enough NFA
 
12:03 PM
function displayAllProperties(object) {
            for (var property in object) {
                var type = typeof object[property];
                if (type === 'string' || type === 'number' || type === 'boolean' || object[property] instanceof Date || !object[property]) {
                    console.log(object + " " + property);
                }
                else if (type === "object")
                {
                    displayAllProperties(object);
                }
            }
        }
what's wrong with this cake ?
 
What's your idea behind object + " " + property?
 
** displayAllProperties(object[property]);
@JanDvorak want name of object and it's property
 
Well, this won't work for that.
 
@Change property is the property name, object[property] is the property's value.
 
@MadaraUchiha at this point, I only need names
 
12:18 PM
Oh, I saw this question
 
@DenysSéguret I was having trouble translating it right
 
You change from item to value. Other than that the code looks about fine. — Denys Séguret 1 hour ago
 
Translating my problems
0
Q: Print all properties of nested objects

ChangeI have a nested JSON object, I need to go through all levels and get properties + object name, This is what I am expecting, MainObject.Property1 MainObject.Property2 MainObject.Property3 ChildObject1.Property1 ChildObject1.PropertyN ChildsChildObject1.Property1 ChildsChildObject1.PropertyN .. s...

 
What's the problem now ?
 
I am getting JSON reply in hierarchical tree but I need to create a flat dynamic table, so my first task is to get all properties names so that I can create a column Names array and use it for creating dynamic table.
 
12:20 PM
and ? Doesn't it work ?
 
nope, not yet, I am not able to find any library for this, neither able to make it work :(
 
err, no
instead of displayAllProperties(object); you probably want displayAllProperties(object[property]);
or it's just an endless recursion
 
fixed that, just couldn't update above code
 
@DenysSéguret that or it'll just be an endless recursion
 
nested JSON to html table is what i am doing indeed
 
12:23 PM
any array would lead to a lot of "properties" logged, too
please stop calling objects "JSON"
JSON is a text based exchange format
There's no JSON here
 
How about "JSON object"?
 
 
@Change json is like xml.. just text in a specific format
 
@JanDvorak you mean "JS objects" ?
 
@DenysSéguret did I called JSON object, sorry can't find it
 
12:24 PM
"plain objects"?
 
There's no such thing as a JSON object
 
Classless objects?
too verbose
 
or maybe new String(JSON.stringify(someObject))
@JanDvorak object
 
@JanDvorak POJO
Object literals
 
POJSO = plain old JS objects
 
12:25 PM
Plain objects
whatever
 
"literal" is the piece of code
 
Is there anything that could combine nested JSON to flat html ?
 
JSON injected into JS becomes an object literal.
 
so much mystery in JS
 
s/yst/is/
 
12:27 PM
my questions remain unEggAble...
 
@Change json is not ideal as a template engine
 
@Neil how about Atom feed ? OData can return that too :/
 
s/ideal as //
 
I have very little control over what format I can get
 
@Change just do what most of us do and write the js that can apply the json as you wish
Json isn't a format meant to be thrown onto the Web page as is
 
12:34 PM
I was really hoping to hear some lib names - cannot believe no way did this before
 
@Change yes
There are many
 
@littlepootis not sure if I can try it with something like this jsfiddle.net/pdexdkg2/5
 
Maaaaybe
 
UPS package tracking is garbage
 
12:43 PM
Because Github is popular, it will help your project grow if you host it in Github.
 
oh god the irony
 
@Change you not only want a library to apply json to html, but it has to be in the way that you want? Welcome to the wonderful world of programming!
 
@Neil I would also be happy to just get nested JSON to flat JSON
 
No wait, that doesn't do what I thought it would
 
12:55 PM
yeah, that's what I thought but couldn't say it
 
this.whatever = (this["what-ever"] === true) ? true : false;
This isn't simple legacy. This is... advanced legacy..
 
That's to improve readability
 
Because when something is true it's really true
 
no but you want "true" to be converted to false, obviously
 
@JanDvorak Ugh
 
12:59 PM
@DenysSéguret how else could you do that anyway? Boggles the mind
 
This is what creates the table from JSON, but it's not flatening the data at same time
/// <summary>
/// Generates the display table of the specified data.
/// </summary>
/// <param name ="data">The data to generate the display from.</param>
/// <param name ="title">The title of the table.</param>
OData.explorer.DataExplorer.prototype.createResultsTable = function (data, title) {
    var me = this;
    var $table = $('<table class="defaultResultsFormatting"/>');
    if (data && data.length > 0) {
        var $thead = $('<thead />');
        $table.append($thead);
        var columnCount = 0;
 

« first day (2039 days earlier)      last day (2925 days later) »