« first day (3315 days earlier)      last day (1856 days later) » 

06:59
Is there a way to hide non-enumerable properties like __proto__ when I log an object to the console? In 99.99% of the cases it just clutters the output.
 
1 hour later…
08:13
@BadgerCat yeah! Altough the next one is the key one I guess
I'm getting a general vibe we really want to vet people for this position well
@KevinB a reduce might be more intuitive / elegant
urgh, I'm still mad I can't do [...xs, x] = [1, 2, 3] in js
I guess a reduce looks horrible without it: ['a', 'b', 'c'].reduce((acc, next) => (acc.push(acc.length === 0 ? next : acc[acc.length-1] + '/' + next), acc), [])
08:34
[x, ...xs] = [1, 2, 3].reverse();
xs.reverse();
:P
add 2 more, for good measure
Two more what?
xs.reverse().reverse().reverse() you mean?
yup
why would you even want [xs, x] in the first place
so I can reduce to [...xs, x, x + '/' + next]
08:45
I am having honest problems reading that
9 hours ago, by Kevin B
if i have an array... ['a','b','c'], how do i get it to ['a','a/b','a/b/c']
oh
sorry, 9h ago, sorry not sorry :D
so I think
intercalate '/' . map (map take [1..length xs]) $ xs
but I haven't tried it yet
you want flames? I can give you flames
eh I'm missing a standard intercalate that does what I want
oh that's sad, if I google "haskell on fire", I get a lot of images of burning houses from Haskell, TX :/
08:49
Good job!
okay wait that's borked
@towc Haskell is flaming fast
I'll get back to work
o.o
@BartekBanachewicz wut
Is there a way to detect when user enters more than n characters within x milliseconds in javascript
09:03
@KarelG I assume you haven't seen the ES2020 proposals yet
that's a haskell function
but ...
13 mins ago, by Bartek Banachewicz
okay wait that's borked
not sure if you can handle it within one haskell funciton 🤔
you can handle anything within one haskell function
btw towc, intercalate is similar to js .join
09:05
haskell programs are just one function
idk how to :D
do it in multiple functions, then replace :P
it's easier in js than in haskell because I already got a solution in js <.<
It's easier in JS because it's not haskell.
some are however easier to do in haskell :0
09:08
there we go
flames
f :: [String] -> [String]
f xs = map (intercalate "/") $ zipWith ($) (map take [1..length xs]) (repeat xs)
it was your fault @towc I got confused
because JS accepts 'x' as a string literal and in haskell it's a character literal
sure, blame the foreign guy
very mature
anyway the above works so I win
today I realized that my haskell got rusty.
@towc when is a guy a foreigner?
09:11
I can't comment on that
actually you know what
POINTFREE
sadness
wait no i need length
fuck
😂
made my day
09:30
Hoy guys
I was asking my self
What kind of comparison does if do
tripple or double equal ?
I mean does if(randomBoolean) = if (randomBoolean == true) or if (randomBoolean === true)
double
you can very easily test this
if (1) { console.log('hey') }
> "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" In one case a member of the Upper, and in the other a member of the Lower, House put this question. I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
and my bet is it's not exactly double, but it's very similar
@Baldráni javascript has a concept of boolean coercion (truthy / falsy)
Interesting
@KarelG tell me more
Is this a good start for my understanding ?
09:34
if you have if(variable) only non-falsy values makes the program going to the if-body
@KarelG whoever has came up with the idea of implicit coercion needs to repent their sins in eternal hells of bugs introduced because of them
👌
I love this line from the GLSLES spec
> The OpenGL ES Shading Language is type safe. There are no implicit conversions between types
glory
@BartekBanachewicz hehe. Like true == 1 yields true while true === 1 does not :P
loosely typed language can be fun but does not work elegantly when you have a big project. JavaScript was not intended to become that big as we know today
09:37
the time wasted by writing explicit conversions is like 0.0000001% of time wasted by the bugs that happen because of the implicit ones
@BartekBanachewicz I'm quite thankful for scripting languages and their "urgh, let me fix this for you" attitude
it just happens javascript ain't used for scripting anymore, and that's the bad part
One of the reason to loosely type it is to make the transmission of data through the internet smaller
@towc lEt Me ''FiX'' tHiS fOr YoU
but hey, we have TS for you.
@KarelG um what
09:39
TypeScript is an useful platform for large scale projects.
if anything
sending tightly packed statically annotated binary data is much more efficient than sending json with string keys
well, this runs without compiler errors in TS:
if (1) {
    console.log('hey')
}
and it shouldn't
I wonder if it shouldn't
it definitely shouldn't
it should be a hard type error
the 3 keystrokes you save by writing "1" instead of "true" aren't worth the bugs you'll get
09:41
heh. you would love seeing people asking here or in SO question to "make this as a one liner"
like if their current one is not OK (while it is really readable)
well less lines definitely makes the code more readable, up to a point, all other factors removed
there's less to scroll through
ooooooooh! TypeScript 3.7 is out, wooooohoooo!
Rust 1.39 came out a few days ago as well
RustScript
Optional Chaining has to be the best thing in this release (:
that sounds like java-esque Optional
09:49
It basically adds an elvis operator. You can do let x = foo?.bar.baz() and if foo is null or undefined, it stops evaluating there and returns undefined, otherwise it goes the full length.
funnily enough, that's almost useless in typescript (assuming everything is typed)
@geisterfurz007 >>=
>.>
Flashbacks to fourth semester
@geisterfurz007 you forgot =
09:54
I hate both of you :D
thanks
10:09
It's year 2025 all browsers are now using Chromium project, except for Safari
what makes you think ff will change?
Isn't that great? Because you love the extension API so much, I mean :P
@towc Experience
Mozilla isn't a saintly organization, they have bills to pay
Chromium though needs to be taken out of Google's absolute control
and straight into microsoft's
Yes!2
So excited that I am pressing way too many buttons
10:16
after google and facebook inevitably tumble over because of how angry people are, I think mozilla will do very well
if people were gonna care
they'd have by now
people don't care / understand
I disagree
and def don't want to go through the pain
@towc source?
new people are born
new people != people as techie as you
10:18
people didn't seem to care about climate change, but new humans are coming to the rescue
new humans are coming to bandwagon
and completely ridculous chaotic efforts
rescue? please
I wouldn't be surprised if in the next couple decades some countries started banning facebook/google usage
coughs china coughs
For example: New humans seem to love the idea of smart cars and flashy new electric vehicles, completely oblivious of the fact that creating a new one costs much more than their shiny new tesla will save
@towc that won't happen for privacy rights
it'll happen for political power
I don't think carbon footprint is why people want teslas
10:20
precisely :P
but ask a tesla owner
its in the top 3 things!
I GOT AN E CAR!
it's a step in the right direction
or metal straw
no its not
even if the effect isn't better
a step in the right direction would be mass adoption
which is planned
and accounts for transition
you can't expect India/Africa to instanly switch to electric cars, the infrastructure just isn't built for that, heck even in dev. economies its not 😛 [point is, new humans don't solve the problem on their own]
10:36
well it's more expensive to have electric cars, but even if it weren't, I'm pretty sure the oil industry is actively resisting this trend
and they have the lobbyists and resources to do it
@Neil Oil industry just got screwed by US lol
in what way?
US increased oil production
thus others have to tone down otherwise they'll end up breaking the price
@Neil I'd say that's pretty pushy lol
well that's one way to fight overseas oil industry
though it's not a permanent solution
thats a fun way to fight overseas oil
the overseas oil economies are literally dependent on oil
> At around $60 a barrel, oil prices are currently too low for most OPEC countries to cover their national spending.
@towc are others back?
or have they left forever?
10:52
which others?
lemon, tar
gone
lemon took cap with him
in that case
they've had a monopoly for so long
it's refreshing to see them suddenly have to deal with competition
@ShrekOverflow firefox has a new engine for two years. It would be retarded (eh let's ignore MS for a moment) to switch to chromium
@ShrekOverflow ya know, they are really into shale oil but that is a risky behavior where the effects on long term are not known
I recall some reports that there are "problems" with this technology, increasing little earthquakes, ground subsidences ect
11:32
Hi guys, really need help for encoding on restful api on node.js can someone help me ?
@PizhevRacing 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.
@PizhevRacing feel free to ask your question.
what's the problem with encoding?
@towc yeah, no, that’s pretty much never the case, regardless of how many times people suggest using reduce for shit
But either way I don’t have access to reduce or spread where the logic is going
Huh, I do have access to reduce. But still none of the shortcuts that make it not terrible
"don't have access to reduce" ?
@KevinB that might require some clarification
It’s not javascript
So not all of the features you’d expect are there or work the same
Was more looking for logic than actual code
11:55
I am confused/
which language platform then?
12:17
Does anyone know a math equation for JS that can basically get 1:16?
like if your value is 16... it will return 1 on another value, or 32, it will return 2
and anything in between will get its respective 1.??
I just cant seem to figure this one out..
I need it to convert font-size in pixels to another value for another element
https://codepen.io/SkylerSpark/pen/NWWLogm?editors=1111

Basically, for every em, there should be 1 pixel...
and for every pixel, there should be.. well... I dont know
Appreciate any further help.
x / 16?
If x is 16 => 16 / 16 = 1?
@geisterfurz007 not enough jquery
but yeah, I'm confused by the confusion too
No but seriously though: Am I missing something or is it just x / 16?
12:24
I'd think so
@TaylorS
I am confusion!
12:38
need more data samples
16 -> 1, 17 -> 1, 32 -> 2, 35 -> 2
just divide and floor the result?
> and anything in between will get its respective 1.??
seems just a question mark no?
sometimes I question with multiple marks
do you copy???
I take that as "1.xx, where x is a digit", like "one dot whatever"
Yeah that ^
Well
basically, it needs to be in terms of 1:16
1pixel per 16pixels
meaning 1px per 1em
12:52
take your ems, divide by 16
but if someone uses the value px instead of em.. well I dont know how to do that
that's literally x/16
what about PT and other measurements
ive honestly been using EM and PX my entire life of JS and CSS
if you want to account for every unit, you're going to be here a long time
rip...
12:53
smells like an X/16/Y problem
You can maintain a div that you can change the styling of. Then measuer the div's height in pixel. That way you can get all the things in pixels.
I think at least.
@BartekBanachewicz oh god.
Hey any sass guy there ?
An idea how to do that : (aka the first one is overrided)
        &:hover
            background: $delete
        &:hover &
            &--svg
                fill: transparent
ffs hate sass
@Baldráni I'm known to be rather sassy
Ill stick with vanilla and Stylus
12:54
alright bartek, put down the bottle
@BartekBanachewicz 👌
Nice one still not verry sassy to me haha
wow... the sass jokes are so sassy... makes people seem like... s.. asses...
pun intended... awkward silence..
@TaylorS 1/16
Never mind it workds as it is ..
oh wait... I forgot computed style always returns all values as px
so yeah 1/16 should jsut work perfectly
ill try it

« first day (3315 days earlier)      last day (1856 days later) »