« first day (3494 days earlier)      last day (1679 days later) » 

00:00
I skimmed through the article and it seems decent. I'm bookmarking it, since I'll actually need that soon.
Let me go back to see the models - I didn't read that with enough depth.
Yep, those models are indeed not models. It's the Repository pattern, at best.
The models are db interactors. Which is interesting.
That's a repository, yes. Popular in C#. But it's not called "model" there. I see the reasoning, though even if I don't agree with it userModel.findById(x) says "find and return me a user model using this ID".
I definitely expect something called "model" to be an actual user object.
what userModel.findById(x) is returning there would likely be an object. Not a class instance (which i would consider a true model).
{ id: 1, username: "x" }
instead of an instance of UserTrueModel
That pattern of "model" is pretty common in js land
I agree it's kind of a misnomer
Eh, I don't really mind it as much. If you have TypeScript or Flow or something, it would match an interface, so you don't need a real instance.
00:08
Its frustrating to learn MVC, etc. programming paradigms when everyone defines everything differently.
@VLAZ I'm not sure how horrible it is. I don't think its really a big deal. It just doesn't embrace the idea of classes at all.
I can agree with that. It doesn't need to but it does seem a bit sloppy.
I think if you want robust OOP then JS is probably the wrong language lol
gasps js is always the right language
;)
hahahaha
You'd think that the Javascript room regulars would be the first to evangelize the language
Yeah, @forresthopkinsa you're talking nonsense. In the future everything will compile to JS. Even your graphic drivers. JS is the bestest language in the world!
/joke
00:12
> even your graphic drivers
nightmare fuel
I've been wanting to learn Go lately
Hey, me, too. I think I have a decent project in mind for it, as well.
Something with graphs and traversals.
What are you thinking?
Interesting
The language seems really well-suited to high-traffic microservices
It's like a middle point between Rust and Kotlin
I've been thinking of maybe trying to make a game. Not a real one (probably won't get released and be playable) but at least something I can have a bit of fun designing and implementing parts of it.
graphical drivers (and everything else in js)
00:15
> Bear in mind that this is written entirely in JavaScript, so please adjust your expectations.
incredible
@VLAZ Neat
@JBis Oh noes. I'm sorry, I though I was joking :/
Oh my gosh
That runs on the project v86
Which is not only the perfect name for x86 emulation in v8
But it was made by our very own Copy
Anyway, the game I have in mind would be heavily based on Crusader Kings 2. If you haven't played it it's...it's something. It's an enormous graph with connections between characters and relations. Since it's pretty unique, I thought I could try making something similar.
Here I am thinking "who the heck would put the time into emulating x86 with js" and of course it's a room17 member
@VLAZ Never heard of it, sounds like a fun project
Does Go have very good graphics APIs?
I normally see the language used for CLI and Server
Don't know. My current rough plan is to make this a web thing with interface to a web page.
It's the easiest way to show the information.
And then GO at the back end.
00:18
Cool
If there is something easier in Go, I might use it.
It's an idea I got a couple of days ago, so I'll definitely need more research.
But I think Go would be decent here, since I'll need a lot of graph traversals for the character relations. I'll probably try to model the AI as agents with objectives.
@forresthopkinsa haha, didn't even realize that
isn't go like super error prone?
CK2 also has an interesting way of handling events - it doesn't set timers (think setTimeout) but rather gives an event an average time to fire in days. It then spreads out the probability on a per-day basis and rolls the dice every day. So, if the average time to fire is something like 2 years, you'd have less than 1% per day. And on average it would take around 2 years but it might actually be a day or even 10 years, if you're unlucky.
Go is meant to be pretty error-resistant as far as I know
It's really oriented toward enterprise software, so it's a pretty simple language and it's hard to do stupid or clever things
oh maybe i got it reversed
00:26
Much faster than JVM languages, slower than Rust, much easier to pick up than Rust, much harder to screw up than Java
That's my understanding of it anyway
Well, anyway chaps. Time for be for me. Well, probably few hours past that but it's a Saturday. At least that's my excuse. See ya.
Talk to you later
cya o/
 
4 hours later…
04:59
i am trying to assign in javascript variable a php and html code
let say for example var = '<?php echo '<option value=" '.$row["something"].' " >' ; ?>' , but I am not sure if my quotations is correct
05:11
@aaa28 why?
whatever you are doing is probably the wrong way to do it
how come?
because you shouldn't be setting a variable to html from php like that
I am trying to append that code on an element
661
Q: How do I pass variables and data from PHP to JavaScript?

Madara's GhostI have a variable in PHP, and I need its value in my JavaScript code. How can I get my variable from PHP to JavaScript? I have code that looks like this: <?php ... $val = $myService->getValue(); // Makes an API and database call ?> I have JavaScript code that needs val and looks alo...

if you really want to, pass an array to js and then create the elements within js
const arr = JSON.parse("<?= json_encode(['data', 'data2']) ?>");
im not sure i follow, but ill try to read your suggestion
05:15
then you'll be able to do whatever with arr in js
jeez, thats the first php i've written in months
it worked before, Im not sure I cant maket it work anymore,
that piece of code was just a part of bigger code
it is for a dynamic dropdown, the php code is to retrieve data that will populate the dropdown
yes
const arr = JSON.parse("<?= json_encode(['data', 'to', 'populate', 'dropdown']) ?>");
at the same time it is a dynamic add/remove input
 
4 hours later…
08:53
hey
@Hemlata Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
I asked a question on SO but haven't get any answer yet. Would anyone mind if I upload the link of question here? Feel free to have a look. Thanks
0
Q: Json table data only shows header but not the table data

Hemlata I have a json data that I fetch from api. When I click on the table data it does open a new tab where it loads my symbol.js file, but it's not showing the table content, it only shows table header. But, If I look into my complier it does shows the json data. I am not sure what am I doing wrong....

@fbuchlak Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
Hi!
I am working on a landing page (https://codepen.io/user_jacob/pen/oNjqWGg). I have 3 article elements, each of them has the property "display: none". I want to display each of them WHILE looping over them. But JS code displays them after the whole process of looping is completed. How to deal with it?
@user36339 Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
5 hours later…
14:21
Hi guys! Why can not I download JQuery UI? I get a 502 error. download.jqueryui.com/download
@user153742 Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
15:14
hello
@shauvet Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
@user153742 that should be the server problem
15:54
@user153742 yes, it seems that page doesn't work for now. I suspect it would be fixed soon but in the mean time, you can get the CDN version of the library. You can directly link to it or download it locally.
16:32
alright, not a fan of nextjs. I think its a good idea, its just needs to be executed better. Some ideas don't seem very thought out.
prob won't use after i finish this project
17:30
Hello, is anyone familiar with amcharts?
@Bhupesh_decoder Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
1 hour later…
18:38
Hello, Can anyone help me understand how a variable can be passed alongside a term in script?
For example I need to pass the value of "data" besides #displaycomment, as in the end result should be #display_comment1

var data = 1;

 function load_comment()
 {
  $.ajax({
   url:"fetch_comment.php",
   method:"POST",
   success:function(data)
   {
    $('#display_comment').html(data);
   }
  })
 }
@Jarvis Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
@Jarvis Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
For posting large code blocks, use a paste site like like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
18:48
Hello, I have points if someone can help me with this little issue: stackoverflow.com/questions/61716841/… includes code pen
19:23
@Jarvis Do you mean $('#display_comment'+data).html(data)
@kmoser Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
2 hours later…
20:55
Whoever though making the default write origin for a canvas would be the top left was a big brain dumdum. And yes I know HTML does that too with all its measurements, but its just annoying... I like being able to base my canvas on the bottom left
const trueOriginAll = (s) => {
	const cvs = document.querySelectorAll(s || "canvas");
	cvs.forEach(e => {
		const ctx = e.getContext("2d");
		ctx.setTransform(1, 0, 0, 1, 0, 0);
		ctx.save();
		ctx.scale(1, -1);
		ctx.drawImage(ctx.canvas, 0, -ctx.canvas.height);
		ctx.restore();
	});
};
@MisterSirCode Guess it just followed the html standard
Well think about it...
your going right for every + value
but down for every + value
a cartesian graph goes right and UP for + values
I tend to think of canvas as the top right corner of a Cartesian coordinate graph...
But if you did that same idea with the HTML Standard..
oh god
making websites from down up
nty
@MisterSirCode Ayy good point are you any good with three?
21:11
ugh
three...
nope
Id rather just go use Blender and Unity to make 3D Anything
The amount of work and time goes into making a simple shape in three is just mental
It DOES rely on WebGL so you get what ya get
Ah was hoping to get this answered stackoverflow.com/questions/61716841/… it's doing my head in haha
21:24
Hey does anyone know how I could use getContext on the same canvas and use it again?
After calling get Context on my canvas twice, I cant draw on it anymore
This is basically what Im doing: codepen.io/SkylerSpark/pen/yLYjQaG
Hi all! Any help on this? I put also a bounty stackoverflow.com/questions/61688377/…
22:10
Well HOT DAMN... I just found out backdrop filter and psuedo background filters were a thing
Ima make something fun..

« first day (3494 days earlier)      last day (1679 days later) »