« first day (2748 days earlier)      last day (2422 days later) » 

12:00
just remember, dont try to implement it all at once
do it in baby steps
one feature at a time
every item has an unique ID and I just send an update to the server, scanning the whole menu with all positions and updating it
what are you using for backend?
i am using laravel currently
12:01
/troll
it should become a online shop when its finished
@towc i strictly said 'implement'
@BenFortune noice
anyway, I got a job offer from this very shady big corporation who's very likely trying to trick me into being overworked and underpayed
12:02
@AltayAkkus I recently started building a .net core microservice based infrastructure for a series of my internal company operations
need suggestions on how to screw them over
@JayIsTooCommon I completely understand your thought here. To make this short, just don't take anything I say seriously. I will say the most ridiculous shit just to say it without even having an actual opinion about it. I am definitely not accurately representing myself in this chat and I don't want to. This is my idea of having fun and I feel it's not unwelcome in this chat room. I want people to laugh at these insults, not take them personally :P
@rlemon yaay, goofy
@towc don't be a douchebag
@towc if you're not interested, just don't accept
done
12:02
^
@towc hack their wep
then upload a monero mining program in their servers
I don't get how you can be so indifferent 😒 Maybe you just don't have time for this shit?
@KamilSolecki you disappoint me ... brother
@LorenzoCanavaggio no
(I am too young to be your father)
12:03
@AltayAkkus but I also use node for some lil. backends
@KarelG 'twas a joek!
@towc How do you know?
@towc what do you gain by screwing them over?
Or are you just being yourself
@BenFortune they're known for this
12:03
I am thinking about PHP
and they were asking me to do some work for free previously
some research to beat another company to market
with a possibility of being employed
haha that does sound dogey
@AltayAkkus generally, if you are making your first big project, I wouldn't hastily go and try to learn everything from base up. Use what you know, unless you specifically want to learn something
@towc I am shocked
I wasn't ok with that, so I said that I'm going to give them a lower than average rate and work from their offices so they can be sure I'm not slacking off
12:05
because if you choose a stack you are totally unfamilliar with for a big project
they said they'd call me on monday
you will most likely quit it before you even finish research
they never did, but they sent an email a few minutes ago
@towc you werent ok with research or work for free
and now I need to decide what step to take
12:05
cause I do research on my competition like a few times a day :D
@KamilSolecki working for free for pure business value
if you are not okay with the job don't take it. if you take the job with the express purpose of fucking them over you're a terrible person and I hope you get sued.
5
@KamilSolecki yeah, but you're your own employee
@OliverSalzburg you do not need a bag when going in a shower to be a douchebag. ;)
what lemon said
12:06
@rlemon I'm not going to take the job, but I can still make them lose time, or gather some info without signing anything
which is just a waste of your own time
and gains you what?
How to burn bridges without even starting 101
@rlemon money, for one
You know large companies usually have contacts, right?
that I can donate to something
12:07
if it is gaining you money then you took the job
what company is it? maybe I'll just point them here
@rlemon not if I don't sign anything
Never assume someone is malicious just because you think so. Often times, those are people who work hard to be where they are at, and honestly fucking them over makes you the biggest evil.
why would they pay you if you don't sign anything?
@KamilSolecki it's a big corporation. The slovak branch is known to be shady af
it's amazing that you sound shadier than the company who is known to be shady
12:08
well, I'm transparently shady to shady entities
Anonymous
@OliverSalzburg fair enough :)
Robert said everything that is to be said about this topic, really
@towc you are still making assumptions based on what you read online. Congratulations, you have just acted like every fucking problematic commonsperson ever.
let's move on
@KamilSolecki what makes you think I read it or that it was online?
12:10
towc, you came up with a new CV this morning. I know that you have been looking for work. Now you come up with that "offer from a shady company"
@KarelG the CV isn't new
@towc 'twas supposed to be a generalization
Please do not get insulted by my thought: it stinks. You are making it up
anyways
I have regained electricity
@towc new as in updated
12:11
they wrote me because of contacts I have, who knew I was passively looking for a job
that was last friday, I think
it looked shady, but I gave them the benefit of the doubt
I asked for the fairer deal of me going to their offices
and in the meantime I talked about it with various other programmers at events
and they agreed on the shadiness of the company, and shared some of their experiences with it
I'm happy to move on
I need to generate a unique number between 0 and 1000 from an arbitrary string. Algorithm recommendations?
@BenFortune how have I not heard about them before? This is fantastic!
@GNi33 They're great aren't they?
@Cereal what other specs do you have?
Very parkway drive-ish
12:13
is it like a hash?
@Cereal 1000..toString(16)
@BenFortune yeah
in the good way :D
I didn't like the new pd song
also, unique from 0 to 1000 is very collision-prone
I don't think I will listen to the new PWD record more than once
12:14
@rlemon other way around
didn't like any of the new songs
sounded like pirate rock haha
I have a unique string, I need to map it to an index between 0 and 1000
@Cereal o right.
@Cereal Knuth-Fisher-Yates is frequently used. But with that small scale you will get collisions
12:14
haha, yeah
@BenjaminGruenbaum Broken how?
Not overly concerned about collisions. I'm mapping a string to a color in an array
@Cereal do what Lorem pizza does :p
@Cereal quick hack is performing sha on the string, then moduloing the value by 1000
@Cereal well, setup an array 1->1000, apply that algorithm and pick first
s => s.split('').reduce((acc,c, i) => acc + c.charCodeAt(0) * i * acc, 0) % 1000
Did I have seen this snippet before?
@rlemon oh wait, I didnt know lorem pizza is yours :P
wait damnit
🤔
12:17
@KamilSolecki at the bottom of the page dude
@Cereal Hash and modulo 1000
damnit damnit
3 mins ago, by towc
@Cereal quick hack is performing sha on the string, then moduloing the value by 1000
.get('/:width/:height/:id', (req, res) => {
    let id = Number(req.params.id);
    if( isNaN(id) ) {
        id = (req.params.id + 'salt').split('').map(c=>c.charCodeAt(0)).join('');
    }
    streamImage(req, res, imagePool[parseInt(id, 10) % imagePool.length]);
})
@towc It's not a quick hack
That's how it's done.
@towc This is a quick hack though :D
@MadaraUchiha might be too much processing power for something that doesn't need to be one-way
12:19
@towc sha1 is very cheap.
actually, if that's the case, s => s.split('').reduce((acc, c) => acc + c.charCodeAt(0), 0) % 1000 might be one of the fastest ways
well, for a one-liner
sha1 might actually be faster than this :/
lol, edge is losing ground in 2018 to IE
@MadaraUchiha ur mom
@BenjaminGruenbaum no u
I love how people think encryption is slow
Like, literally everything we're saying gets encrypted and decrypted right now
12:25
hashing should be slow :/
No, you're mixing hashing with cryptohgraphic hashing
@towc No it shouldn't
SHA1 is not a cryptographic hash, it's used to verify content not secure it
hashing for checksum needs to be fast
Because I want to be able to checksum a 100GB file in reasonable time
Yeah, crpyo hashing shouldn't be done with SHA ever.
Yeah, we actually do checksum large files and can confirm.
12:26
wait, I just realized sha1 might not be for crypto
It's people who use sha1 for password hashing that get it wrong.
@towc shocking, how did you think that up?
I was too used to people telling me to sha things for crypto stuff ;/
@MadaraUchiha to be fair, SHA is mostly good enough, there is just zero incentive to use it since there are better options out there so why not use them.
It's like FTP, sure, I can use it in order to sync files - but I don't have an incentive since I got better shit I can use
@towc whenever in doubt, just open the OWASP cheat sheet.
@BenjaminGruenbaum Because they want a quick and cheap way to assign a number between 1 and 1000 to a string and do so consistently
12:27
I had no doubt, that's the issue
So you may as well use the cheapest option, in fact, I might even use md5 for it
sha256 is better, sure, but it's also more expensive, by how much, I don't know.
@MadaraUchiha I meant for crypto, not generally
MD5 is great but collisions can happen
@BenjaminGruenbaum Ah, the reason sha1 is used for crypto is obvious
Tons of shitty outdated tutorials
Same as mysql_query and document.write
Ah, SHA1 also has collisions, just very little and everyone was surprised
I ended up doing
hash(s) {
    let hash = 121, i = s.length;
    while(i)
        hash = (hash * 33) ^ s.charCodeAt(--i);
    return hash >>> 0;
}
and moduloing it by 1000
12:30
@BenjaminGruenbaum If sha1 is good enough for git, it's probably good enough for 100 - 1e-10 of checksum usecases.
@MadaraUchiha see the example 2 lines below.
@BenjaminGruenbaum heh, that's not bad
@MadaraUchiha " git doesn't actually just hash the data, it does prepend a type/length field to it. That usually tends to make collision attacks much harder, because you either have to make the resulting size the same too, or you have to be able to also edit the size field in the header."
@BenjaminGruenbaum Does not reproduce
Chromium 65
Right, update to 66 or try Canary
12:31
Don't tell me what to do
@BenjaminGruenbaum Yeah, but they managed to find half a collision with a big-ass supercomputer over a few weeks/months, I think we're pretty safe for the time being
@rlemon Do you use a dark theme for twitter? If so, which one?
I do not :(
boon
anyway I think I need to fork the one I have now and fix a bunch of bugs with it
12:34
I have a spring boot web page and i want to have a client side router
@objectiveME Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
I have looked at vue js,however,i wonder if vue js is somehow relying on the web page being served from a server
vue js router, it must be served from a server right?
@KendallFrey twitter has a native dark theme
Yeah it's ass-ugly
speak for your own ass
12:37
s/for/with/
I mean, sure
if that works for you
I really need to start processing my prints afterwards
that looks super slick
That reminds me that I haven't played dishonored 2 yet
same here
been gathering dust in my backlog :|
12:48
@BenFortune just giving the album a spin right now. Dammit, I just want to hug you now
which album?
Bleed From Within - Era
good afternoon
@MatthewSwart Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
oh a heavy metal band
not my fav genre
12:52
metal rulz KO
OH MY GOD
PayPal trolled me so fking hard
I got a notification yesterday
That I need to verify my account by sending ID
So I sent it
Well guess what
Try disabled my account
Because I wasn't 18 when I created it
EVEN THOUGH it had my real birthdate in it
And it took them 6 years to notice
12:54
@KarelG does light metal interest you more?
heh
grunge yeah
brilliant tune mate
at least @GNi33 got it :(
12:56
Saw Rammstien live in Dublin a while back ..... rating them best show ever
I did not saw that as an insult ;)
everyone has their taste. There is someone here that listens to disney music
Lithium is the lightest metal.
ooo
my chem knowledge is not that great
@KamilSolecki ohh neat, Jesus gives out free WiFi in poland.
I have read that this morning
a nice idea tho

« first day (2748 days earlier)      last day (2422 days later) »