« first day (2338 days earlier)      last day (2835 days later) » 

00:08
anyone here who could help me with angualr2 ?
00:26
@MadaraUchiha you basically want that:
CL-USER> (ql:quickload :swank)
To load "swank":
  Load 1 ASDF system:
    swank
; Loading "swank"
.
(:SWANK)
CL-USER> (swank:create-server :port 4444 :dont-close t)
then M-x slime-connect
yay internets back
holy crap that sucked.
01:17
oh man, hope you're alright :/
01:34
haha yea
now I am anyway
lost it Thu at like 3am
so didn't have it all day yesterday and most of today
tethered my phone to my PS4 so I could at least still play for honor lol
that game uses surprisingly little data
been using vscode the last few days.... really enjoying it actually
I actually turned my nose up at it initially because it's MS and I hate visual studio, but this isn't bad at all
@AwalGarg I'll be in New Delhi in a few weeks.
02:19
@Loktar I've also been using it a couple days. I have in the past, but it never stuck. I want to get it's launch.json and tasks.json set up do be an IDE-like experience. For myself and any future dev on the project.
I shamefully use console.log() debugging right now, not a proper debugger.
lol same
@Jhawins is a beast with the debugger though
I hope to one day be like that
I hope to one day retire on an island
So I have a wee question - does a callback function have to be passed in as a parameter to count as a callback?
@KateDonaldson 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.
02:29
B/c it works the same if you declare it outside the invoking function and just call it by name inside the invoking.
You mean like this?
function foo() {
}
someThing(foo);
More specifically:

function callback(myData) {
  document.getElementById('consoleBox').innerHTML += myData;
}

function getData(dataURI) {
    var timer = setTimeout(function () { // simulated 3 second delay
        var dataArray = [123, 456, 789, 012, 345, 678]; // faked data
        callback(dataArray);
    }, 3000);
}

getData('http://fakedomain1234.com/userlist');

document.getElementById('consoleBox').innerHTML += 'show this before data ...';
vs passing callback as a parameter to getData
google inversion of control
That's valid code, but it doesn't replace most uses of passing a callback as an argument.
1 message moved to Trash can
@KateDonaldson Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
02:33
@CapricaSix OK, sorry
@Luggage - OK; can you tell me why? (and I'm still googling inversion of control)
passing the callback as an argument allows the calling code to control what happens when the data is available.
This allows code re-use.
@OliverSalzburg I regard old phone users as on par with users who stick with IE: iPhone 4s, the oldest to not support iOS 10 / ES6, is released in 2011, 6 years ago and two years before IE 11, and is no longer supported by Apple. I told boss that a system that Apple no longer support will cost extra for us to support too. As for Android, 98% of them can run latest Chrome.
Oh, @Luggage - I get it. Meaning, if I wanted to call getData again and do something else with it afterwards, it's more flexible calling the function as a parameter, so later I could use a different function instead.
Right?
There is a standard way to deal with these. "Promises"
Yeah - I'm learning Promises next; I'm just trying to wrap my head around async as it used to work because I have a little experience writing AJAX calls, but it's rusty
02:36
Yea. And the need for a callback at all instead of just var data = getData(); is because it's async. That is what promises help with.
I'm aiming to teach a lunch & learn at my company about async in a few months so I want to start with the basics and show examples. Best if I know it front-to-back to teach it.
well, you are doing async right now in your code.
Yeah, I'm aware. I wrote a sync example too, to show how it stalls the browser
But those first two examples were with built-in callbacks (in the XHR class), so I wanted examples with visible callbacks to teach with
And then my brain just started refactoring, like, "Why can't I just call the function directly?"
But I definitely get it now. Thanks a lot for your help
so, let's call your callback something more meaningful, like updateUI().
02:38
getData('http://fakedomain1234.com/userlist', updateUI);
or.. with promises:
getData('http://fakedomain1234.com/userlist').then(updateUI);
++ Awesome. Yeah, that makes sense.
// or inline, of course:
getData('fakedomain1234.com/userlist').then(function(myData) {
    document.getElementById('consoleBox').innerHTML += myData;
});
you don't need to star those.
I was just doing it because it was helpful, I don't know if that gives you points or anything. This is my first time in the chats.
Thanks
Nope. just fills the bar on the right right
02:43
On a scale from 1 to -1, how hard is this to read?
for (const column in tables[ tableName ]) {
    table[ tables[ tableName ][ column ] ](column);
}
ouch. like 7
oops. i didn't read the scale.
-0.6
is higher easier or harder?
maybe more weed will help
one sec
I don't know
I don't make the rules
yeah that's a bit tough
the variable naming makes it worse too
table, tables, tableName
lol, yeah
and column should clearly be columnName
02:47
^
table[ schema[ tableName ][ columnName ] ](columnName);
const tableData = tables[ tableName ];
for (const columnName in tableData) {
    const columnData = tableData[columnName];

    table[ columnData ](column); // umm, that's table?
}
I'm trying to avoid unnessesary variable creation, but readability says otherwise
you are just naming variables. it's not "making" any more than it already does when it runs
I suppose that's true
03:07
is anyone here good with react? quick question
04:01
Hi anyone can help me here in jquery
@VandolphReyes 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.
Im trying to create a simple dropdown search plugin, but my problem is the last LI TAG is not working. Please check my code. jsfiddle.net/vandolphreyes29/4pvejuLL/2
when I try to click the last LI, its not detected. Thanks
You can check the console while testing
04:38
is there anyway to specify the date format in datefield ?
@FlyingGambit What is datefield?
<input type="date">
Mmm that's not very supported you know
@ndugger I have no problem reading it, I see the top level as table[ column object ]( column name ); May be cleaner if you use object.entries
@FlyingGambit I don't think that there is a way to but I think only chrome uses the date input so I would use a JS date picker
04:49
thats ok, it has to work properly on any 1 browser, develping something for demo
anyone for my problem?
morning
@VandolphReyes Your dropdown is closing before it can register the click on the last one which is why only the next to last ones don't work. Here I'll write you something..
@VandolphReyes Just use mousedown instead of click, or make a delay in the slideUp() function on blur
@Alesana thanks I will try it
@Alesana thanks for this "Your dropdown is closing before it can register the click on the last one which is why only the next to last ones don't work". I transfered the slideUp inside click and it works.
05:08
Glad it worked for you
05:27
Web authors have no way to change the date format because there currently is no standards to specify the format.
06:13
@Alesana Looks like the wrong people are developing HTML
I guess they want it to match up with a user's locale regardless of how the web developer wants it? Kind of how they don't let you redesign other certain things that might take away from user experience.
I'm confused why this chat is also Bluetooth
06:30
Some of the ROs are crazy
07:07
it's usually some internal joke when the room name changes, you have to search up the history
07:43
afternoon :)
07:54
Afternoon ^^
@Alesana Do you have skype ? :D
I do @NguyenTungs
Yea, Could you please give me nickSkype? Can i have a word with you?
08:11
What is it for?
               ({ type, thumbnail, text }) => ({ type, thumbnail, text })
Best code I wrote today
you should write a few lines to add syntax support for <=> for even more wows
08:32
@Alesana About simplicity
I am trying to use .on("click" ... and pass it row-specific data. Here's what I have so far:
<html>
<head>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script language="javascript">
function alertF(event)
{
alert("hi, rowIndex = " + event.data.rowIndex);
}

$(document).ready
(function()
{
$(".popupElement").on("click", rowIndex, alertF);
});
</script>

</head>
<body>
<table>
<tr>
<td>
one
</td>
<td>
<a class="popupElement" href="#">two</a>
</td>
</tr>
<tr>
<td>
three
</td>
<td>
<a class="popupElement" href="#">four</a>
</td>
</tr>
</table>
</body>
(see full text)
It says rowIndex is not defined; how would I write this so it was?
08:50
I'm pretty tired but sure haha
Hmm @arcy
That's because it is not defined?
(sigh) yes.
Look, I'm used to Java, not JS, the scope stuff here leaves me a bit baffled...
Ah okay
<html>
<head>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script language="javascript">
function alertF(event)
{
alert("hi, rowIndex = " + event.data);
}

$(document).ready
(function()
{
$(".popupElement").on("click", { row : this.rowIndex }, alertF);
});
</script>

</head>
<body>
<table>
<tr>
<td>
one
</td>
<td>
<a class="popupElement" href="#">two</a>
</td>
</tr>
<tr>
<td>
three
</td>
<td>
<a class="popupElement" href="#">four</a>
</td>
</tr>
</table>
(see full text)
Oh okay no need to share it twice
The problem appears to be that the .on() gets called before the table is defined; I don't understand how to define it so that the row information is available when the event is fied.
fired
08:58
So what are you trying to do exactly?
(the two are different; I've been trying different things)
The ultimate goal is to produce a popup containing row-specific information; we're a JSP shop, and I'm not worried about producing the dialog, etc.
so it seemed best to boil it down to essentials, and the part I don't know how to do is get row-specific information into the event handler.
Ahh I see what you're doing
I've read that rowindex is supposed to be available on a row, though I can't seem to find it within a breakpoint in the invoked function...
If I pass 'this' instead of 'this.rowIndex', I get a row at a breakpoint in alertF, but I can't find a rowIndex there.
How do I select all the tr elements except one. I want all but $($event.currentTarget).parents("tr")
How would I do that ?
09:15
sigh, apple calendar birthday notifications started again
I think it's just index()
Which one do you not want @FlyingGambit?
@Alesana Actually I am trying to edit a table row, so wanted to show all other rows as disabled
$($event.currentTarget).parents("tr").not("#id-of-one-you-want-not-to-select");
Are you using some table plugin?
@Alesana you said you saw what I was doing, any idea how to do what I want?
@Alesana no just a html5 table , trying to make something quick for a demo
09:24
@arcy Oh yeah sorry I had forgotten about that haha give me a sec
@Alesana thanks that worked
we'll never reach singularity if we keep using jquery >.>
@FilipDupanović TBH, it's more like "we will never reach it, if we keep using jquery"
@Alesana I'm sorry, don't seem able to make that work.
I put that ready function definition into my code, but it doesn't invoke my routine
I put my routine in to be invoked, but its data is that function definition, I don't know how to evaluate it.
09:42
Ahh okay
09:58
i am not going to get a change to look at it tonight i am about to fall asleep if it's still not working tomorrow and nobody has helped you out with it I'll be around
well, thanks for the attempt
I didn't realize it would be this difficult...
10:09
@tereško that's exactly the same thing
Anyone else want to take a crack at referring to row data from within an on("click") function ?
I'm stumped (not that that's hard for me, in JavaScript)
you can do it :)
think about what you have access to when clicking
and think about how can you use it to find out where in the table you are
That doesn't help.
10:30
you're just not looking hard enough
hint: you can get the element that has been clicked on
interesting ...
@MuhammadSufiyan 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.
I get that often
@towc look, I don't know much about this language. It doesn't work like other languages. I'm asking for help, not 'hints' as though we were in some kind of strange trivia contest. I would like to have your help, but that's not what you're doing.
I'm using my time to help you, not to do your homework or give you copy-paste code
what you said just now is very disrespectful
10:35
If this is your idea of help, then don't bother. See above, you are not helping.
have you ever been here?
If there is a function call that can give me a reference to the thing that's clicked on, great. What is it?
we're not anyone's slaves
no, you should read the docs for jQuery like we all do,
or simply google "get element from jQuery click" or change that until you find your answer
I know your answer but that's not how I help, that's how you get lazy
Guys where can I write to admins or moderators about chat errors?
10:39
@MadaraUchiha thank u
I have now googled perhaps 25 things. I have had 4-5 things suggested to me, all of which were not close to what I needed. I can't get definitions from anyone, just examples of things that don't do this functionality.
let's go through them
what was wrong and why
I am not attempting to become fluent in JavaScript; I'm trying to get one thing done so I can go back to my real job (which is not this).
if this is your hobby, then you should be ok with spending time to do it properly
If you know this function and can tell me what it is, fine. I do not see any point in going through a bunch of stuff that doesn't relate to my particular problem.
10:40
if this is your job, why should you get paid if we do it for you?
ok, it doesn't look like we're going to have a meeting of minds. Let's just stop talking.
if you are willing to pay me, depending on the amount, I'll be very glad to tell you right away, otherwise I'm going to help you the proper way
Alright, settle down
@towc There's a thing called backing down.
@arcy no, your thinking is simply disaligned with the philosophy of this room :)
Actually, you're not going to help me at all. We established that already
10:42
@arcy Look up what this is in jQuery event handlers, and what event.target is.
That should get you started.
But when the on() function is executed, the thing that I want to refer to isn't defined yet
all yours madara :P
@littlepootis omg :D
@littlepootis ))))) oooohhhhh xD
10:47
@arcy jQuery uses what's called event delegation
It places an event on a common ancestor (usually document), and filters inside the event handler
I read about that -- it seems to have to do with 'bubbling up' events to ancestor eleemnts
@arcy Yes
This is done behind the scenes for you, but the effect is that you can have an event handler on elements that don't yet exist.
@arcy When you click on a table cell, you also click on the row, and on the table, and on the div containing the table and so on.
Events bubble up the DOM tree like that, and jQuery takes advantage of that.
@MadaraUchiha from the documentation for the on() function:
Event handlers are bound only to the currently selected elements; they must exist at the time your code makes the call to .on(). To ensure the elements are present and can be selected, place scripts after the elements in the HTML markup or perform event binding inside a document ready handler. Alternatively, use delegated events to attach event handlers.
@littlepootis lol
Our shop puts all script into a separate file; I guess I might talk them into letting me put it in the JSP, but am hoping there's a way I don't have to.
10:53
@arcy .on() cam do both.
Keep reading the manual entry.
It's there.
I don't want no friends :,/
I'm happy with my pillowcase
well, it doesn't mention binding again...
it gives me all of my social needs
look! It's saying hi to the room!
say hi to the pillow, room!
@arcy It does have examples on event delegation and how to get the element that got clicked though
@towc Are you off medication again?
We told you that it's not good for you.
10:56
λes
Anyone here been in a hackathon before? What should I do to keep myself from passing out (36h).
@littlepootis if you like the hackathon and are enjoying it, you'll survive
I don't think so.
have you ever fallen asleep while doing something you're excited about?
I have a history of passing out by thinking about it.
10:58
oh, then that's on you :P
the solution is drugs
lots of them
or haribos
and make sure to mix your vodka with your beer
I'll finish this shit in 15 hours and retire to hotel.
do you know if there will be free food for all?
Of course, there's going to be free food.
then always have some underhand
your brain will probably feel rewarded in whatever its doing and knows that if it will stay awake for longer, it will have a lot more reward
so keep eating
I have no scientific evidence to prove this, but it sounds right and I don't really see how it can go wrong
and honestly, just remember to enjoy it
@littlepootis looooooooooooooool
11:01
think that you may wake up in 2 days, a week, a month, or a year, missing those moments
so have a look around, breathe the environment in
look at the faces, talk to people
eat loads of free food :3
You sound like you've been in one. How did it go?
I mentioned that I've been in a couple some time ago :P
they went well. The first one was a 48hr one, and there were loads of interesting people like PhDs and all sort of clevers. Took my time to talk to them and have a feel for what they were doing
@towc that doesn't sound right; that should send you sleeping
@MadaraUchiha I've got some code using event.target, but its value appears to be the URL for the file containing my test. I expected it to be the "innermost element", i.e., the <Td> I clicked on
I could paste it here, it's 32 lines...
I should stick to vegetarian food.. anything else just puts me to sleep.
11:06
ate loads, went around the venue while thinking about how to get a good non-convential ux for the thing I was building (innovative but meh, with a lot of potential, is very often a lot better than very well done according to current standards)
and I'm very pleased to have done that, got loads of memories, connections
the second one was at king's college, in london. Only students, for ~8hrs
what did you work on?
How long was the first?
we were all in a fairly small room, around 70. Half couldn't code so they were given tutorials with python by some of the current students
oh. The objective of the first one was to put the data collected by a weather company to good use
with a focus on floods
I'm working on something similar.
11:08
some build amazing flood models and predictions, as well as showing what areas would be flooded in which circumstances in a 3d map, they were amazing
Except it's data collected by the Dept. of Chemicals and Petrochemicals.
Oh, I remember you brainstorming icons for that.
me being me and not knowing much about anything, I convinced my team to work on a silly game to educate people on floods
@littlepootis oh no, that was for a company that I worked for after the event :P
I might still have the site somewhere. it was so silly, yet we won the popular vote and got featured in various journals because it had some potential
@littlepootis what about pasta?
11:11
not to mention that I was 16. In that case, it made it slightly more impressive. It's not something I can count on for the rest of my life though
2 days ago, by little pootis
This hackathon's prize pool is $74829.8. Wow.
17 is already old
@FilipDupanović They don't serve pasta
I mean... usually when you eat it, do you fall asleep as well?
11:12
this was the final build I think: github.com/wselwood/interception
@towc nice
it's so bloody silly
All hackathon projects are silly
in the end it was just a quiz with a fancy-ish UI that doesn't really work
on my first one, I spent most of the time getting RequireJS working
11:13
but we implemented systems that did add a lot of potential
@FilipDupanović lol
the trick is saying "we built the app with a focus on extendibility and improvement, so everything you see is highly customizeable and easily editable" at the beginning of the presentation
then explaining how something can be made better here and there
Also, probably all I'll do during the hackathon is write PHP (Laravel).
@towc lmao
came up with that nugget on the spot while my teammates were presenting and making it slightly awkward 😛 it saved us, I'm so proud of it
smooth move
11:16
I'm an awful person
hacky IIFE because I didn't have time to google how to do it properly: github.com/wselwood/interception/blob/master/static/play/…
even if the whole thing is an abomination, it does read quite well, I'm pleased
oh god, I remember it was like my 3rd day of using vim XD
man that's brutal
anyway, the second hackathon was less interesting because I had 40 hours less to do anything, and the organizers asked us to do "anything, using any technology, and whoever does the best thing wins". It makes no sense as professionals, but it was understandable because most of us couldn't even code
So, the first was 48 hours long.
yeah
I think
actually, probably 36
11:23
And you stayed up the whole time?
There's going to be a lot of girls at this hackathon.
I'm seeing if I can find the thing I did for the second hackathon
@littlepootis aye. A lot of sugar was involved
@littlepootis lol you pig
jfc I wish I could stay awake on sugar
pootis, when's the hackathon?
April 1,2
27 teams in New Delhi
sounds like it's going to be stressful with the 78k involved, but at least you have time to prep up
how long do you need to stay awake?
36 hours
There are about 1250 teams in this thing.
Each team has 6 peeps.
11:31
I can give you some bad advice you can try out in the meantime and see how you respond
starvation works on it's own, the chemical pathways will keep you up for a long time en.wikipedia.org/wiki/Starvation_response#Biochemistry
if you can switch your mitochondria to ketones, you'll get through it without getting distracted
there's a nice nicotine antagonists like acetlycholine that will enhance your attention, you can strap on a low dose patch and surf that train en.wikipedia.org/wiki/Acetylcholine#Central_nervous_system
don't take the chewing gums because they're super loaded, you'll just be sitting there high on nicotine and all spaced out
Does this mean I need to take frequent naps?
cat naps boxed to 15 min max
there are some nice references on that from here, the article on polyphasic sleep en.wikipedia.org/wiki/Polyphasic_sleep
if it's dark, keep a light on or some music playing so you don't slip into sleeping for long
if you have showers, you can jump in and take a cold one and flush yourself with norepinephrine once in a while
@towc manages to work on food, so at least he cracked his good picks; stick to what your brain wants, which might not necessarily be everything that's being offered; glycemic surges will lead to an inflammatory response and it'll compete with synthesizing hypocretin
and music. Music kept me going most of the time
ok, got toghether with the other main dev in my team in the second hackathon and after sometime we put toghether the pieces :P
and he reuploaded it to his site
it's really quite bad
he didn't believe in indentation (he wrote the jQ and html)
and my JS doesn't read nearly as good as it could
@littlepootis
11:57
Amsterdam was great.
NL is really nice, hope you had a chance to visit smaller towns
It was my 8th time there, it was fun.
oh great, so you're already past getting the questions like: bro did you go to the red light district; bro did you get stoned :/
yes, obviously.
12:13
@BenjaminGruenbaum brroooo did you get stoned at the red light district?
Sup @Zirak ?
Still alive
anyone have an idea how to do a pinky swear using emojis?
yasssssss
/dev/sdb1                    2.0T   66M  2.0T   1% /home/user/mount
bought 2 usb 2T drives from wish.com
they're so bloody small
like, smaller than your common 4gb usbs
don't forget to pull them out before you throw your laptop into a backpack xD
12:27
you silly person :P
oh nooo, I never had that happen... never (:
13:15
Hmm.. For the default look of my custom element, should I keep it plain for other people to style more easily, or should I just make it look fancy anyway? Completely disregarding the functionality, just CSS.
14:04
has some wrong code, lemme fix
Is this easy enough to read and follow along? paste.ofcode.org/umfDhkfYFQpvdnbyuPQ8yg
seems to make sense
flow is good
Cool beans. I finally have stuff saving to postgres on AWS. This is the most I've ever done with databases
I have all of the tables creating and updating programmatically
so that's cool
looks cool (y)
I sometimes extract the queries from the controllers and collocate them somewhere; helps with reuse and readability, when it makes sense
14:44
Hello guys
i am sure that most of you, use linux everyday
i try to setup a web server on ubuntu (latest). After the installation i configured my directories as follows: drwxrwsr-x 2 www-data developer 4096 Μάρ 11 16:33 html
one issue is that i can't create directories inside the html. I am logged in with the user who is member of group developer as a secondary group
15:03
lol, i should logout my user in order to get the new permissions.
@towc That is 2 TB? O__o How much was it?
I bought a small WD Elements 2 TB the other day
Which is obviously slightly bigger :P
15:22
Are query parameters always an anti-pattern? Should I always do a post if I'm expecting input from the client?
I'm thinking for pagination of an object type
would I POST data that includes a limit and page number, or can I GET /api/object?limit=10&page=2

« first day (2338 days earlier)      last day (2835 days later) »