« first day (2291 days earlier)      last day (2847 days later) » 

20:07
s/an upvote/2 upvotes
user165474
Sure. :P
user165474
s/an/2
s/e /es
user165474
(Trailing space on the last line)
@Downgoat what about const? I didn't realize let != var
@Riker with let the var is block scoped
20:11
yea but should I use const when applicable?
i.e. when I'm not goign to change it
yes
do note const does not prevent mutation
wat, there's a clause in the Skype TOS that forbids publishing reputation-damaging opinions about it
@HyperNeutrino s/e/es, with no trailing space. Without /g, it will only replace the first e.
user165474
>_> you win
and you're missing your trailing slashes both of you :P
user165474
20:12
lol
user165474
Someone was complaining about that to me a while back. :P
user165474
Or, s\e\es just to tick off tchrist
@ArtOfCode Do you need those?
Not in Vim, at least.
@Phoenix Vim ain't the original syntax
original syntax is from sed, where you do need them
If a challenge has only 1 input, I'm allowed to submit a function with 2 parameters but just uses the default value for one, right?
20:15
No, you can't take an extra input even if that input is irrelevant.
@Phoenix sed says this about it: sed: -e expression #1, char 11: unterminated `s' command
e.g. you have to use ()-> and not i-> for lambdas.
@Downgoat mutation?
@Riker const does nothing if you try to modify the variable, it just throws a warning.
Are you sure? I actually remember doing exactly what you said before
20:16
@Phoenix oh, okay
such as x += 1?
That was a while ago though
but it will error on x = 5?
No. It will allow both operations.
It will throw a warning, which doesn't affect execution.
@Riker yes
@Phoenix actually it errors on both
> const x = 5;
undefined
> x += 1
TypeError: Assignment to constant variable.
> x = 5
TypeError: Assignment to constant variable.
20:17
Might be implementation specific.
user165474
Darn, I can't figure out how to do this in Jelly.
I trimmed out the traceback of the 2 errors but yea
@Mego Oh that's hilarious analogy!
@HyperNeutrino specifically the looping, right? I don't know how to loop either
the other 2 should be easy though
@Riker +
20:18
reddit is blocked atm, screenshot?
user165474
@Riker No, more so the pausing part.
@Phoenix should be unless you're using an non compliant implementation
and/or copy paste the text
@HyperNeutrino ah
@Downgoat I remember it working hat way in Edge
Which is... not surprising in the slightest.
There's your problem :P
user165474
20:19
¯\_(ツ)_/¯ Oh well.
@Phoenix #justedgeproblems
user165474
I'll just wait for Dennis and learn from him. :P
@Downgoat so const would error in something like this, right?
for (var i = 0; i < dates.length; i++) {
    let item = dates[i];
    let year = item[0];
    let month = item[1];
    let day = item[2];
    if (currentDate < new Date(year, month, day)) return i;
}
with s/let/const/g
Should be OK
won't year,month,day get redefined every loop iteration?
20:21
@Riker sorry, would be way to long
Yes but const is also block scoped
@flawr :/
No, they go out of scope and are destroyed every loop iteration
can you post the imgur link then?
@Phoenix oh, cool
user165474
I remember once somebody said I was missing trailing slashes on my regex, so I used s/$/\//. :P
20:22
In Java, you can only declare constants in the scope of a class, so this is a nonissue.
@Riker it also includes a bunch of links. it is a polandball about switzerland, and the comment section is worth reading=)
ah ok
I'll prolly try later then
@Phoenix kek
And by nonissue I mean "Why define a behaviour when we can just make it illegal instead"
@Downgoat lolwut
so tl;dr: almost always use let instead of var, and use const when applicable (in place of var)
20:23
Aren't let and var the same thing?
var is globals, let is block-scoped
When defining globals for browser always use var
iirc
there is reason var does what it does
@Riker var is scoped to function
user165474
20:24
tl;dr: Don't use JS. :D ;P
@Downgoat ah
@HyperNeutrino yea but brython is slow af
@HyperNeutrino no it make perfect sense for browser
and it's for a website
user165474
¯\_(ツ)_/¯ True. But PHP exists as well (though I think it's even more confusing).
Is it directly browser JS or server-side node.js?
20:25
#1
@HyperNeutrino We all know that the best option is Rails.
@Riker pffft #reactmasterrace
^^
0
A: Sandbox for Proposed Challenges

MD XFUndefined Behavior question I'd like to ask a question like this: Create a program that should throw an error on compilation but doesn't, then results in undefined behavior when run. But I don't know how to title it, if this phrasing is OK or if it will be on-topic. And what tags should I...

@Downgoat googles
oh god why
20:26
^
@Downgoat react looks like javascript with more java
is that right?
Considering Facebook is multi billion dollar company I'm not sure why they can't shell out $8 for a domain
@Riker its basically JS but with HTML inside of it
ah
I did'nt realize extends was JS
Why would you want server-side html?
or maybe it's not idk
20:27
@Phoenix how else do you serve custom generated pages?
good point
That's not what I meant.
Most of the time you don't want to load empty page and do AJAX req to get data
That is bad for many reason
Why do you need a library to directly integrate the html into your code, which is what you described React to be.
You could use pug but less powerful
@Phoenix its a more or less an approximation
20:29
@Christopher fwiw later you can try !<imageurl> if it doesn't immediately onebox, see here
sometimes things like ?<x> on the end of the URL bork auto oneboxing
*googles*
*learns nothing but day is made better*
I mean better would of been it integrates HTML framework and structure with JS OO but eh
so why react instead of plain JS?
I'm not really doing that much, just a bit of DOM manipulation
and it's all clientside atm because I'm using github pages
20:30
@Riker I reccomend google JS DOM API
@Phoenix dat face tho
@Downgoat ??
though react is really only used with dynamic apps with significant server side component
@Riker sorry point is JS DOM manipulation JS hard >_>
ah
Personally I prefer the latter-day paradies, which replaced O'Reilly with O'Rly
I am fine with using no react but I also am fine with eating tin can
20:31
*parodies?
@Downgoat I have like 3 lines of relevant DOM manipulation code
Ah ok yeah no react then
@Riker That's not an actual book, but people make fun of O'Reilly book covers all the time because of the stupid animals
not even using jquery, the only thing I'm doing is document.GetElementsByClassName("container")[0].innerhtml = "text"
inb4 "use jquery"
@Phoenix ah. I was pointing out the typo though (para vs paro)
You mean tiepoes?
20:34
@Mithrandir no I mean typeozies
user165474
@Phoenix Wow. lol
@Downgoat you use digital ocean, right? How much is the vihan.org server?
in terms of cost and memory
@Riker $10
@Riker 5$/month is TIO
20:37
OVH might be better deal in terms of price
oh, really?
Which means with the referal link on TIO, you can get 2 months for free.
oh, hm
@Riker you can get cheaper version for $5 but if you're running complex app it'll probably run out f memory quickly
@Phoenix AFAIK TIO uses multiple droplet
Well, yeah. But each individual arena + frontend is one 5 dollar droplet.
Assuming Riker isn't going to be running arbitrary code for people, he only needs something as performance-intensive as the TIO frontend.
20:39
@Downgoat it's a simple website
Which is the cheapest 5$ one.
so yea, that should be ok
@Phoenix it's arguably less intensive than that
thanks for the advice
@Riker ok, I reccomend nginx and no Wordpress in that case
I've heard bad things about WP and I need a different format anyway
tio.run/nexus/#community see Referrals section
20:41
already bookmarked that
just checked, my website is only 320 mb anyway (full source, unminified) so I should be ok with the 512 mb storage droplet
Digital Ocean charges hourly up to a certain monthly cap, so you can create a droplet, test a thing, and destroy it again and pay less than a cent.
@Riker it come with 20gb of disk and 512mb of ram :P
oh, I thought it was 512 mb of disk
idk why but lol
o_O
20:49
All but one message on the starboard is for red team
*glares at trichoplax*
Only because teams are broken
I should clearly be blue.
I'm not sure what makes you think that.
Because 1) I like blue and 2) It should be based on site IDs, not chat IDs, so it lines up with the red/blue challenges on main.
But mostly 1
Being blue on main and red in chat is weird and wrong.
lol
But mostly 1
20:52
Boo red team
lol
But does this blue team have a flag???
prolly
here ya go
ಠ_ಠ
20:54
or an even better one, compete with stock photo watermark
aaaaaaah
Closed as "not easy" :/
@ATaco You're welcome
Technically not possible.
Talking in TnB doesn't mean you have a CodeGolf ID
True, but you could use the parent site ID (it's linked from the avatar popup). If they want it to line up with the site, then it's up to the user.
20:56
@Geobits -1 closing as "not easy" is not acceptable
cc @ATaco
please close instead as "was proposed by geobits" instead
And if you don't have a PPCG id at all, you wouldn't care if it didn't line up with the challenges.
user165474
How are Minecraft PPCG answers scored? I remember there was a relevant meta post but I can't find it.
@Riker BRB, trolling all your repos
31
Q: Programming in Minecraft (Redstone) - how to measure program size?

mbomb007Since programs may be created in vanilla (un-modded) Minecraft using redstone to create logic gates (and more), someone could create such a program for a challenge on this site. How would such an entry be scored? Some possible scoring methods: Blocks used (placed redstone counts as a block) R...

@Geobits not even hard :p
user165474
Thanks.
21:02
They're are two options: Put in effort for a minor feature no one really wants, or troll Geobits.
I want it >_>
I'm actually waiting to install until that happens
 
1 hour later…
22:15
0
Q: Translate an alien base system

Yam BOur regular base system for time is a little odd. 60 seconds per minute, 60 minutes per hour; then 24 hours per day, and 365 days per year. This is unorganized and somewhat hard to follow compared to our base system for numbers (10 units per ten, 10 tens per hundred, 10 hundreds per thousand...)...

23:12
random CMC (possibly site worthy): pick a string of characters: make a program by repeating this string downwards in various positions
example:
(and also using spaces)
A
BA
CB
DC   A
AD   B
B    C
C    D
D
is valid for using the string "ABCD"
I don't know what the task is but you guys can figure out something interesting
23:29

 PPCG Logic

A room for discussing Logic. `^` is the logical and and `->` i...
^ RO please move

« first day (2291 days earlier)      last day (2847 days later) »