« first day (2526 days earlier)      last day (2645 days later) » 

21:02
not an instance of
I am trying to see if its a Constructor or Instance
I thought of using .prototype
Foo.prototype.constructor === Foo
a constructor or instance? You mean a function or object?
If it is a constructor, it's constructor will be Function, right?
and if it's an instance, it's constructor will be what it is an instance of
@Shrek Aren't constructors just instances of functions?
yep
```Kappa2.prototype.constructor === Kappa2```
so...
what are you really trying to figure out?
21:08
Kappa2.constructor === Function
given that constructors and instances aren't mutually exclusive
Just trying to figure out if a module exported a Ctr or an Instance
every constructor is itself an instance, so i assume you want to know if it's an instance of some particular thing?
What if it's neither? What if it's both?
What do you want to know if it exports 42? What about a non-constructor function? What about just a plain object with properties for module members?
:39168330 But... that's determined by the importer, not the module.
21:10
@KendallFrey that would be a reference
This isn't Haskell boi
@Rick What would?
property on an object
@KendallFrey that is where i am stuck at
Well if you don't know what you want, I can't help you get what you want.
I do know what I want
i just wanted to shim if a module exports a ctr or an instance or a simple object with properties
but I think instead of doing the magic, I should make the sub module
simply export in a format.
21:18
Well I don't know what you want
21:30
I don't understand the problem, detecting constructors vs objects is super easy.
@Rick JS doesn't quite use references
McPointers?
$.pointer
<Pointer />
I've started a blog where i can share my knowledge with the community. As community helped me a lot in my learning process, it feels like obligatory to me that i need to share my knowledge that I've gathered so far with the community. Here i am posting the link to my blog . I would love to receive feedback and modification suggestion. Thanks

https://javascriptwriteup.blogspot.com/
there are no pointers in javascript, but compound values like objects and arrays can be assigned by reference
21:40
apparently chrome on my iphone updated and now it tells me when i'm at a restaurant.
I need to tweak my settings. mine always asks me to rate the places I'm at
988
Q: Is JavaScript a pass-by-reference or pass-by-value language?

Danail NachevThe primitive types (Number, String, etc.) are passed by value, but Objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object ...

@AL-zami I stopped reading at THIS === window // true
your tutorials shouldn't contain reference errors.
Assuming I have the following code:
`let returnedCourses = this.sortedByTermCourses.map(year => year);`
Any changes to the array `returnedCourses`should not be affecting `this.sortedByTermCourses` ?
that first code block also has a ton of extra dashes around it
@BuddhistBeast map creates a copy
21:44
map returns a new array, yes
@rlemon but it evalutes to true in console ?
@AL-zami no it doesn't
js is case sensitive.
@rlemon ah! should i put in smaller case then? i was pointing to "this" keyword in capital letter .
which is bad enough in the paragraphs before hand, but then on your first code example you do it again.
this is a keyword, THIS is a nothing.
but this gets confused as a meaningful word. It was a huge problem how i am gonna distinguish between word "this" and keyword "this"?
21:48
not by changing case, because like I said.
4 mins ago, by rlemon
js is case sensitive.
hmm. i thought so search had a code:foobar helper
@rlemon ok i will change that .
has anyone ever had the problem that jsfiddle is resized so the css and result are offscreen
it wont let me drag them, i tried deleting the cookies and that didnt work
@AL-zami yeah do consider changing the dashes - they make code uncopiable
@RachelDockter yea.. there is a function you can call on the console to reset it, but I don't recall more than that
42
Q: jsfiddle js panel size is stuck! How do I reset it?

7yl4rImage says it all I think: The draggable for resizing the js/html panels is gone and that js pane is too small! The big problem is that this issue persists after restarting my browser, clearing the cache, and deleting cookies. How do I reset this so I can use jsfiddle again?

22:02
@Luggage yeh i litrally just found it, it worked :D
I think that is what worked for me.
cool
22:30
nowyouseeme.movie I'm quitting my job after seeing this site
i thought something was gonna jump out at me
i even muted the tab lol
getting a black screen
u have to scroll ur mouse
nope
hit a load timeout
loading now
meh, I know I can definitely do it
might take more than a couple of days if the design is already there
is it just a hd video and your scroll will simulate the video scrubber position?
or is it more complex than that
22:38
oh no
A K
A K
say you have two api endpoints; each one is set for different types of users; one of the two api endpoints will expire; when it expires; we want all users to hit the remaining endpoints
what is a good approach towards this
for example, look at the rain scene. If you stop scrolling, the rain still goes up
it's fairly simple webgl, probably
oh, nope, 3d css
ah yeh, looks really good
the drops are actually really interesting
and nope, a combination of webgl and css
that makes more sense
welp, quite a bit of research seems to have gone into the performance
might have taken me a lot more than a couple of days to get it this fast apparenty :P
I need an idea for a simple thing to parse to test a parser.
As a goal to work toward in implementing features.
22:52
how would u guys store a profile picture? just as an image in the database?
@RachelDockter s3 or some other blob store
@Luggage like a bunch of test programs to parse? What language does your parser parse?
so they upload their profile pic to an external cloud storage, and i store the image link in the database as a string? like that ?
it parses no languages. I just finished the 'core' of porting github.com/sprache/Sprache to TS, but there are a long list of ... things.. to fill in
@RachelDockter generally, it's a bad idea to store the actual image in a database. Paths/URLs are usually fine, though
sweet thanks :D
22:55
Maybe I'll work toward all the features i need for a simple SQL-like language
@RachelDockter any kind of external storage will work
s3 is just cheap
github.com/luggage66/sprache.js/blob/master/src/index.ts is my port. i did it in Coffeescript a couple years ago, re-wrote in TS a whle ago and just re-factors and cleaned it
ah ok hopefully i can find a free one
you can put them on imgur or some other public site, but if they are part of "your data" then I think a private store that you control like s3 is better.
looks like 5GB on s3 if free.
(and a number of requests)
I back my desktop and laptop up to it, a few hundred GB, and it's $2/month
22:58
oh sweet 5gb should be enough for a while
if you're writing an app you intend other people to run, you can also tell them to use their own bucket, thus avoiding the problem altogether :P
yeh its actually an iphone app i have this idea for, im doing it in js first just so i know the logic behind it, so they will upload a photo from their camera roll and other people can see it
23:20
Hello guys, i m a newbie. I have a lil problem. I m a php developer and would like very much to develop cross platform apps i read about javascript and cordova and frameworks like react native and ionic native. But i m having issues migrating to Javascript since i only known the basic javascript syntax. I would like to know if basic Javascript is enough for me to learn either of the frameworks or if there are other prerequisite and where to get them. Thanks
@Sylvesterhillary 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.
@Sylvesterhillary Welcome meow.
Meοw... meοw.
@RachelDockter I'd just use gravatar
@Shrek this looks cool for people who dont want to show their face, ill take note of this thankyou :)
23:30
@littlepootis oh yea sorry for the late reply, it worked, ty
has anyone worked with google maps api before?
I think I have, briefly, a long time ago.
I probably wouldn't be much help.
I have very recently
!!welcome RachelDockter
BTW @RachelDockter please don't ask to ask, just ask
23:32
@RachelDockter 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.
@KendallFrey oh you mind reader
It's not mind reading if there's a common cause
great, i have an image i want as a marker but its huge, everything online is telling to do this to make the icon smaller but it doesnt effect the size whatsoever
profile: {
            icon: 'graphics/profile.jpg',
			scaledSize : new google.maps.Size(22, 32)
          }};
Its strange because there was a jsfiddle with the exact same code that worked, idk if we are using different versions or what
@RachelDockter what does google maps have to do with displaying a profile pic?
23:36
@NathanJones showing where a user is
@NathanJones im displaying it as a marker on the google map
on the map
@RachelDockter Maybe you want icon: { url: "graphics/profile.jpg", scaledSize: new google.maps.Size(22, 32) }
Is that you Rachel Dockter? whichdockter.com
23:37
Just a guess based on google
no thats not me haha, ok ill give that a go
did you just rename icon and url
its still huge for me
@Luggage I've been working on error messages in my schema stuff and making useful ones is kind of a pain
@RachelDockter scaledSize is a property of icon, not a property of profile
i think that's a strength of sprache, but i have never used it for anything real.
Like this:
62
Q: Resize Google Maps marker icon image

Golan_trevizeWhen I load an image into the icon property of a marker it displays with its original size, which is a lot bigger than it should be. I want to resize to the standard to a smaller size. What is the best way to do this? Code: function addMyPos(latitude,longitude){ position = new google.maps.L...

23:40
I like the chain of promises representing a chain of tokens.
they aren't really promises, just functions called "then"
some of the names are based on .NET's linq function names.
yeh i think icon just refers to the type of marker for example you can have beach:, resturant: etc. renaming it to icon didnt work tho :/
like .select() is just a map.
well, .then is enough to qualify as a promise-like
yea.. but it's not executed that way or for that reason.
23:42
@RachelDockter renaming... what?
though.. i wander if abusing await could be usefull. I lost the linq syntax from c# during the port.
I didn't rename anything
the object i originally named "profile"
// c# sprache
Parser<string> identifier =
    from leading in Parse.WhiteSpace.Many()
    from first in Parse.Letter.Once()
    from rest in Parse.LetterOrDigit.Many()
    from trailing in Parse.WhiteSpace.Many()
    select new string(first.Concat(rest).ToArray());
can't do that in JS, not like that.
@Luggage I was thinking some await would reduce the callback clutter
23:43
@Luggage await would be nice, or something flat
That thing above turnes into a nested mess without linq queries
@KendallFrey oh im suppose to put scaledSize when drawing the icon on, as apose to declaring each icon
that worked now :) thankyou
Parse.whiteSpace.many().then(leading => Parse.letter.once().then(...
if those were real promises, you could also make that a streaming parser...
23:46
hm.
async function execute({fileName}, replMod) {
    const file = replMod.readFile(fileName);
    const commands = file.split('\n');

    await commands.reduce((promise, command) => {
        return promise.then(() => {
            return replMod.exec(command);
        });
    }, Promise.resolve({}));
}
I want to flesh out a bit more as straight port before i change too much, but I like the promise idea and using await..
@Luggage I prefer the parser I wrote a week ago
Do go on.
if (scanner.consume(TOKEN.lpar))
{
	const expr = parseInternal(scanner);
	scanner.expect(TOKEN.rpar);
	return expr;
}
else if (scanner.consume(TOKEN.lambda))
{
	return parseLambda(scanner);
}
else if (variable = scanner.consume(TOKEN.var))
{
	return variable;
}
else
{
	return scanner.error("expression");
}
scanner.consume accepts a string or a regex
if it matches, it advances forward and returns the matched token
otherwise it stays put and returns undefined
The actual AST is constructed recursively
23:50
as it is in sprache.
and as it should be.
so say we all
That's why I called it a scanner instead of a parser
I don't have any kind of generic parser that can be generated from a grammar
I wonder if abusing generators would be helpful..
if you can't abuse, it's not worth doing.
batch(*() => {
    yield Parse.whiteSpace();
    const letter = yield Parse.char(/[a-z]/);
    const number = yield Parse.char(/[0-9]/);
    yield Parse.whiteSpace();

    return [ letter, number ]; // the "AST"
})
So how would alternation work?
23:58
I have no idea what alternation is, you are talking to someone that can port a parser, not create one.
I am ignorant of much vocabulary.
that looks oddly enough very useful, how would you trigger the yields?

« first day (2526 days earlier)      last day (2645 days later) »