« first day (3517 days earlier)      last day (1432 days later) » 
00:00 - 19:0019:00 - 00:00

7:01 PM
It supports || and !! but kevin wants |!, pretty much sums up users
 
Sam
@JBis can you use .every to assign all variable values too?
 
|| mdn map
 
||> [3,4,6,1,"test", {bla: 4}, null].map(variable => !!variable)
 
@JBis [true,true,true,true,true,true,false] Logged: `` Took: 0ms
 
7:28 PM
@KevinB thats a tough place to start?
@JBis but thats so hard!!
 
the thinking or the solving?
 
im acutally a very self motivated person but finding things to work on that are appropriately hard is difficult
@JBis the thinking
 
here i got something for you to do
The bot here uses the request lib for a bunch of shit. Replace all instances of request to fetch.
The code is pretty shit, I warn you.
|| echo Thanks, I could use the update
 
Thanks, I could use the update
 
@JBis ok tomorrow i will start
 
7:33 PM
!!magic2
 
awesome
 
@JBis your portfolio is epic
 
thanks
 
@JBis how hard was your bitlink website to make?
it is exactly the same as jitsi?
 
7:37 PM
No. Doesn't use jitsi.
 
no
 
It was a pain the ass to get webrtc to work but other then that it wasnt too bad. It was also my first big project that used react.
 
how did you find out about webrtc?
 
Hello, everyone 🙋‍♂️ Is anyone here comfortable with Sequelize??
 
and typescript
@Permian this was the issue, there wasn't much information on the technicals. I ended up using mediasoup.org for the webrtc stuff.
 
7:40 PM
this is so cool
 
comfortable, no, but i doubt i'd have much trouble researching an issue if it was one i was interested in.
or at the very least pointing to possible things to research
 
@JBis did you use bootstrap / material ui?
i can never work out how those integrate
 
i've used both over the years... but... i'm not a huge fan of such libraries
they're great for things that fit neatly within their boxes
 
what else do you use? if you do the design yourself it will look crap
 
@Permian i hate material with a passion and bootstrap is just bleh. I did it custom (with react ofc)
Why would it look like crap?
 
7:44 PM
you can get the same design without relying on a library to give it to you
 
surely if you dont use material or bootstrap you will have to design your own buttons etc
which will look crap
 
Why would it look crap?
It's just additional work
 
where do you get the graphics from?
im a noob, dont take my thoughts as facts
 
material UI for example, has a lot of great form inputs... but... the moment you need an input they don't support (in my case a datepicker) you're stuck
 
I use FontAwesome for icons.
 
7:45 PM
for buttons, all you neeed is a little css
 
These style libraries are mostly composed of css
 
really cool
 
padding, a border radius, maybe a shadow, a gradient, a rollover transition,
a down state/transition,
 
If you need graphics like icons there are plenty of sources for that
 
that seems difficult
and pictures? @forresthopkinsa
 
7:46 PM
I just can't stand material UI.
 
In fact these style libraries generally don't come with graphics themselves
 
it's like 6 lines of css
no image needed
 
Material UI uses Material Icons which is a different library that you can depend on separately
 
ok cool
 
There are plenty of icon libraries
 
7:47 PM
like?
 
font awesome
 
the aforementioned FontAwesome
 
fontawesome is my goto
 
they are coming out with font awesome 6 btw
 
7:47 PM
there was a 5?
and a 4?
 
I don't have anything against Material Design, I've used it a few times and it's a solid design language
But like any library it comes down to deciding whether it's worth using someone else's implementation or doing it yourself
 
I've never used it so i cant comment on how it works, i just hate the ascetic
it looks horrible imo
 
this is practical js is pretty basic
 
yeah, if you already know js don't use it
 
im watching it for recap
i need to start building
i think the hard bit is working out how the tech's work together
and how to make it look pretty
 
7:56 PM
you can make it pretty later
iterate design
 
ah man
this is what happens
i watch these tutorials and think they are so basic
then when it comes to build something it is much harder
 
 
haha
 
8:23 PM
@JBis lol, the hands on 1
 
@BenjaminGruenbaum ah, wonder how long till thats standardized
FYI
May 12 at 18:55, by forresthopkinsa
@BenjaminGruenbaum Sorry for the summon -- wondering if you have more info about this ^
 
8:41 PM
@JBis about what? Records?
The most recent version of value types currently still being specced and quite recently updated is Records. const obj = #{x: 3, y: 6} - obj is an immutable record.
 
Cool
Thanks!
 
That's the SO from "back then" btw stackoverflow.com/questions/21838436/…
 
Useful
 
interesting, i'll have read more about this. I don't really know what tuples are.
 
@BenjaminGruenbaum wait, I don't think value objects are in yet. Or have I missed them?
@JBis Tuple is a fancy word that basically means "a set amount of objects". A tuple often contains two items but they might be three or five or any number. But when you have a some sort of tuple in your domain, it's always the same amount of items.
 
8:56 PM
@VLAZ they are stage 1
 
TS models tuples simply as arrays of the same size and the same types, like [number, number] - a tuple that contains two numbers. It's pretty much all it is. The only thing is that in JS you cannot check their equality, e.g., [4, 2] == [4, 2] should be true for real tuples.
 
so its just immutable arrays and objects?
hmm
i don't like immutability
 
Not "arrays" - that's just how TS models them. They are a collection of values. You can definitely have two objects as a tuple.
And they don't need to be immutable, either. However, tuples that hold the same values should be equal.
 
@VLAZ do you know what a stage 1 proposal is?
 
Order does matter, though a tuple [4, 2] (or (4, 2) in maths notation) is not the same as (2, 4) because the values signify different things. You might have width and height passed as a tuple and those are two different shapes, then.
@BenjaminGruenbaum yes, I do - it's very, very, early
 
9:01 PM
Yeah, it's typically not implemented in browsers yet
 
I was asking if they are in because the answer there mentioned ES7 and that came and went literally years ago. Apparently the plan for value objects to be there is not exactly on track.
 
anyone else like brackets around your cases in a switch statement?
switch (currentValue.tagName) {
                case "a": {
                    const link = currentValue.getAttribute("href");
                }
            }
 
I don't. I wouldn't oppose it, though.
At least it gives you another scope nowadays.
 
yeah, i like it
 
i don't like switch statements
 
9:20 PM
Depends on the size of the 'case' scope
 
i only use them when not using them would create an absurd amount of extra code/logic/conditionals
 
I can't remember when is the last time I wrote a switch in JS. Must have been years ago. It's just super not useful when you can trivially use an object where the keys are the "case" statements. I did write a switch in Java to check for concrete classes. That was about a year and a half ago. It was also extremely ugly but it was for an ugly codebase.
 
i can only think of super edge cases
like, say, you have 3 values that should do x, and 2 of those should do both x and y, and 1 should only do x and z, etc
complicated and likely better solvable using other methods
but... a switch gets you exactly the logic you need without much duplication
 
I find fallthroughs to be a code smell. Sure you might need two cases to do the same thing but extracting the logic is still cleaner.
 
yep
 
9:28 PM
If you also do something while falling through tends to be a bug waiting to happen.
case "a":
  x = 42;
case "b":
  x += y;
  break;
ugh...
 
@JBis don't do currentValue.getAttribute('href'), do currentValue.href
In general, prefer properties to attributes, they will (for example) resolve URLs for you (correctly)
@VLAZ there's eslint rules for that :D
 
@BenjaminGruenbaum using an html parser lib, i'm too lazy to check if thats supported
 
@JBis what's an HTML parser lib?
 
a library that parses html
:D
 
9:37 PM
Why don't you just use regex to parse HTML like REAL PROGRAMMERS do?
 
that looks neat how fast is it?
 
@VLAZ lol, gEniUs
Not sure if you're asking me, but if you are, I have no idea
I generally use this for a dom parser:
 
!!wat3
 
wat3 was the best
 
9:40 PM
cheerio advertises itself as fast, therefor it has to be fast obviously
 
i mean
 
@KevinB wat was it?
 
what does fast even mean, if it isn't in comparison to something else
 
it was the cannon wat
yea taht
 
9:41 PM
 
@JBis Command with that shortcut already exists
 
fuck you james
 
Wow, rude
 
 
@JBis Command with that shortcut already exists
wat5 has been added
 
9:42 PM
|| wat5
 
nice
 
!!wat 4
 
!!wat4
 
trippy
 
lmao was typing that
 
Good. I'm not here to tell you people what to do in your own homes but if anybody was under the influence of drugs, that might have been mightily confusing.
 
its ok, @OvieTrix isn't here right now
 
But who knows - maybe somebody turned into a customer for the shop already.
 
9:58 PM
Pfft I wish there was something akin to python's itertools library.. It makes code so clean.
Even a basic thing like chaining iterators is hard in javascript: docs.python.org/3/library/itertools.html#itertools.chain
 
@paul23 there is a proposal for that. I'll try to dig it up
 
yeah proposals are why can't have nice things in javascript ;P
By the time a proposal is even slightly agreed on its a decade later.
 
Iteration Helpers. It's currently Stage 2
 
Funky thing is, one can write libraries for this. But these are things that can very, very well be optimized when it's build 'native'.
 
Yeah, I was thinking of writing this but...I rarely use generators, so it wouldn't have been that useful to me.
 
10:03 PM
Like in python, chaining iterators and operating over those chains is so fast that the difference in speed in negligible with the base iterators in the first place. Literary only a few clock cycles (if that) slower.
At that point chaining iterators nad handling chains becomes "second nature" since there is no drawback. Compared to what we do in javascript by repackaging data constantly into array/map/set/whatever-you-need.
 
Yep, having more lazy evaluation would be great.
I don't think any JS environment nowadays optimises a chained operation on an array.
It's possible in theory but don't think it happens in practice.
 
I tend to use map.values() so often, as in our product we decided to always use proper maps instead of objects for data storage.
 
10:26 PM
@VLAZ could create issues
you may need all of the first operations to run before the second operations can run
 
Some operations can be terminal but in general you shouldn't have operations that consider the whole of the data to run.
Operations should be on individual elements. Else you get chaos. Consider an infinite generator - that cannot really be processed as a finite sequence.
 
11:16 PM
Is CORS supposed to permit posting of data between origins? I am able to upload files to a cross-domain server using an XMLHTTPRequest, but can't read data back because of CORS. Seems like you'd want to block cross-origin posting as well.
 
hello guy quick question, why is expo standalone app splash screen takes too long to reopen after installation ? please any fix or suggestion will be greatly appreciated
 
depends on the settings
@jdgregson
Hmm should I let nodejs check for all files in a directory when I just wish to get a filelisting. Or should I keep a separate file listing in the database?
 
00:00 - 19:0019:00 - 00:00

« first day (3517 days earlier)      last day (1432 days later) »