« first day (3498 days earlier)      last day (1675 days later) » 
01:00 - 22:0023:00 - 00:00

01:14
@Matthew interesting idea
 
2 hours later…
03:35
Alpha v0.2 released!
04:10
are builds traditionally done on production server, or are they built somewhere and then pushed out to production servers? If the latter, where are they built?
builds are done on the build server
normally running a CI program like Jenkins
oh there is an entire server dedicated to that?
well you can run the CI server anywhere you want I guess
if you want to run it in the same VM as prod, you can, though I haven't seen that done before
How does it work? When a merge to master is made does it auto build and then push to production or something?
the terms you're looking for are Continuous Integration and Continuous Deployment
CI ideally means that when you push to the git repo, it runs all the tests and compiles it
04:18
ah, thank you. I'll do some research on those. How common is that? Is it used in most companies or only larger ones?
CD means that when you push to e.g. Master, it runs CI and then it deploys it to prod
it's very common
though you rarely see anyone do it 'perfectly'
a perfect CI/CD system requires zero human intervention on the build server, you just push your code to a staging branch and your test environment spins up, and then you merge to master and it's in prod
if you look up ci/cd you'll definitely find a boatload of resources about it
but it never works out that way i presume?
It's a lot easier to make it work that way when you're on a small project, but when you're in more of a corporate structure, people tend to do things more manually
interesting, i would think it would be vise versa
you can move fast and break things on small projects
04:22
Who sets up all this up and maintains it? Would it fall under the server admin's job or what?
that typically falls under "devops"
though the person responsible for devops changes depending on where you go
is it ever/often the actual developers?
often it is
hmm, i'll have to look into that. Thanks for the info!
absolutely!
04:25
on that note, night everyone o/
 
1 hour later…
05:26
@JBis (when you get back) - the person responsible for CI/CD can be developers or somebody outside the developers team. I find it depends on the size of the company. You might even have cross-team caring for this. At my old place we were a fairly small company - 150 people worldwide and 40 devs that were in one office. We had a "devops" team that was composed of people from the various teams to do with development - QA, web, services,
My current place is a much bigger company overall but the size of the devs I'm with is smaller - 20 in total split between two offices. We are fairly autonomous and we've set up the CI/CD ourselves again.
But there is a bit more reliance on other non-dev teams, mostly IT and some people responsible for licenses and stuff to provision an Azure DevOps instance (Microsoft's attempt at being JIRA+Jenkins) and some machines where we build/deploy stuff. So, software setup is up to devs, but where and what we set up we don't directly control.
Then on the other extreme, I know there are places where the devs just create the software and never really interact with anything else in the pipeline. A completely separate devops team takes care of all build/deployment and a dev might never even need to know what and how it's done.
can anyone help me with this stackoverflow.com/questions/61788837/…
 
5 hours later…
10:05
Is there an obvious reason why this works fine:
setTimeout(function(){
    $('#some_id').addClass('hidden');
    $('#some_other_id').removeClass('hidden');
}, 0);
But the same code without the function only removes the class and doesn't do the addClass
$('#some_id').addClass('hidden');
$('#some_other_id').removeClass('hidden');
It's odd that the timeout is 0 so instant (so not convinced it's DOM loading etc?)
Maybe the first element doesn't exist.
setTimeout(fn, 0) will not be instant, it would add it to the event queue, so it's possible that a previous task on the queue adds that element.
I literally just comment out the function line and don't change the other two, so same in both cases
iit seems instant on the page but if it's not that might explain it
hmm I just tried with the timeout function on it's own pre the two addclass lines and it still doesnt work, which indicates it's not the delay that makes it work
The timeout will delay stuff
ok do I need to incorporate document ready in the mix?
I don't know. It depends what's adding that other elements. If it's happening dynamically, then you want to make sure your logic runs afterwards.
I don't know if the difference is due to HTML loading or due to dynamic adding after the page has loaded.
10:25
if I console.log($('#some_id')) before the setTimeout the objects are empty, in side the setTimeout they have values as expected. seems it's the delay that makes it work
and using $(function() {} makes it work. Obviously DOM wasn't ready (new to JS still)
thanks for helping :)
hello, I have a html page and the data come from ajax, I want to set a button when I click the button I want to convert pdf the full html and I have tried jspdf but I feel some issue for example, it's not accept css and not ajax please give me good solution how can use like jspdf library to make html to pdf convert when click the button
 
1 hour later…
11:35
If anyone wanna collaborate on this interest project - you are welcome .

- Typescript web Client (matter.ts)
- Server : mongoDB - node.js - signaling server.
- tool - creator 2d map in python

https://github.com/zlatnaspirala/visual-ts-game-engine
 
3 hours later…
14:09
Does coming of deno mean that learning node now or in some time will be useless?
I hope not because I just made a bot with node
@jeea others might be able to give more "scientific" answers. But at my job, we still use ColdFusion. Banks still use COBOL. New tech doesn't make old tech obsolete, plus learning node will help elsewhere
speaking of: the ./configure for nodejs worked last night, but not make -j4
just took forever and then got stuck and hate to cancel out
hoping I still have all the parts I need for my bot, but I doubt it
node js doesn't have problems with 32-bit, does it?
I am going through modules
I was just going over random youtube videos with this title. I don't know node js or deno but i have started learning js
yo
any regulars around
ah apparently room is ded
sad
14:28
It's pretty ded
damn
i am having problems with react design
was hoping for someone competent to swoop in and answer all my questions
14:52
In this room? Unlikely
15:11
design in what aspect?
architecturally or literal design
@JBis no, why?
@BartekBanachewicz ask away
@OwenVersteeg wondering if mac people were having issue with formatting but nvm
Ah huh, no I'm on Arch Chromium
yeah that was weird, it didn't seem to want to format no matter what I did
@James If you are interested in the event loop I would highly recommend this video.
15:48
@jeea deno is supposed to be the inheritor of node. I don't know if that would happen but it's the plan. So, I believe that knowledge from one to the other should be transferrable. Again, that's the intention. After all de|no is an anagram of no|de - it's supposed to be the same.
How can I prevent a jQuery “on” handler from bubbling up without disrupting other handlers?
If I return false from inside the handler, then it cancels all events after it
@DemCodeLines wdym by "disrupting other handlers"?
> prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event.
16:04
Is this the right room for node.js too?
@ilsloaoycd 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.
yes
Sweet. Has anybody ever had luck making node and bluehost servers work together?
I have a pretty simple handler: $(“body”).on(“click”, “[ng-controller]”, function(event) { return false; }); when this runs, if I click on a button, it stops the dropdown event handler from running, so the dropdown doesn’t show.
3
A: How would I go about setting up NodeJS on my Bluehost hosting account?

chrisw9808Unless you have a VPS or dedicated server with Bluehost then you will not be able to install it. This requires root access and they will not likely install it on a shared hosting platform. If you do have a vps/dedi then this like should show you how to set it up, but its not supported by cpanel...

16:06
Anyone want to review a blog post?
I'll take a look at that. Thanks!
If I don’t return false, then every single no-controller gets hit, which causes other issues
I’m trying to get this handler to run only once, but without breaking other event handlers
@phenomnomnominal post it, i'll take a look
@DemCodeLines other listneers on the same element or higher elements?
16:11
The one I have a code sample for above gets hit again and again because there are nested ng-controllers. If I return false from the handler to stop that, I end up messing with other elements’ events. In this example, if I click on a button, the ng-controller handlers run, which return false, which then prevents the button’s handler from running and showing a dropdown menu
@phenomnomnominal I can give you a few word/grammar issues after my lunch if that's something you were looking for
@Cameron anything is useful :)
I'd make this not a gif. I want to read the output but I can't because the gif restarts. res.cloudinary.com/practicaldev/image/fetch/s--IGm6mRSq--/…
> There are now no remaining issues, so this test has met its goal. Since the existing issue has been resolved, it is removed from the snapshot in the .betterer.results file!
Any way to keep it there? Lets say we hire a new developer and we want to make sure their code doesn't use momentjs, how would i do that?
Well at that point you just migrate it into your normal ESLint configuration
I'll add a note
thats what i thought, wanted to make sure
16:21
🎉
other than that (and the minor grammer issues that i couldn't care less about) its great
Sick!
Yeah I did a pass with Hemmingway, and decided to ignore a bunch or their shit haha
how does it work with monorepos?
No differently, it just lives at the root
really? i would think it would be better to have a different config for each project
16:23
But there'd be nothing stopping you from running it in a specific package
It all just depends on what test you're writing and what you want to apply it to
what'd you use for your pretty outputs?
it looks nice
Basically:

"@babel/code-frame": "^7.5.5",
"chalk": "^4.0.0",
"log-update": "^4.0.0",
And some custom shit on top
Extension is now live! marketplace.visualstudio.com/…
how difficult would it be to make for jetbrains too?
Probably not too hard
I don't know what their APIs are like
if you get around to it lmk
16:29
@phenomnomnominal
"That will give you a branch new .betterer.ts config file" -> branch or brand?
"The first time we run the test with Betterer runs" runs x2?
Also, looks like there's 3 gifs between "Watch mode" and the end of the article that aren't loading for me, maybe just a preview issue
gifs load for me, just really annoying
How many gifs?
Some do, some don't
I love them 😅
I will try uploading them again maybe
Can you make the last frame stay there for a couple more seconds at least?
16:31
"Terminal output showing..."
"VS Code screen capture... initialised"
"VS Code screen capture... highlighting"
@JBis just get an extension that controls them for you
@Cameron I have the same issue now 🤔
Also as a Canadian, I feel like there should be a comma between "Pretty neat eh"
Nah it's a kiwi "Pretty neat eh"
oh, the gifs for extension are fine. I was talking about the article.
neateh is one word
16:34
Guess we can agree to disagree on that. Either way, everything looks interesting, may use it on some work projects
@JBis I meant that there's a chrome extension that adds gif playback controls
gotchta
@Cameron Nice! Let me know how it goes!
That's the file you'd need to implement for Jetbrains
doesn't look too bad
16:54
Of course npm goes down when I want to publish this :D
congrats
And now bed time
hey
Is it just me, everytime I try to access angular.io I get a "REQUEST FOR DOCUMENT FAILED" ?
in console it falgs a CORS error
Access to fetch at 'https://angular.io/ngsw.json?ngsw-cache-bust=0.505385215338763&_sm_byp=iVV4bKb5ZKJR1nGP' (redirected from 'https://angular.io/ngsw.json?ngsw-cache-bust=0.505385215338763') from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
would love to be able to access the docs at work
I'm not getting any errors
Try in incognito
@phenomnomnominal This is a great project and you've clearly put a lot of work into polishing it, well done!
17:33
@forresthopkinsa thanks!
Hi folks, how do you model a program where a function returns a value which will get populated/changed later?
@JahirulIslam 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.
Promises
Assuming of course that it only returns once
That's the general idea. But the consumer may call it time to time to get new values.
@phenomnomnominal let me see if I understand your project correctly - it's kind of like a repo-wide regression test to try and avoid mistakes from the past.
17:41
I think it would be clearer with a simple example. Let me find one
I think it's more like, ensuring a steady progression toward a goal for the repo
@forresthopkinsa exactly
take a snapshot of the current state, and don't let it get any worse than that
|| mdn generators ?
sounds like your describing that
17:43
agreed on generators
Ah, I see. I guess I read it wrong. Also, I read the first article but then it was gone. I notice you have a second article up.
Very useful tool, in fact. You accept that there are some problems now and aim to improve them, not worsen them.
class Example {
    hello = 10;
    changingValue;

    ngOnInit(): void {
        this.changingValue = this.hi();
    }

    hi() {
        return this.hello;
    }

    clicked() {
        console.log(this.changingValue);
        this.hello = Math.random();
    }
}
@JahirulIslam so, which part should be changing?
It sounds a bit like you may want getters but I'm not sure.
The idea is that clicked() will be called from View. But between clicked() being called, hello may get changed and I want the latest value in changingValue
get changingValue() { return this.hello; }
17:49
yeah getter ^
Obviously the code I posted earlier won't work. It will show the initial value of hello everytime clicked() is called
|| mdn getter
But there are no race conditions in JS. You can't actually have the value change while it's being fetched.
Yeah, @VLAZ's solution is the one that I'm currently using. Is this a good approach to this problem?
17:50
there are race conditions, just not at a language level
let x;
fetch("/something").then(res => res.text()).then(data => x = data);
setTimeout(() => console.log(x), 100);
Race conditions are not my primary concern
@JahirulIslam yes
thats partly the point of getters
That's good to know. Thanks
you could also allow them to access hello directly
That would also work but I faced some problem with it
17:56
what problem?
I think the way I've organized my Components and Services are not suitable for it.
I'd have to describe the scenario to explain it
Let me give it a try.
I have one Component (Angular 9) that's communicating with the view.
I have a DataService which makes API calls. I store the API call results in Component variables on NgOnInit.
There is also a GridService which simply provides me with DataGrid (agGrid) configurations on NgOnInit.
Now, in the Grid, some rows require dynamic data which I have to fetch using DataService. But the problem is I have to specify this data during grid configuration
So, basically, the grid needs some data during initialization that I have to fetch via API calls
Currently, I am solving this by providing a getter function during grid initilization
I been trying to create a glob that will ignore all files in a directory called addon.

**/*/addon - Successfully match all files in the addon directory.

I excepted that simply negating it like this would work but it doesn't

**/*/!(addon) - Should match all files except the addon directory.

Any ideas?
18:14
**/*/!(addon)/*/**
maybe
@JBis That works for ignoring addon but it doesn't include everything. For example.

src
test1.txt // ignored
test2.txt //ignored
addon // ignored
hello.txt
assets // not ignored which is good.
favicon.ico
**/*/!(addon)/**/*
try that
Ya it still ignores files like test1.txt.
I pretty sure that if test1.txt and test2.txt were in a directory it would match them.
oh thats on the route
../**/*/!(addon)/*/**
lmao
shell globbing in the js room
18:30
Ya I tried to indent that directory but couldn't. The two test files are under the src directory. The hello.txt is under the addon directory and the favicon.ico is under the assets directory.
But the problem is that the glob pattern only matches nested directories that do not match addon.
When it should include everything except the addon directory.
did you try the ../
Ya, still didn't work. For reference, I'm using globster.xyz to test the glob.
19:09
posted on May 13, 2020 by Ben Mason

Hi everyone! We've just released Chrome Beta 83 (83.0.4103.56) for Android: it's now available on Google Play. You can see a partial list of the changes in the Git log. For details on new features, check out the Chromium blog, and for details on web platform updates, check here. If you find a new issue, please let us know by filing a bug. Ben Mason Google Chrome

 
1 hour later…
20:26
I am starting on HiAPL!
If you have an MVC site or some other framework where the HTML pages are generated from a template, and your js files require data that the backend would be inserted into the template (like say, URLs for your fetch calls) is the best way to insert that data into a js object in the page before the script tag for your js file so your javascript can pull it from that object? Or is there a better way?
there are multiple ways
i've seen people use meta tags for that. They put the data in a meta tag and then js can pull from it. You could also do an ajax script to fill the data you need.
Depends what you are trying to do
In this project that I've inherited, all the javascript is in written directly into the html page. This makes it extremely difficult to debug. I'm moving it to its own js file, but the ajax calls have @Url.Action() calls written directly into the url property (I'm assuming that's why they had the js in the cshtml file to begin with)
what is @Url.Action() ?
It's an MVC thing. It basically writes a url to one of your site's files into the page while it's still on the server.
Before sending to the browser.
20:34
maybe better to ask those people
you could do something like this
I figured it was more applicable to javascript, but sure.
<script>
const URLS = { /* all your url generation logic */ }
</script>
<script src="/path/to/jsfile.js">
cshtml is awful
that way you get best of both
move the injection to a webpack step
20:37
anyone ever make a lexer?
@JBis Yeah, that's what I was doing.
cshtml has its uses, but I hate making forms with it.
this seems quite complicated
@JBis I've made a tokenizer, not a lexer. Not quite the same I guess but I know a very tiny bit of the theory, at least. Not sure if I can help, but I'll try
hmm, how should addition be done in html
<+><x/><y/></+>
Oh, you're doing tags? I suppose that's RPL, right?
20:46
whats rpl?
reverse polish notation
ah, sorry - it isn't. RPL is postfix
You're just doing like an abstract syntax tree with tags. I see now
I'm just a bit slow today...
sort of yeah
that's cool. So, what your trouble here?
just thinking outloud
how i should design this
If you're consuming this format you're in a really good spot.
20:49
how?
Well, you've built your AST already - the trouble with writing an interpreter is reading the input -> tokenizing -> transforming to a consumable structure (AST is one option) -> then using it
So, you're more than halfway there
posted on May 14, 2020 by Geo Hsu

The Stable channel is being updated to 81.0.4044.141 (Platform version: 12871.102.0)) for most Chrome OS devices. This build contains a number of bug fixes and security updates. Systems will be receiving updates over the next several days. If you find new issues, please let us know by visiting our forum or filing a bug. Interested in switching channels? Find

i see
You'd read your tree and transform each thing into operations, so the <+> tag you'll have some handler that's like function plus(a, b) { return a + b } and you feed it those x and y tags
interesting idea
20:52
in general, you'd have some sort of map to fetch the operators. Say, { "+": plus }
it will compile to js, so i was thinking of compiling to operators but the function idea would be much easier
so you can just generalise to op = operatorsMap[currentOperator]; op(left, right)
You might need to also implement operators that take different number of operands. So, it's not AS simple as a single map but it's generally a similar approach.
You'd need to mark which operator takes in how many operands and maybe even differentiate between two versions of the same thing.
Let me dig up an article on this, it was pretty helpful.
here is a good one. That's a full parser, so it goes through tokenization + AST/RPL building but you're interested in the consumption steps later on.
thanks
i'll consider this project complete when it can parse itself (a parser for it can be written in HiAPL)
HiAPL?
21:07
@VLAZ thats the langauge github.com/jbis9051/HiAPL
um
why can't you use a HTML parser for that?
Ah, thanks. I googled the name I got a bunch of unrelated stuff like some airport.
I mean, it's literally HTML, isn't it :D
i could
more like XML, I'd say.
21:08
however i want to make my own
@VLAZ github.com/jbis9051/… (the bottom)
so you're having problems with parsing xml-ish syntax or compiling your actual language?
neither, i just started
i'm planning out how to make a html parser
xD Yes, I'm that guy, I guess.
21:09
recursive descent should work well
Well played
I mean, if you only accept well-formed html
then really it's something like
i think its worth creating a lexer right?
Have a look at XML parsers (I know...I'm that guy). It's not THAT horrible. It's not easy but it's not too bad, either.
21:11
I mean you already have thrown the most reasonable solution out of the window
A lexer should help, I'd imagine. You'd be doing lexical analysis anyway.
so now you have to kinda make decisions about what you want and/or need
@BartekBanachewicz hehe
I could see myself writing that with just a simple tokenizer
if you assume well-formed document then the lexer really doesn't have much to do
You have a point. I was thinking of verifying well-formedness.
But if you don't have to bother, tokenize and consume.
21:12
frankly even if you want to fail gracefully then probably making lexer "dumber" would go a longer way
@BartekBanachewicz shouldnt it make sure people arent using reserved tags
@JBis not a job of lexer
frankly that's like 2 stages later
who's job is that?
parser?
either parser or AST analyzer
Yeah, lexers just turn input into something recognisable. You use something later to analyse the output of the lexer
21:13
depends on whether you want reserved tags be a parse error or semantic error, obviously
syntax error?
in this case parse error = syntax error, I guess
<div><b>wrong tags</div></b> - syntax error
it's really up to you
just bear in mind that it complicates the actual parsing code
so should it go through the document to make sure tags are valid first?
21:15
if I was doing that, okay
I'd make the parser accept all tags
and then reject them in the next step once they're in a nice browsable form and i know the doc is well-formed
@BartekBanachewicz whats a malformed doc
adding a new tag shouldn't require you to change the parser, really, and cramming too much logic there doesn't help maintainability
1 min ago, by VLAZ
<div><b>wrong tags</div></b> - syntax error
so would that be accepted by the tokenizer/lexer?
and then rejected by the parser
21:17
what about competlly invalid things
By the way, just to throw this out there - you can use existing lexers. Stuff like lex can read arbitrary input and you can then just directly use what it produces.
<div></d/<d>/i/v/>
it's kinda up to you where you draw the line
technically, an entire parser can be written on a stream of characters
i wanna build mostly from scatch for educaitonal purposes
It also means learning a whole new tool but it's available. There is also ANTLR which is the daddy of language parsing AFAIK.
That's a valid reason as any, to be honest.
21:18
I mean if you define your "token" to be char, then your tokeniser does nothing
but then the parser has to e.g. glue digits together into numbers
a token is a tag i think
it's a valid choice
Token = tag seems like where you want to be.
i think lexer should output basically a tree of elements
think about it this (very simplified) way: the higher level the lexer, the less flexible it's all gonna be, but the easier it's gonna be to write the parser
the lexer shouldn't produce a tree, it should produce a stream
21:20
{ tag: "div", content: "food",  attributes: [], children: { tag: "span"....
the actual recursion should happen in the parser
nah, too far
so what should the output of the lexer be if the token is a tag?
mm, i was thinking that "token is a tag" might be closer to "<div" being a token
as in, you get 4 types of tokens: an element start, attribute, element start end, element close
<div, x=y, >, </div>
what about <b/>
if element start happens before element close then it's a nesting
i guess it's a special type of element close
21:24
@JBis I'm sorry. The article I gave you last time is the wrong one. this is the one I was thinking of. It has much better details. Also have a look at this - it's for C but I think it should be readable.
@VLAZ thanks
<div attr="test">Content</div>
shouldn't lexer split up atrr="test"
Also, if you want to go really deep, there is the classic book Compilers: Principles, Techniques, and Tools nicknamed "the dragon book". I know of it and it's supposed to be the resource on anything for creating programming languages.
tbqf you could also make tokens be "<", ">", "/", "str" and "quoted str"
@VLAZ heard of it, but not that dedicated to this lol
21:26
@JBis I don't think there's any definitive answer to this.
hmm, ok i think i get what your saying
that produces
[ 'data', '' ]
[ 'beginStartTag', '<' ]
[ 'tagName', 'h1' ]
[ 'finishTag', '>' ]
[ 'data', 'Hello, World' ]
[ 'beginEndTag', '</' ]
[ 'tagName', 'h1' ]
[ 'finishTag', '>' ]
so a bit similar to what i said above - yet subtly different
intersting, but that is a live stream
as in it is passed to parser as it is lexed
a recursive descent parser naturally lends itself to working with streams
alright, i'm going to basically recreate that
interesting the flow
thanks!
21:29
Clone the code and work with it, would be my suggestion.
It's MIT license so you can just use it.
@JBis sure. If you'll want more input in the future then ping me, I'm not in the chat often.
Refactor it, disassemble it then re-assemble it to make sure you know how it works.
That's how I understand new code...
@BartekBanachewicz come back soon :)
@BartekBanachewicz hey, you've been very informative. I want to say thanks, as well. I have very little knowledge on the subject, so you were enlightening :)
real quick, can a lexer eliminate things? like parser doesn't care about = in the attribute, just key and value.
21:34
yes
however, it's sometimes beneficial to keep raw input for diagnostic information
or at least location in the raw input (e.g. line and column)
gotchta
@VLAZ I've been learning as I go :) a while back I was completely green on the whole language-making thing
since then I wrote an almost complete Lua implementation and a few parsers so I feel just a bit less bad about it, but it's a huge field
I would have been surprised if you were born with the knowledge ;)
:D good one. It's just, it's not my specific area of expertise
I've written one parser in total and it's not even a very complex one. But around it I read a bit more on the theory.
I'm not sure there are many people who specialise in parsers. Outside of language creators it doesn't really come up that often.
At my old job we did have an in-house scripting language that goes into config files but I was never really part in any of its implementation.
It was done using ANTLR is pretty much all I know about it.
01:00 - 22:0023:00 - 00:00

« first day (3498 days earlier)      last day (1675 days later) »