« first day (3590 days earlier)      last day (1356 days later) » 
00:00 - 21:0021:00 - 00:00

12:01 AM
he wasn't a beginner
@Suisse just because it works doens't mean it's done properly
 
true
 
||>    var x =5;
    if(true){
    var x = 2;
    }
    console["log"](x)
it works
 
@JBis 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.
@JBis undefined Logged: 2 Took: 0ms
@JBis undefined Logged: 2 Took: 0ms
 
buuuut does it need to be properly if it just works? hehe
 
@JBis undefined Logged: 2 Took: 1ms
 
12:04 AM
@JBis omg
haha
why are you still awake?? I have an AI "exam" at 8:00 tomorrow in the morning
 
good luck
 
thx.. the pain is written in my face
I don't even know if you can say that like this in english
yeah you can say it like that
 
 
7 hours later…
6:54 AM
@Suisse we have that saying in dutch as well
 
 
2 hours later…
8:31 AM
if I added a Multipart file in my request
does it have a physical container somehwere in my server ?
 
@KarelG Dutch is just Deutsch with strange pronouncing duck
@Leroy what?
 
cos im implementing this upload function
 
Leroy, try to ask with different words - I did not get what you mean by "physical container"
 
what do you comprehend under "physical container"
 
implementing upload functions is a good hobby
 
8:33 AM
physical container meaning some temporary folder inside my server
 
you cannot grab it. so ...
 
so it is still virtual not physical xD
 
ah, temporary file. Not directly no
 
sorry for my terms haha
 
Leroy.. yes.. temp
 
8:33 AM
if you start a multipart request, it sends a bytestream to the server
the server then groups these bytes and gives it to the application
 
+1
 
if example that file is infected or what
 
the application has then a responsibility to store it as a file locally
so you have to save it somewhere in a temporary folder yourself
then apply scans
 
+11
 
and validate it
if it is ok, you cna move it from the temporary folder to the dedicated folder
 
8:35 AM
if its infected.. is it an executable?
 
even pdf files can be infected ;)
 
even humans
true
 
yes ^ thats what I mean
 
that "group of bytes" are gone if the request has received a response
 
but if a pdf is infected.. what can it harm on the server?
 
8:36 AM
it only harms the person that is using that pdf file
 
ohhhhhhhhhhh
 
but you are responsible to not spread malware
 
wow KarelG thanks alot !
few minutes but I really helped me alot
 
or protect your own internal employees (support teams!) against these intrusions
 
this is how coron... na ok
they did not protect the servers in wuhan!
 
8:38 AM
Remember to use UDP over TCP to avoid handshake ;)
 
xD
 
 
5 hours later…
2:05 PM
@JBis IMO, it's because at a certain point you have the confidence to go out and find what you need in the docs or to figure it out yourself.
Every language i've dealt with feels generally the same. you learn the basic syntax, how things work etc, then it's just a matter of using that to bend it to your will
Until you're comfortable with making mistakes, fixing problem, etc, it's going to be a hassle.
 
@KevinB Also, there are some courses for X developers to learn Y technology but they are quite a bit rarer and target very specific subsets. Definitely not something I can see making you lots of money by keeping your teachers constantly occupied. I've been to some workshops that taught something at a more "medium" level but they were organised by my company and had like 20 people tops in them. The lecturers would be explicitly contracted to do this, it's not a regular course in any way.
 
I can sorta understand trying to teach things like spotting things that should be refactored, or why a certain pattern is good, an introduction to testing, etc, but in the end... those are learned skills... things you need to use in action over the course of years to really grasp.
a class would be nothing more than an introduction to it
 
3:01 PM
@KevinB it sounds like the only value you see in the classes are to "jump-start" someone in programming because most of programming should be learned on your own. Not disagreeing, just interesting.
 
yeah, i think people should learn to think on their feet rather than memorizing everything or relying on search having the answers. Be able to recognize a problem, rather than memorizing what problems exist and the solutions to them. Be able to morph, change, combine, ideas into unique solutions to unique problems.
A class can't really teach that... it's stuck with some subset of material, a small set of time,
it's like reading a programming book. It may have some great things to inform the reader of, but it'll always be limited to what it contains
like learning math without learning the ways you can morph the equation in your mind to make mental math easier
 
3:20 PM
mornings o/
do you have an idea that an "expected identifier" could refer too when pointing to ctx in p: function update(ctx, [dirty]) {
I have little hints because that is the error message that a webview sends me back when compiling on windows
am trying to target ie6 to satisfy the engine of the webview
 
that's your source, and you're compiling it down to ES5, and the ES5 is throwing an error there?
 
no, I believe that is the compiled down result
it is the html code I am feeding to the webview
 
huh. does it support destructuring?
I wouldn't expect IE6 to
 
    let html = format!(
        r#"// stuff //"#,
        global_css = inline_style(include_str!("../gui/public/global.css")),
        bundle_css = inline_style(include_str!("../gui/public/build/bundle.css")),
        bundle_js = inline_script(include_str!("../gui/public/build/bundle.js")),
    );

    print!("{}", html); << that is the code from this print statement

    web_view::builder()
        .title("Open Outliner")
        .content(Content::Html(html)) // here I feed that code in the webview, there should not be any further transformation
hmmm, possibly it does not. Wouldn't the babel transpilation catch up on that and remove the destructuration however?
 
only if it is instructed to
 
3:28 PM
ooooh, I will try that :)
 
excellent!
 
yeah, they changed a few years back i think, where just saying "target X" doesn't really do a whole lot. you have to tell it specifically what to transform
what to polyfill, etc
haven't really used it much since
 
hmmm, the error is still present after the installation and config option adding, however the [dirty] is still there as well, probably I've misconfigured something...
 
@KevinB i think you pinned pointed a problem with education in a lot of industries, memorize and regurgitate, it's effects are just more pronounced in software development industry. You can't create something new by memorizing and regurgitating. And while creating something new, there will be new problems you face. You can't memorize every problem ever.
 
3:35 PM
I almost feel like an outsider to the programming community at times, because I don't know the terminology. i never took a class that mandated memorizing it. it's just not something i see as important. Often when i dig into some of those concepts, it's just a feeling of "Duh, of course you want to do it that way" rather than a learning experience.
because often times... it's what i've been doing all along, they just had fancy names for it
 
> Please note that Babel allows destructuring arguments in old engines even if this option is disabled, because it's defined as iterable in the ECMAScript specification.
 
I've only learned what i need to know to accomplish what i want to accomplish. So when i walk into a beginner class and they start talking about converting binary to hexadecimal by hand, i'm just as lost as the next person.
 
that looks like what happens to me. I wonder how I can turn that off, is there a way to convince babel to follow a specification where that does not happen?
 
that does look more applicable
the other doesn't specifically show destructuring parameters in examples like that one does
also note:
> Default parameters desugar into let declarations to retain proper semantics. If this is not supported in your environment then you'll need the @babel/plugin-transform-block-scoping plugin.
 
still no luck, with all of those. that [dirty] parameter stays there all the same :(
the good side is it really seem to be the only such parameter before that in the file, so thanks for the hint, I'll try working on it somehow
 
3:47 PM
Yeah i was just thinking maybe try factoring it out temporarily just to confirm that it's the cause
 
 
1 hour later…
4:57 PM
Why weren't the native JavaScript features immutable?
└ because the designers/ developers were too busy messing around with chickens to get things done consistently

🤦
 
5:11 PM
@Lapys I apologise for being really thick (it's been a rough day) but I don't get the "messing around with chickens". Can you explain?
Also, I mostly agree.
 
if they were immutable we wouldn't be able to have shims and polyfills @Lapys @VLAZ
 
However, this goes the other way, too. Pretty universally the method which checks if a collection has an item is called contains. In JavaScript it's called includes. This is all thanks to a single library that went and messed around with native prototypes back in the day. The ES6 proposal did use contains as the name for the method but when browsers implemented that, any site that used MooTools had a problem. It was the standard that had to change to use includes.
 
I didn't know that
that story is a good portrayal of JS
 
However, it gets even more fun - if you want to lookup a DOM element and check if it has a given class, you'd do something like document.querySelector(whatever).classList to get the classes and then you need to call contains to check if a class is in it. Not includes.
And then Map and Set went with .has instead.
 
5:38 PM
you know when you're watching a sci fi movie and you're like, wow, this scenario is really interesting, but it's so inefficient that there's no way it could possibly actually happen
javascript is that
 
I like that description.
 
6:22 PM
@KevinB Turns out multiple things. 1) I did not succeed in polyfilling that array destructuring parameter, neither was I able to modify svelte's code so that it removes that specific part and see if it builds successfully. 2) I changed idea and tried to actually fix the rust building process to target the edge engine and... with some help I realized I was using ancient version, and the new one Simply Worked™
5/7 would fumble around two days while simply not using latest versions
 
👍
yeah... that's the first thing i do when i revisit an old project
update everything
because who knows how long it'l be till i can work on it again
 
yeah...
:) the result really fills me with happiness: svelte app in a webview!
all reactivity and general app development I'm fairly experienced in but in a desktop app
 
6:54 PM
 
I'm adding nodes to an svg: this works

   items.map((item) => {
            svg.append(item)
            currentSvgItems.push(svg)
        })
however if I want to remove the existing before appending i tried this:

    currentSvgItems.forEach((item) => svg.removeChild(item))
        currentSvgItems = []
        items.map((item) => {
            svg.append(item)
            currentSvgItems.push(svg)
        })
but the whole svg gets removed
 
I'm confused by the intent here. You remove the items from currentSvgItems, just before pusing them all back in a overriden currentSvgitems?
I don't remember the details, but I remember having a situation where modifying a collection while iterating over it can lead to... undefined results
 
items comes from elsewhere
 
currentSvgItems.push(svg) seems odd
presumably you're pushing the same svg into currentSvgItems items.length times
 
my mistake its
currentSvgItems.forEach((item) => svg.remove(item))
but same issue
currentSvgItems.push(svg)
is so i know what to remove later
i also have defs in there that i dont want to remove
 
7:02 PM
Right, but, uh, item is the svg, not the item appended to the svg,
 
or some arbitrary svg's
 
am i missing something here?
 
item is a node to be added to the svg
 
is it though?
 
like image or circle
yes
it renders fine first time
 
7:03 PM
items.map((item) => {
  svg.append(item)
  currentSvgItems.push(svg)
})
you're pushing svg to the array
 
not the whole svg
 
it's going to be the same svg on every iteration
...
 
oh whoo[s
sorry
thx
 
i'm also not at all familiar with svg's, so can't comment on actual functionality, :p
but adding/removing from arrays, definitely
so, removing before appending, would require item to actually be the node you're removing and adding
not just one that looks like it or has the same properties
otherwise, that logic would work
if they're the same
 
7:34 PM
hmm I"m thinking of following some courses at edx or coursera.. Just to get some things to write on my resume.. Anyone experiences there?
 
Jay
I'm getting Error: Could not find matching close tag for "<%=".
on this line:
<a href="/games/<%= game._id %>">
but I have others, like
<h4><%= game.title %></h4>
that work fine
here's the whole thing, I'm gonna remove all the classes and extra irrelevant stuff
 
so the issue is

svg.remove(item)
just removes the whole svg
 
Hey! qq.. just setting up my first server+client webapp (going with node.js, react and typescript).

I'm confused: Do I create one project for both server and client? Like, the server *serves* the client application, or do I create two projects. A server project (like an API) and, separately, a client project for the client webapp?
 
kaboom
both are correct
atm i just use one prj cause its jamstack
 
@Jay what language is that, where's the code located, what kind of file, etc
 
7:43 PM
@Jay 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.
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
 
@JBis oh this is neat, let me try
 
@Jay 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.
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
1 message moved to Trash can
 
hmm. ok, thanks @SuperUberDuper, I sort of like to learn "basics" as this is my first projects, and it's a really really simple webapp.
 
ok removeChild is the cirrect one
 
Jay
<% games.forEach(function(game){ %>
    <a href="/games/<%= game._id %>">
        <div id="Game">
            <div>
                <img src="<%= game.coverArt %>">
            </div>
            <div>
                <div id="GameDetails">
                    <h4><%= game.title %></h4>
                    <p>Releases: </p>
                    <p><%= game.platform %></p>
                </div>
            </div>
        </div>
    </a>
<% }); %>
 
7:45 PM
how about
 
Jay
there we go
 
(abc = () => console.log(`(abc = ${abc})()`))()
 
@aioobe you might want to check out svelte
 
Jay
@KevinB it's an ejs file
 
!!> (x=()=>`(x=${x})()`)()
 
7:46 PM
@forresthopkinsa "SyntaxError: Unexpected token ')'" Logged: `` Took: 0ms
 
Jay
it all works fine except the href in the <a>
 
Aug 10 at 22:22, by JBis
Oh, I forgot one part. Accessing of Function.prototype.toString through any means is prohibited.
 
awwww
that makes this a lot harder
 
:)
 
can you output the ID elsewhere?
what does the raw output look like?
 
Jay
7:48 PM
let me try that
yes, I put <%= game._id %> inside a <p> and it worked
 
i don't see anything that would suggest what you're doing wouldn't work
 
Jay
that's exactly what I thought
but it just keeps saying it can't find that closing %> tag
I'm trying to display an image and some details about each game and have the whole thing wrapping in an <a> so the whole thing is clickable
I've tried moving the <a> to just be around a particular element or one of the divs, but no matter where I put it it says it can't find that closing tag
tried single quotes instead of double quotes for funsies
if I inspect it's got the ID, it just doesn't work when I click
omg I found it
sometimes you just have to blabber on to strangers for a minute haha
it was missing in another ejs template
the show details one
 
8:11 PM
@SuperUberDuper Thanks. I'll do that. (Can I combine that with react and typescript?)
 
svelte is not react
and typescript is bloated)
you wont like it
 
oh, I see!
 
ts is good for the backend
 
Gosh.. so many decisions.
 
use firebase
you cant be good at front end and backednd
 
8:13 PM
@SuperUberDuper says you
I think TS is excellent for frontend
 
wasnt talkign to you
 
firebase is like some sort of backend-framework, no?

What I want to achieve for this project is a few text-boxes (with plus and minus buttons to increment / decrement values), and if I have the page open on my phone, and click plus/minus on my laptop it should reflect the new state on the phone. So have been reading about server-side-events.
 
kinda silly to call it "bloated" when it's a superset of JS and you can use as much or as little of it as you want
 
||> (() => { console.log((s = "console.log((s = \"%s\"), s)"), s) })()
 
@JBis undefined Logged: "console.log((s = \"%s\"), s)", "console.log((s = \"%s\"), s)" Took: 0ms
 
8:14 PM
@SuperUberDuper I understand; I'm talking to you
 
this is a ts fanboy
 
there you go
 
lol this guy
 
@BenjaminGruenbaum ^^
 
firebase is quick to market
 
8:15 PM
I'll check that out too.
 
lol you guy
 
okay go ahead and explain why TS is "bloated"
 
firebase cloud functions also give you a nice ts starter for the cloud functions
i have better things to do with my time
 
clearly not
 
oof
 
8:17 PM
you're in here telling people to steer clear of TS and that's bad advice
TS isn't for everyone or every application but don't mislead people into thinking it's only useful on backend
 
ive used ts since 2012
when did you start
 
2016, your point being?
 
there
your opinion is lesser
 
lmao are you trolling me
 
TS is good for everything
 
8:19 PM
I'm enjoying this 🍿
 
what is going on here
@SuperUberDuper How long have you been a regular in this chat room
 
!!magic
 
(∩ ͡° ͜ʖ ͡°)⊃━☆゚. * ・ 。 ᵀᴴᴱ ᴳᴬᴹᴱ
 
whoa now, define regular
 
modern ide's give you the benefits of ts without coding ts
and js will likely have optional typings one day
 
8:20 PM
oh my
 
lmao
 
remarkable that you can use a language for eight years (?) and still not understand it
 
@SuperUberDuper what ide do you use?
 
webstorm
 
alright
 
8:21 PM
lolllll
 
here's what i want you to do
open up a project
in the left panel scroll down
 
@KevinB I define regular as me
 
Click the arrow next to "External Libraries"
Under "Node.js Core" click the drop down
 
@aioobeif you want to write 30% more code, go ahead and use ts.
 
there's a nifty little folder there
called "@types", open it
It's TypeScript!
 
8:23 PM
and ide's understand it
even if your coding js files
 
@aioobe Please don't listen to this guy, he's giving you bad advice
 
yeah because of typescript
 
would you say the same for eric eliot?
yeah ts is good for libs
ive wrote a bunch with ts
 
alright i'm tapping out, it's kevin's turn
 
I'm a Java old-timer so I kind of like types. (But I'm sort of a dinosaur.)
 
8:25 PM
Mr passive aggressive here thinks he knows it all
 
I just looked up Eric Elliott, hadn't heard of him before, so no his opinion doesn't mean a lot to me
@aioobe If you're used to types then use typescript, simple as that
 
google typescript tax
 
yup. Kind of leaning towards that.
@SuperUberDuper haha, will do. Trying to be open minded. (Drawback is that it takes me a week just to settle on language/frameworks etc... ugh)
 
@aioobe do note, typescript isn't exaclty like Java types. You'll see what I mean. But make sure you understand JS fundamentals before starting TS or you'll get confused
 
ts doesn't even give you runtime safety like java
 
8:27 PM
yup. I've dabbled a little bit with ts before, so I'm aware of the differences. This is the first time I'm trying out js/ts on the backend though... and server side event stuff.
 
ts is terrible idea for people new to js
 
that's not what you said
you said it's bloated and shouldn't be used
 
no, its bloats your code is what i meant
 
Dude that seriously doesn't make any sense
pure js is valid ts
 
:any everywhere
to get the stupid linting rules to work
 
8:30 PM
No, you just configure the rules properly
:any is implicit
 
or typing :string for the most obvious thing
20-30% more code
and you code is less readable
 
are you sure you've been using typescript?
I think we're talking about different languages here
 
🍿
 
cya
i got bored
 
like I've said a few times: pure js is valid ts
uh huh
 
8:31 PM
sidenote, why does flow exist?
 
@JBis because it's good
 
it's terrible
 
I strongly prefer node over typescript, as I think it's more descriptive
Where typescript is sometimes really rigid
 
hmmmmm
 
it came out after typescript and yet it's worse
 
8:32 PM
node > typescript?
interesting
 
forrest, i think we entered an alternative universe
 
I think you may be right
either that or I'm having a stroke
 
@JBis it follows a complete different paradigm
 
the paradigm of being bad?
 
is "java" bad compared to c#? Or python C?
1
Q: Typescript type refinement unknwon to object and retrieving elements

paul23Well consider I have a json-loaded data object. The type of a json is defined by: const myObject: {[p: string]: unknown} = JSON.parse(somestring); I wish to handle this json as if it would be a dictionary-tree. Now I try to read some child object and iterate over that: const cfgCookie = cfg.c...

that for example I can easily write using flow - but I could only do it in typescript by sidestepping and introducing some type unsafety
 
8:33 PM
@aioobe The bottom line is that you can add typescript to your build system and then use it as much as you want
You pay the initial investment of getting the build system working and then you're free to use it or not use it as much as you please
 
The flow team even put together a list of reason not to use flow flow.org/en/docs/faq
@forresthopkinsa "getting the build system working" this gives me nightmares
 
it's easier on backend lol
 
Especially type refinements are much better in flow, typescript is often feeling like shoehorning c# on javascript
in flow you have all kind of refinements "just working"
 
hmmm I use TS and C# daily and even though they were designed by the same person, I don't find the type systems to be similar at all
 
ok fuck it, im releasing
 
8:36 PM
type refinement in typescript is a pain, leading to a lot of unnecessary boxing and unboxing of variables (or -what i've seen done more often- casting through unsafe any or unknown).
I do use typescript nowadays, and I would recommend it: but that's only because it's more widespread.
It's like I would recommend javascript to someone instead of say rust - just because it's easier to find help with js.
 
I dunno, type guards are pretty useful
 
@forresthopkinsa sure, but that's not type refinement.
 
are you talking about smart casting
 
Well no about putting some "if statements' around a more generic type - and then the type system can understand from those if statements that it's a more specific type
Like:
let a: number|undefined = 1;
if (a !== undefined) {
    a += 1; // automated, ts knows it's a number and not undefined;
}
while that "works" some other things don't
IE: try refining "unknown" (or a covariant to-all, contra-variant-to-none type) into a standard object/dictionary.
 
yeah in some languages that kind of thing is referred to as "smart casting"
 
8:41 PM
1
Q: Typescript type refinement unknwon to object and retrieving elements

paul23Well consider I have a json-loaded data object. The type of a json is defined by: const myObject: {[p: string]: unknown} = JSON.parse(somestring); I wish to handle this json as if it would be a dictionary-tree. Now I try to read some child object and iterate over that: const cfgCookie = cfg.c...

 
meh, just use type guards
 
I tried with:
if (typeof cfgCookie === "object" && cfgCookie !== null && !Array.isArray(cfgCookie)) {
    //now I wish to be able to index cfgCookie
}
If you could explain why, please I'd love to have above answered..
Other than const res = ((cfgCookie as any) as myObject)['key'] - which is unsafe
If that's the "answer" I could state directly that flow is superior here. QED
 
So you have a specific type for this object
But it's currently typed "any" because you're getting it out of a cookie or something
 
wait, in flow you have to do similar crap
 
I get it out of a json file
 
8:44 PM
Okay so one way or another you're deserializing it
 
@JBis nope - the if statement is actually refining it.
 
The deserialization step is when you need to set the type
 
yeah that line above is the deserializing
but I'd have to go type unsafe during that step?
 
Well I don't with flow
 
8:45 PM
const bla = JSON.parse(<stuff>) as SomeType
 
So you're deserializing something but you need safety because you're not sure the contents of your json?
I guess I'm not grasping the problem
 
do you ever change something really small that you are 100% won't change the result of the tests, you just ran and then you don't check it again and it breaks your app?
 
Definitely
 
so annoying and now i gotta do a hotfix and i look stupid
 
it happens every day
today was your turn
thanks for taking one for the team
 
8:48 PM
:'(
 
it's like jury duty
 
except im the murderer
 
lol
 
00:00 - 21:0021:00 - 00:00

« first day (3590 days earlier)      last day (1356 days later) »