« first day (2378 days earlier)      last day (2792 days later) » 

00:07
Hi all
common lisp is fairly nice library support could be better
Is there anybody who is eager to help me out with a JS issue related to an answer at SO?
just ask your question did you read the rules
@ndugger Hangouts still going on?
@Trasiva kind of
00:10
kendalls 'off screen', and nick and I are talking
@William I did...a minute ago
Beam me up Professor Dumbledore.
@William but my parenting taught my politeness...what shall I do? ;)
follow dem rules, don't ask to ask just ask
Please have a look at this comment http://stackoverflow.com/questions/3753483/javascript-thousand-separator-string-format/19840881#comment74069371_19840881
Please ignore the (German) language therein, just follow the second link and you see what I mean.
The first link therein links to the script that created this.
Please don't collapse, JS isn't my favorite language (yet).
00:17
wat
And yes, I know, it's <Tab>s. Not my fault if these sites can't handle a proper indentation with them. :)
@derp what "wat"?
in the butt
3
Gerold you have posted quite a long script which is likely why nobody is reading it
I haven't posted a single script. I linked to it. If one doesn't want to follow the link he/she is not supposed to.
BTW, is "in the butt" the usual tone here?
well I looked at it, but I dont know what I am looking at or why so I closed it and went back to work
@GeroldBroser only when people say what what
00:22
i had a similar experience as hsimah
I didn't say "what what" either. It rather was "what wat", in reference to @derp
@GeroldBroser I know, but the song goes what what in the butt
I don't know this song.
@GeroldBroser then you have missed out, let me help you youtube.com/watch?v=fbGkxcY7YFU
Thanks, but I prefer youtube.com/… right atm.
So, nobody here who can help me, right?
00:27
what do you need help with?
as far as I can see you haven't actually asked for anything other than help :)
i have no idea what you are asking
does SomeKitten still visit the channel? I'm visiting their blog and its full of great advice
Starting at http://chat.stackoverflow.com/transcript/message/36712118#36712118

@derp You expressed that already, why do you repeat yourself?
@GeroldBroser don't panic
Never...ever
@GeroldBroser mate I looked at it, what are you asking us to do?
00:32
@hsimah Really? This img imgur.com/a/jhO6Y in conjunction with parseInt(number).toLocaleString()in the answer I linked needs further explanation?
It's for programming and programming in JavaScript experts here, right?
yes, but you haven't asked a question
@GeroldBroser I think they're asking for a minimum code example that outputs the error and the desired results.
you just linked some stuff to us
Good night every bloo body!
NOO
Don't leave :(
Now I have to find another Austrian :(
00:36
I am an Australian, is that close enough
hey high five!
Have you eaten kangaroos?
yes but only once
its hard to do it right though because its so tough and gamey
That would be perfect for my slow cooker
i guess so, but where would you find kangaroo in Austria?
00:39
No, I wanted him to translate this song for me: songtexte.com/songtext/dicht-and-ergreifend/…
I think I could ask @GNi33
oh where abouts are you badgetcat?
Mexico!
Playa del Carmen, to be specific
oh man it looks beautiful over there
the images on google maps reminds me of thailand, but i suppose its along the same equitorial line
do you get many tourists there or is it more of a local town?
yeah, it is, we live one block away from the beach
There are lots of tourists and also a nice expat community
nice
00:44
But it's still nice, we live more like locals because I know how to get around
yeah!
We have beautiful beaches and cenotes: zorrodelahorro.com.mx/wp-content/uploads/2015/08/…
Cenote = cave with water
wow that is pretty cool
I was in california for easter
cool not as cool probably
If anyone from the room wants to visit, they can crash on our couch
And we'll take you to the best spots
I've always wanted to crash a couch
00:52
just ride it down the stairs
did I miss the google hangout not sure I am a regular - darn stupid school and classes
you missed it
01:12
@BadgerCat that is beautiful
@KendallFrey 👍 👍
what is the priest throwing on them - of course lol - they should bring some to space
Holy water
A hindu priest would be throwing cow piss instead.
your joking right?
May 9 '16 at 6:53, by little pootis
I just drank cow piss. fml
blaah!!!!
@littlepootis cow piss or cancer... it's a tossup really
01:37
@ssube I'm workin on my typings for my jsx thing. I use intrinsict element with dashes (it's valid jsx, and matches my domain. e.g. <table-row />
But.. guess what doesn't work in vscode intellisense..
that one thing you just said?
Yup :(
<tableRow /> and <table-row /> both work in my library (I transform the name), but i have been using the latter in my code..
<tableRow>foo</table-row>
that won't work, of course.. :)
well, i could just provide types for both..
interface InterinsicElements {
    tableRow: Props,
    "table-row": Props
}
and of course attributes have the same issue with dashes..
 
4 hours later…
05:20
hello , anyone here ?
@Kain Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
@ca
@CapricaSix okay
I code something like Jquery to handle the DOM ,
`var $ = (function() {})` that's works well , but I need the $ variable to contain arrays and objects alongside functions .
wait if you are using jquery, you probably don't want to name a variable $
oh right you are implementing your own jquery
could you give an example of how you want to call it?
if you want to simply set a property on $, all you have to do is go
$.key = 'whatever'
no that's not the point here ! I love jquery and I use jquery in my projects . the point here I hate type the same code multiple times, so I use it to minfy the DOM code
what I really need is create a prototype for the main function so I can call it like this
$("hello").alert(); will result in alert with hello
05:37
1 message moved to Trash can
@Kain 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
@derp It working fine with the main function which handle the DOM :https://hastebin.com/sahobafuxo.js :3
anyone awake and willing to help?
@GrafixMastaMD Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
0
Q: jQuery Selection can't select all elements

GrafixMastaMDSo I have basically created a quick little extractor. I want to be able to extract data. I am able to select all of the strong elements. But for some reason when I go to select the p elements. I am not getting any selection. See Js Fiddle: https://jsfiddle.net/xmikedanielsx/e34he23d/1/ var h = `<...

@Kain, you may have a bug for your class and tag selectors in that it will only return the first element
though in the example of $("hello").alert(), how do you know that hello isn't a tag name?
05:44
yes that's issue I will try to solve it , but it's not the point again !
ooookay...help me understand
@derp I need to use a prototype , that's the big problem here I tried this code :

this.alert = function() {
    alert(id)
}
this code inside the main function
so this return undefined
1 message moved to Trash can
@Kain Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
var $ = (
  // DOM usage
  function $(id) {
    if (id.includes("#")) {
      return document.getElementById(id.replace("#", ""));
    } else if (id.includes(".")) {
      var x = document.getElementsByClassName(id.replace(".", ""));
      for (var i = 0; i < x.length; i++) {
        return x[i];
      }
    } else {
      var x = document.getElementsByTagName(id);
      for (var i = 0; i < x.length; i++) {
        return x[i];
      }
      return {
      	alert: function(){
        	console.log(id);
@rlemon You had banned me in Sandbox for testing purpose http://chat.stackoverflow.com/transcript/message/33465644#33465644
Could you please unban me from Caprica ?
06:00
@derp yes that's what I'm talking about :) thanks man
don't actually use that though, this is a terrible idea
people assume jquery when they read $
I use the dollar sign for test only because it's fast to type than underscore or letters
for every line of code written, it gets read many many more times
just something to think about
do you mean the $ like a loop ?
nah read as in by humans
so its better to optimise for readability over speed of typing
06:09
@Mosho no? Lemme check real quick, anyway you're admin on the repo
enabled
oh , yes I understand you , I will use another name instead
06:24
@BatCat That doesn't look like a "test".
@Cerbrus It is in a sandbox..
and very obvious.
Plus there is no other reason..
rlemon doesn't "test" Cap bans. He knows how they work.
There is no other reason to ban..
Why would someone simply ban ?
@BatCat That you know of. I'm sure he has his reasons.
if you've checked the response, you will see that your id is already in cap's " mindjail "
06:28
I have pinged him let us see what he says..
@KarelG Oh, you're right.
@KarelG Do you have the ability to look and tell me why is that ?
Not really, no.
no, but I have checked your activities... frequent name changer heh ?
@KarelG *Facedesk*
06:38
@KarelG Yeah SO allows to change names once in 30 days
So
So what? doesn't mean you should.
I haven't changed my name in ~4.5 years
@Cerbrus Well I guess we have freedom to do that ..
Whats wrong in that ?
Many people on SO do..
Does SO ban them ?
Not sure if that is the reason for ban..
No, but people changes their name because of what they did in the past
We're not saying that's why you got Cap-banned
We just noticed it's something you do.
06:52
Not all you cannot generalize this..
Hmmm ok :)
I didn't generalize. You're free to change your name. I only have stated that you have changed your name frequently
lol @ this for loop: for (int i = 0; i > -1; i++) from here
CV'd as typo :P
@Cerbrus That's not a typo though
for (unt i = 0; i < 1; i++) that's a typo
is there any really lite version of ansible vault?
one that doesn't require ansible and ansible vault
even better if it's an npm tool
Guys, any idea if its possible to regain focus on a window after clicking a download? Initially I used an anchor but also tried opening a new window in js, setting the current location & using a hidden iframe but when the file is sent as an attachment to the browser the focus is always removed from the client window.
07:04
@Anth12 Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
Is there a tool that can visualize in what order and from where files, objects and so on are called?
I losing overview of my project
@Tweakimp Welcome to JS!
If you don't keep your discipline, it gets hard to follow.
class diagrams comes handy... but there is no one for javascript because that language is too shady for UML class diagrams
There are also no classes in JS
And it's entirely possible to write an entire app without using a single constructor.
true. But you can treat objects as class instances ;)
07:11
Not always
yeah. eg. functions
Sometimes functions have properties, sometimes objects are dictionaries, etc.
@Tweakimp At about this point I'd introduce TypeScript into the project.
07:44
@BadgerCat good lord, what is this? :D
it's bavarian, but the dialect is very similar, just differences in some words here and there
08:10
Hey guys - any JavaScript + HTML5 Canvas ninjas on here? Please give me a shout if you can help me generate random width blocks and fill them to the width of the canvas! Thanjs
@dk_french032 Welcome to the JavaScript chat! Please review the room rules. Pleasedon'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.
jsfiddle.net/n5kgbe3g/1 - I need to generate a number (by var number) of blocks and give them a random width and then fit them to 100% width of the canvas
"give them a random width and then fit them to 100% width of the canvas" What do you mean by that?
I think he wants to draw more blocks to fill the canvas then?
So say I want to generate 5 blocks. I need 5 blocks (with random widths) to fill the width of the canvas. I.e not go over the canvas
08:14
but if the canvas has a fixed width and the blocks should have all the same width, random width on the blocks is not going to fly
the width is not random then
Yeah i need the widths of the blocks to be random...
Random between 0 and what? Canvas width?
then you won't be able to always achieve a good result, unless the margin between the blocks is variable
873
Q: Generate random number between two numbers in JavaScript

MirgorodIs there a way to generate a random number in a specified range (e.g. from 1 to 6: 1, 2, 3, 4, 5, or 6) in JavaScript?

If you want to see promises in core - back me up here :P
08:21
anyone uses vue.js here?
Thanks @Cerbrus
anyone uses vue.js here?
any UML diagram users here (visual paradigm) ?
I'm sending a string over a TCP socket and I want to know when it's done
should I send the length first like http or is using some crazy separator good enough
08:31
FIN msg ?
what's that
part of TCP protocol
it's going to work with a unix socket too
it says the receiver hey "end of stream"
I'm only using TCP because I'm on windows
and I'm never closing the socket
08:34
well, just send your TCP msg with FIN flag up. The server will know that the stream is ended and that the client will listen to the server (usually, it responds with ACK) before connection gets closed
connection is never closed
if I closed it then I would know when it's done
OFFTOPIC: Does anybody know how to remove an unmounted drive from nautilus in Ubuntu? prntscr.com/eyg3x6
uhm ... can you listen to ACK messages from server ?
I would rather not
complicates things
I'm not using anything other than the low level net API from python/node
working on layer 4 is complicated :P
08:38
I'm just going to look for a unique separator
simplest
you can do that yes
use a signal ASCII char number :P
I was planning on using ~\~|~/~~WAT~~\~|~/~
!!> '~\~|~/~~WAT~~\~|~/~'.length
@KarelG 17
make it 16
08:41
lol k :P
09:01
@Cerbrus I have managed to generate random heights (not exceeding the canvas height), but i am struggling to do so for the width of the block. Any help would be greatly appreciated. - jsfiddle.net/n5kgbe3g/5
@dk_french032 You don't need the + 1 at the end of that random there.
just use the i towards the number of shapes you're creating
I still don't know what exactly you have in mind with the widths
@KarelG thanks
09:06
hi guys i'm having a problem with an asynchronous callback function in a seperate file that executes before the query can return data
jsfiddle.net/n5kgbe3g/7 <-- don't update the stage in the loop.
@Cerbrus I just want to create x number of blocks with random widths and they must stack next to each other not passing the width of the canvas
So, set their max width to be 1/x th of the canvas width?
i think the code is too much for the chat i'll just leave the link here stackoverflow.com/questions/43511469/…
ah yes the update ... didn't saw that D:
09:13
@Cerbrus @KarelG So I would generate a random number between the length of the canvas and the sum of the width of all blocks already placed?
Sorry, my brain is fried from this problem.
So, you want to fill the width, but the columns must be randomly sized?
Yes. The width doesn't necessarily need to be filled but the blocks must not exceed the canvas lenght
Filling the width would be first prize though
Right.
For all but the last element: Get a random width between the minimum (10?), and whatever is left of the canvas (-10 for the last one). The last one will be the remaining width...
I'm not gonna build that for you, but as long as you keep track of the total of the previous columns' width, this should be doable
@Mosho any reason you're not using http?
it's two processes on the same machine
I was asked to use unix sockets
09:28
@Cerbrus thanks!
greetings, programs! o/
anyone got an idea why my callback function gets skipped and then executed after a POST although its supposed to be called before?
09:44
hm.. anyone understand what 'Program node server.js exited with code 1' actually means? got a node server.js file offering up a Vue.js-laden index.ejs/client.js combo to the browser. On our internal developer server everything is shiny and works as expected, but once we push it out to a production server facing the outside world, we start getting the above exit message...
..., as if node crashes then restarts a couple of seconds later. But within that few seconds the browser has given up on the server (client.js tries to make a socket connection) and stops.
10:00
wow put everyone to sleep already :D
How can I read remote shared network folder in nodejs
doctor google could have advised you some pointers already ...
@Mosho great, use unix sockets but just use http on top
You can run HTTP over TCP
what would that give me
Not having to worry about shit like string length and implement the concept of headers and body yourself.
10:12
var width = function () { return $(".myclass").width() - 10; },
is this right way of adding properties ?
then I will have to call width()
@BenjaminGruenbaum not doing any of that, separator is enough
for me, for now
this works like a dream: npmjs.com/package/phantom-pool
@KarelG I'm reading file using smb2, but it says it is under development mode, do you have any better idea?
10:29
@Mosho eh the "security" note at the bottom
it's reasonable methinks
phantomjs has methods to clear cookies etc., you are free to use them
yes, but if people uses that package (i don't use phantom myself) and doesn't give a f*** about those cleaning, then there is an open door for security issues
so he has the note, but I don't think it's his responsibility
you could have the same issues using phantomjs normally
ofc it's not his responsibility. It's difficult to manage it himself
I guess he could add a flag/option
10:37
:-( LibreOffice crashed ... and didn't save for 20 fucking minutes
Doesn't it have recovery like ms word?
@BenjaminGruenbaum can you check for me how we got the response from the stock page's generate pdf request to make browser download the pdf?
headers etc.
I can't get it to work
^-- lol
noice
@Mosho We use a HEAD request of all things
But as far as I can tell, the only special thing about the response is Content-type: application/octet-stream
10:44
danke
@Mosho HEAD request
@MadaraUchiha I had my reasons
Mysterious are the ways of the Mosho.
11:02
sounds like a Secret Squirrel thing
:O why would Bootstrap 4's documentation not have ; after the end of their JS functions?
!!tell Alesana why
@Alesana because you touch yourself at night
Or moreso, how did I not know it wasn't obligatory to use semicolons in JS
Oh
But how did
Oh god
@Alesana You best treat it as if it were.
11:09
I better put tape over my laptop webcam
Your life would be better that way.
With tape over my laptop webcam or with semicolons after my statements?
BS4 is trying to be all hip and ES6-esque
@Alesana With tape over your semicolons.
@Cerbrus Ah I don't know how I missed that one
In reality though it would drive me crazy not to have semicolons after my statements;
11:12
@Alesana Yes.
There's nothing sacrosanct about a semicolon. A smarter parser can easily detect the end of a line without the semicolon.
@thedigitalmouse Yes. Not JavaScript.
*Googles sacrosanct*
I just think it looks much better with a semicolon personally
I agree;
11:14
@Mosho HEAD request is dankest
@thedigitalmouse uhm ... yes/no
Python, Lisp, Clojure, Lua, Pascal, Delphi, and dozens of others survive quite well without the semi-colon. Embrace, rejoice in not having to type one extra character per line, and grok the fullness of well formatted and documented code! \o/
@thedigitalmouse How should the parser behave in this instance?
function()
{
  return
  {
    foo: 'bar'
  }
}
eh Lisp has end of line
it's denoted as last )
@thedigitalmouse Lisp doesn't even have statements
And literally everything is delimited with ()
So why would it need semicolons?
11:20
it doesn't need a semicolon, because that has already something to indicate end-of-something
js functions doesn't need semicolon because it's easier to know when to end, just look at the last }
my point was that ; is just how JS and a variety of other languages determine EOL or 'end-of-statement' because the parser is written that way, often just inherited behavior from an older cousin or what the developer was used to.
I like semicolons. and braces. Writing python still always feels just weird
@MadaraUchiha could use EOL or even the braces to define contents/scope of the function or statements
@GNi33 can use semi-colons with python too, if i recall
@thedigitalmouse EOL: Nope. Not for multiline objects
Braces? they're optional sometimes
if(foo)
  bar()
@Cerbrus just have make the parser smart enough to know the difference :)
11:24
Frankly, I'd rather have JS require semicolons.
2
english uses semi-colons... no reason to not use them in programming languages too :D
11:38
@thedigitalmouse yeah, might be
I try to adapt to some standard styles though
@GNi33 standards are good
I'd agree

« first day (2378 days earlier)      last day (2792 days later) »