« first day (3646 days earlier)      last day (1525 days later) » 

00:19
posted on October 09, 2020 by Cindy Bayless

 The Dev channel is being updated to 87.0.4280.13 (Platform version: 13505.4.0) for most Chrome OS devices. This build contains a number of bug fixes and security updates. Most 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 out how.

 
2 hours later…
02:09
@MisterSirCode happy to help with lexing if I can
Here's one I wrote using TypeScript types last week, might help you get more of the idea gist.github.com/phenomnomnominal/…
 
1 hour later…
03:35
this is a javascript regex question
i want to match
<span data-index="0" class="mention" data-denotation-char="@" data-value="John Smith" data-id="11121321-c3cf-4e06-12315-8cf69e012821"><span contenteditable="false"><span class="ql-mention-denotation-char">@</span>John  Smith</span>
please bear in mind that there can be multiple spans after each other..
the whole point is that i want to match each one separately.. enclosing span tags for each user
03:54
Are you familiar with the don't parse HTML with Regex meme?
04:23
4414
A: RegEx match open tags except XHTML self-contained tags

bobinceYou can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool th...

You can parse a subset of xml though
05:01
Anyone with ionic experience? Should I choose the blank template or any other to start working on it?
can someone recommend a room for css help? i have a rather soft question to ask, which may not be apt for the main site.
 
3 hours later…
08:01
Hi guys. Can you give me an example of when I should use section tag and when div tag in HTML?
divs are more general purpose, sections are self-explanatory
If I have a section with popular product cards then I need to use section?
You've just answered your own question
xd
I wrote some example and tried to validate it on w3 validator and it said I need to use h2-h6 headings inside section tag
but what if I dont want to?
That's more guidance, typically you'd have a heading but I can't see any harm excluding them
08:12
ok
08:32
Stackoverlfow has chat, sleekyyyyy
@NogretHumphrey 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.
 
3 hours later…
11:49
quiet
@MisterSirCode not sure if she would respond.
// lenny-face
Good morning
|| lenny-face
Invalid command! Did you mean: lenny, lolface, funfact? Try help for a list of available commands..‍.‍.‍.‍.‍
:d
|| lenny
( ͡° ͜ʖ ͡°)
11:52
Oh james is working
He was shutodwn yesterday
jsfiddle.net/MisterSirCode/kx934tao Wait a class empty is defined as a function
thats weird
() => {},
this,
class {}
would output
Function
Window
Function
@MisterSirCode yes, server broke
note to self: if you get a bunch of random segment faults, backup your drive
the class syntax is a somewhat sugar of functions
segment faults o.O"
npm run build was spitting segment faults 4/5 runs
all i have to say is thank god for whoever created fsck
12:02
it was (not sure it is still) possible to mark some segments as non accessible if these are faulty
with linux
so kinda extending the disk life
Probably a dumb question.... what are segment faults?
mostly thrown when trying to access a specific area in memory by a memory address that you should not have to
there are various causes on that. Many of these are related to C addressing issues with the virtual mem
So, a program is accessing memory its not supposed to, and this can corrupt data?
Segmentation Violation/SegV or GPF Access Violation simply means that the process accesses a memory segment which it is not allowed to access
data corruption happens, when your process doesn't trigger such a violation and modifies memory regions it is allowed to modify (but.. shouldn't)
I think I get it
12:15
I'm not really sure how disk corruption would lead to segment faults since its a memory issue. Maybe the swap got corrupted?
Well, I mean, in which case does memory get written to disk
caches, databases? I remember one of my companies dying VServers had faults while updating.. hash missmatches, occasional crashes of programs.. I was still in post mortem analysis when the hoster send a note around about backing storage corruption
most of that stuff is written to disk and loaded into memory, programs and caches alike
@JBis when the required data isn't present in the virtual memory, it is then retrieved from the disk in segment blocks (so not from address 12 -> 23, but you get (if blocks are per 25 ) 1-25 instead
the other information outside that address range may be empty or not. If latter, then it is the data from the same application
well, in theory :D
@KarelG isn't that the swap or is that something else?
well, swap memory is stored on disks
12:25
yeah, "it is then retrieved from the disk"
my code sux. Got 14 test units -> post "attempt" fix a bug -> only 3 successful.
|| afk ranting to screen and finding solutions
@KarelG bye KarelG
12:48
the heck command is that
oh its just afk
13:06
is it possible to add to the CSS transitions of a library, instead of overriding them, by creating another CSS rule?
I am trying to create a simple background color transition on dark mode by specifying a transition rule on * selector, but that overrides all the transitions that Material UI provides :-(
Are you using MUI with react? You can override the styles
@BenFortune Yes, I am using it with react. I just want my background color transition to be added to all the elements, but they should also retain the transitions that Material UI provides.
When I add * {transition: background-color ease-in 0.5s} nothing happens (presumably because transition rules defined on classes, which have greater specificity, override this rule?). Adding !important overrides the material ui transitions defined on the classes.
13:24
hello is there any expert in network/security?
@MHDaouas ask away, but you may have better luck on InfoSec site
can you send me the link?
do they have a chat board?
well I want to go through a firewalled network to a remote public SSH server
I heard that it's possible with SSH tunelling (port forwarding or something like that) but I'm not sure if I'm in the right direction
I found a way to visit restricted websites but not to SSH into a public server
I also don't want to leave any trace
lol
@MHDaouas are you able to make outgoing ssh connections?
no, that's what I want to do
I want to access a remote SSH server but from a firewalled machine
I also have a smartphone with 4g connection if it may help
the remote SSH server is secure
what network are you on? enterprise, school?
13:31
enterprise
unless they are doing DPI (deep packet inspection) you can probably evade their ssh ban by connecting via port 443 (https)
Just use a VPN
I don't have a credit card and can't pay for a VPN
How are you paying for your server?
I'm already using Psiphon as a VPN but it only works for visiting websites
not for SSHing
13:33
I still don't get what you're trying to do
The only way would be to tunnel from another server that has access to the other server
outgoing SSH connections are restricted in my environment and I want to reach a public SSH server
@BenFortune yes please how to do it?
I have a 4g connected smartphone
is there a mobile app or something
I think I need an SSH connection client + port forwarding app
but not sure
@MHDaouas you cant use something as proxy (or tunnel) without being able to connect to it in the first place
if you can use a hotspot on your phone then just use that
I can
13:37
otherwise setup a server listening for ssh on port 80 or 443 and try connecting
@MHDaouas ok so then whats the issue
I don't know how to proceed
so I open the hotspot on my phone, then?
I don't know if it possible on a non-rooted Android smartphone
Then connect to it through WiFi
These are all easily searchable FYI
and then I can connect to any SSH server??
through my phone?
You connect whatever device you're trying to connect to SSH through to your mobile's hotspot, and uses that connection instead of the corporate network you're obviously trying to break out of
^
Out of curiosity, how'd you land in the js chat for this question?
13:53
I couldn't find a chat room dedicated to security/network
so I searched for the most active rooms, this one is among them
2
thanks JBis
very cool
14:13
Good afternoon everyone. How to know the number of days between week X and week Y. Example. Today is Friday, I would like to know how many days to reach Wednesday.
given absolute dates?
or is friday vs wednesday the only info available for said work
14:27
@KevinB Week X is always the week of today, week Y is the one I will choose.
right, but
what data do we have
when you choose week Y what are you choosing
a specific date?
with a year/month/day?
or just an arbitrary "next thursday"
if it's a year/month/day, search for comparing dates.
What is the best way to detect a back button press in the browser? I have tried few things, that I have found on SO but seem to no longer work.
history api
15:05
Hi how can i use electron openDirectoryDialog in react electron app ?
@behruzmontazeri 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:28
hello, I could use some help with some regex...
So Im trying to replace all whitespace (tabs, spaces, other whitespaces, linebreaks)
with just 1 space
and then split it all
script.replace(/\s\s+/g, ' ').split(/\s|;/g);
This is what I have currently. it splits and does what it needs to
but I want to split between the delimiter and the next character
so if I had endOfExpression;start it should split into endOfExpression; and start
keeping the ; delimiter
Any way I could achieve this with regex in split
21
Q: Split string into array without deleting delimiter?

gandalf3I have a string like "asdf a b c2 " And I want to split it into an array like this: ["asdf", " ", "a", " ", " ", "b", " ", "c2", " "] Using string.split(" ") removes the spaces, resulting in this: ["asdf", "a", "", "b", "c2"] I thought of inserting extra delimiters, e.g. string.replac...

Thanks, this helps
Though it gives me a new idea
I could easily throw away the delimiter entirely
I could come up with an alternative solution for minified code
15:54
@Tiago you might find js-joda to be quite easy for the job
specifically the bottom of this page js-joda.github.io/js-joda/manual/LocalDate.html
It aint no lexer
but its a start
From here I just have to convert it into a keyword / string map
and then just write the logic for the functionality
and... basic programming language??
I guess??
Hmm. I would not suggest doing it that way.
Well I know its not perfect
but
I just really want to see SOMETHING happen
If I can atleast get an idea of how it works, I can polish it and improve my methods
Don't use regex
Well, I know that you cant just use regex and search for "function" and keywords and such
but Im only using regex to format whitespace atm
16:08
Iterate through each character and decide what to do
well thats the thing, I dont know how to write the logic to find matches and keywords through a giant array of the string
if(test){run()}
That's valid but no whitespace
use an actual lexer and actual parser
thank me later
Yes, build your own.
I.... Do. Not. Understand. How. It. Works

Thats the point
16:09
How what works?
you could translate my lexer/parser from kotlin to js...
The lexer
Ok first do basic tokenization
I dont understand the logic of them
the lexer's job is very simple
16:10
everyones just throwing a finished project at me, not an explanation of it
it just categorized chunks of text
also called tokenization
No
Well, it is, but I dont understand the JAVASCRIPT logic of it
i get the concept
I get what its doing
Lexing and tokenization are diff
I just dont understand the actual code
16:11
lexing is more than tokenization?
@MisterSirCode do you understand the concept of iterating an array and state?
If thats what is it
@Wietlol usually after. You tokenize then lex.
then yeah, I dont
it is* ffs
@MisterSirCode that is basic programming
you know how to iterate an array
16:12
it just doesnt look basic on the projects youve shown me
> A lexer is basically a tokenizer, but it usually attaches extra context to the tokens -- this token is a number, that token is a string literal, this other token is an equality operator.
On the projects ive been pointed to, I see a node.js project with 20 different script files, and I dont even know where to start looking
hmm... I suppose the guides I followed just skipped that part and made me make a lexer as entry point for performance reasons
@Wietlol yeah, you can go straight to lexing
depends what you are doing
its a balance between parser and tokenizer/lexer
JBis, even if it is "basic programming" I still dont get it, from the projects youve pointed me to, so id appreciate it if you could explain it in a little more detail... Less english, more code
16:13
Dude
How do you iterate an array?
A foreach loop?
Show me
I get the split and for / foreach loop
no
but how do you look for keywords and operators
16:14
just iterate an array
@Wietlol I've never built a true compiler (to machine code).
Seems really complicated. have you?
I have...
to be honest, the most difficult part is generating the output (for me)
because... you probably have never really written much of what you will use as output
There, iterated
for me, I have never really written stuff in llvm ir
16:17
Cool
So what now?
so did you have to work with assembly to debug?
@MisterSirCode do you understand state?
conceptually
Well, I don't understand what you're asking, so no
16:19
I did have to search some... llvm level errors..
seg faults, etc
but eventually, I got the hang of it
Kinda crazy how many languages use llvm
llvm is quite powerful tho
Must be
and it is not a final product, it is an intermediate layer
Doesn't it create the output?
16:21
you can use the same llvm code to compile for windows, linux, mac, browser (wasm or even js)
llvm code is not machine code, there is no machine that can execute it
you would need an llvm interpreter to execute it
or, a compiler to compile it further down to say... x86
Ah yes
JBis... why do you seem like you want to help me, and then halfway through a conversation, just ignore me / never reply.

Youve done this in the past aswell
the compiler I use is clang
it does the job, so I am happy, but it was a PAIN to get it installed correctly
@MisterSirCode im in class and having another convo. Read up on program state. Also take a look at HiAPL's implementation. How I iterate and manage state. It is not the best script but it works.
maybe look at how antlr lexers work?
that basically was my example
I just needed antlr + left recursive parsers...
I could make my lexer/parser public, but I doubt you would understand the code..
it is very cryptic
also... it isnt the most performant
it can parse megabytes of text in a second, but still... should be much faster
Considering Ive been trying to understand javascript implementations of it for over half a year with no luck, Id have to agree
Language creation in complex
true
especially higher level Lang's. The more abstraction the more difficult to create but the easier to use.
16:27
the advantage of my lexer is... it is dynamic :D
I only have to specify the grammar and it works :D
@Wietlol I'm mean can't the same lexer basically be used for all c based langs
@MisterSirCode if you just want to skip the lexing/parsing part of writing a language, then I can recommend just writing an antlr grammar file and consuming that
C, C++, Java, JS, kotlin (maybe)
@JBis not really...
for example, Java (afaik) still hasnt got string interpolation
Ah, didn't think about that
16:29
so, a string is most likely '"' char* '"'
while an interpolated string is much much MUCH more complex
also, Java has annotations (using @)
C# has attributes, surrounded by []
kotlin's identifiers can be escaped (surrounded by backticks)
almost every language has it's own stuff
@JBis I just realized your HiAPL syntax error uses deceleration instead of declaration
however, most of the C based languages can be easily parsed with the same technology
Im assuming thats a typo... right...
for example, C, C++, Java, JS, Kotlin, C#, etc, can easily be parsed by antlr
deceleration is a word tho...
not sure, but context might be important
HiAPL doctype deceleration
Pretty sure thats a typo
and thats mispelled
16:31
ye, looks like it should be declaration
deceleration is spelled like this
oh wait
oof.... dislexia
facepalm
Yes, I'm illiterate.
@JBis anyway, but languages like clojure, haskell, python and FRIGGING WHITESPACE are more difficult to write a decent antlr grammar for
But are those c based?
python for example has indents as groupings, which are often quite a pain for lexers
those 4 arent c based
maybe python is, but that one is still a pain for antlr
16:33
Yes. That's what I thought.
so, C based languages can easily be parsed with the same tech, not by the same grammar or tokens tho
also... Kodian (mine) cannot be parsed using antlr
that is why I had to write my own parser
@MisterSirCode hiapl requires a bunch of "lookaheads" as in the meaning of a character or group of characters is influenced on what comes after it
Your Lang prob won't
< changes it's meaning depending if / comes after or a letter
<bla vs </bla
I just want to create a veryyyyyyyyyy simply replica of javascript within javascript
something with just variables and math
@MisterSirCode I can recommend just skipping the lexer/parser part
I havent used that tutorial, but the same author taught me about lexers/parsers with antlr and how to utilize that for Kodian
if you eventually do want to write your own lexer and parser, it is much easier if you already have an understanding of their responsibilities and capabilities
so, there isnt really a downside of starting with antlr (or any comparable tool)
and antlr is much more performant than my own :D
but that is also not fair... antlr uses code generation :(
maybe I should consider that as well...
16:51
Alright
17:42
!!afk
@KevinB bye Kevin B
18:14
||afk
@MisterSirCode bye Mister SirCode
18:44
!!afk
@KevinB bye Kevin B
you fixed it
19:37
!!||
|| say ||
||!!
say '<([a-z]+) [^/]?>
@KevinB :D
20:01
!!🍎
Invalid command! Did you mean: 3, c, ff? Try help for a list of available commands..‍.‍.‍.‍
20:28
@KevinB work slow?
;)
not exactly
compiling
20:42
Oh. Carry on.
!!compiling
Invalid command! Did you mean: ceiling, cooking, opinion? Try help for a list of available commands..‍.‍.‍.‍.‍.‍.‍.‍.‍
21:45
@Mansur 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 was inpecting this page to understand how create-react-app used commander package. github.com/facebook/create-react-app/blob/master/packages/…
and I noticed something. In line 57 they set <project-directory> as required. So as a default behaviour, commander shows a default error message if a required option is missing.
However this is not like that with create-react-app. They use a custom if check, line 172 and if I don't enter the required option it shows that info without showing default commander error.
Any ideas how is it working?

« first day (3646 days earlier)      last day (1525 days later) »