« first day (2668 days earlier)      last day (2167 days later) » 

BMO
12:00 AM
Yes but why..
 
that's not static typing
if it were, then I couldn't logically do var x = 3; x = "foo"
 
@BMO Well... there's const which is a constant...
 
BMO
@ConorO'Brien True
 
besides, var used to be the only (proper) way to declare a variable
 
BMO
I thought it was more close to Java
 
12:01 AM
@BMO So the point of all this is to add some infrastructure.
 
"use strict";
a = 3
> ReferenceError: assignment to undeclared variable a
 
@BMO Its... a relative.
 
also, var statements are hoisted
(which is an undeniably foreign concept but justifiable IMO)
 
@ConorO'Brien you sure they're hoisted?
 
no
that's a lie
I just lied and am full of remorse
oh well, function statements are the ones that are hoisted
 
12:03 AM
@ConorO'Brien so...
 
@BMO yeah == isn't equal
 
@ConorO'Brien so you're saying if I need a hoisted var the best thing to do is function thing(){return 3;};
 
var j = function(){} is a function statement
 
@FreezePhoenix not those
 
function j(){} is a function declaration..
 
12:04 AM
@FreezePhoenix function j() {} are hoisted
 
@Οurous I'm saying if you need a hoisted var you're cray up the wazoo. but yeah :P
 
@FreezePhoenix That's a var statement assigning a function.
 
BMO
@ConorO'Brien Just looked up hoisting (didn't know what it is) in javascript and that's a truly weird concept ^^
 
@FreezePhoenix but function declaration === function statement...
 
Yes, without hoisting, JS would be harder to use. But it's hardly a good solution to the problem it solves.
 
12:05 AM
@ASCII-only Wrong...
 
@BMO it makes sense at least. I've always thought it was used to make sure different included JS files would work
 
@Pavel it's not a bad one either, and it works
@FreezePhoenix neither of those are "statements"
 
Holy crap when did they change the MDN look?
 
well technically both are statements :P
 
12:05 AM
@ConorO'Brien That is what I said, yes.
 
@ConorO'Brien Yeh... just figured that out
 
@Οurous a couple months ago
 
@Οurous When did they stop changing it?
 
@FreezePhoenix Fair.
 
BMO
@ConorO'Brien You could also use sth. like extern or similar, but it doesn't really matter.. I guess doing it this way won't hurt
I'm still not sure if I'll learn javascript, I don't intend to do much web-development and if I did I'd probably look at TypeScript
Has anyone ever used that?
 
12:23 AM
@BMO extern?
@BMO 0/10 typescript
well, it's not that bad
I think it has better import syntax (which will eventually make its way into normal JS)
 
BMO
Hm, I won't look at TypeScript then hehe
extern for variables from other files
(as in C or the like)
But why is it so horrible?
 
So don't put your USB drive in the washing machine, then the dryer, then iron it. Makes the files hard to read.
5
 
@BMO Typescript FTW
 
you should use Attache
 
I'm sorry, I can't identify a language by that name.
 
12:36 AM
@FreezePhoenix tio.run/#attache
 
@ConorO'Brien you wrote this language?
 
indeed I did
 
Now... is it a true language or is it based off of another language / written in another language?
 
it's a true language written in ruby
 
12:39 AM
":=" shouldn't be like that...
 
because you end up doing "shift + ; + unshift + ="
 
what?
oh
 
You end up pressing and releasing shift a lot of times. Disastrous with sticky keys.
 
sorry, I forgot about the plight of pressing an extra key or two
if you don't like it use .=
 
12:41 AM
@ConorO'Brien It's not an extra key or two... In my case it's an extra 2 keys or 6
 
also you're going to be pressing shift a lot, all functions are CamelCase
 
@ConorO'Brien You mean PascalCase not camelCase
 
ok
do you have a problem with languages with braces? { and } both need shift :P
and parens and most symbols
 
Eh... I should probably slack off. After all, you did make a language.
 
well this is more interesting than anything else
 
12:44 AM
@FreezePhoenix The ratio of people who make languages to people who don't is really skewed on PPCG
 
@Οurous I'm not surprised.
Well... I'm off to go write my snake game in yet another language :P
 
github.com/FreezePhoenix/FireSnake For anyone who cares to take a look.
freezephoenix.github.io/FireSnake for the online game url
frowns TypeScript doesn't support HTML...
Or rather, the other way around.
 
@FreezePhoenix compilation to JS is a thing...
otherwise what would be the point of TypeScript...
 
@ASCII-only Yeh but that's not TypeScript... Oh... I get it now.
Well... I don't have access to a terminal right now :P Shoves it onto the backburner
@ConorO'Brien In those cases, I only have to hit it 4 times.
 
1:02 AM
I'm honestly confused
sticky keys makes shift like caps lock right?
 
Yes...
 
so you only need to hit it twice per shifted letter/symbol
 
@ConorO'Brien and "{}".length === 2
 
no you don't say :P
 
@ConorO'Brien you should ask for your coding language to be displayed here
 
1:04 AM
> coding language
 
@FreezePhoenix too heavy in dev rn, besides, tio is sufficient
 
@FreezePhoenix what language
 
@ASCII-only "which one"?!?!?!?!?
@ConorO'Brien Ah...
 
if you mean attache then IMO that's only if it becomes intended to be practical :P
 
A dear... he's written a lot.
 
1:06 AM
@ASCII-only it is practical ಠ_ಠ
 
cha codes
 
@FreezePhoenix thankfully I have near photographic memory and recognize that as yup's help page
 
css is a tad broken
 
which browser do you use
 
Chrome.
 
1:10 AM
I'm not sure how it works in firefox, edge, and internet explorer and not chrome
 
And you should use links, not buttons.
 
those are links
 
that's not a link
 
Sorry should have been more clear.
 
1:12 AM
that is in fact a button
give it a click
 
@ConorO'Brien but the point is why alert an email that can't be copied when you could just redirect them to mailto:conobrien4god@gmail.com
 
@FreezePhoenix it can be copied, just double click it? or does chrome not have that for some reason
 
Alerts can't be copied (in chrome)... But still. You're making the user go through a lot more work then they have to.
 
besides, mailto: assumes that I've configured it
 
@ConorO'Brien Explain.
 
1:14 AM
that protocol, for example, opens up outlook on most windows machines iirc
I do not use outlook
 
@ConorO'Brien Your inbox can recieve emails from every email company.
 
@ConorO'Brien yeah but it's interpreted. with Ruby. meaning super slow
 
@FreezePhoenix I'm not sure you understand. mailto:email literally opens up the outlook application on my computer. if I was user wanting to send an email with something that was not outlook, I'd have to copy the email from the outlook document/url instead
@FreezePhoenix it's not good to assume the user wants to actually send me an email. what if they wanted to tell a friend what my email was? what if they wanted to put it into their contacts list? all of these operations require copying without sending an email
 
@ConorO'Brien why would you not want to use outlook... that's just... hmm...
 
@FreezePhoenix .... because I have a gmail
 
*by default
@ConorO'Brien Gmail actually notifies you to switch IIRC
 
@ASCII-only sorry?
 
Yolang... My eyes hurt.
 
when you open up Gmail and it's not your default mailto handler, IIRC it asks you whether you want to switch. I may just be remembering wrong though
 
1:20 AM
@ASCII-only idts :P I just tested mailto to make sure I was right, it opens up outlook
@FreezePhoenix you know that's a fork right? not my repo?
 
@ASCII-only it's not that slow. not all languages have to be C
 
@ConorO'Brien Doesn't matter...
 
@ConorO'Brien yeah but the thing is, this is double interpreted
@FreezePhoenix ... why the double ping
 
good thing I'm not wearing headphones lol
@ASCII-only the horror
 
1:22 AM
I first pinged him and the edited it with a reply...
So it was really a triple ping
@ASCII-only Oh thats even worse
 
@FreezePhoenix :| how
 
@FreezePhoenix that is terrible. it can't even print uppercase letters
@FreezePhoenix tio.run/#trumpscript
 
 
1 hour later…
2:53 AM
what's another name for "map"? (the function, as in map(function, list))?
 
@HyperNeutrino there's another name?
 
idk ¯\_(ツ)_/¯ just wondering if there is one
 
In many programming languages, map is the name of a higher-order function that applies a given function to each element of a list, returning a list of results in the same order. It is often called apply-to-all when considered in functional form. The concept of a map is not limited to lists: it works for sequential containers, tree-like containers, or even abstract containers such as futures and promises. == Example: mapping a list == Suppose we have a list of integers [1, 2, 3, 4, 5] and would like to calculate the square of each integer. To do this, we first define a function to square a single...
In C++ it's transform
 
oh cool, thanks
 
in C# it's Select, in Groovy/Ruby/Smalltalk it's collect, in Pari/GP it's apply, in S-R it's lapply
All of which are ambiguous IMO
 
3:00 AM
Hm. Yeah those are all kind of weird.
Map is definitely the best name; asking for a friend who's making a Pythonesque->C++ transpiled language and wants a different name because std::map is already defined
 
@HyperNeutrino why would it not transpile to map though
also namespaces are a thing
 
@HyperNeutrino Define it so it doesn't conflict with std::map? Or call it something like applyForEach
 
I am probably going to suggest to him to make std::map called dict or something
or like capitalize typenames
that was something he suggested
though I don't like Map and map because that gets confusing
 
@HyperNeutrino Mapping<T>, map(func, obj)
 
hm
maybe
 
3:07 AM
Hey a particle.
 
@HyperNeutrino hang on. why not just transpile to std::transform
 
no but like what to name it as in the frontend side
@FreezePhoenix ?
 
@HyperNeutrino why not map
@FreezePhoenix what
 
Nuetrino.
Type of partiicle.
 
oh
@ASCII-only yes but then what about the Python dict, what would that be called
 
3:11 AM
Dict
 
IMO if you're going to capitalize type names, don't also shorten them. So Dictionary or dict but not Dict.
 
@Οurous +1
 
@HyperNeutrino dict?
 
idk I gave him my suggestions so idk what he'll choose
thanks everyone
 
3:36 AM
2
Q: Grouping Array Data

MegoGiven an integer matrix a and a nonnegative integer i, output a mapping b that maps the distinct values in the ith column of a to rows of a who have that value in the ith column. You may assume that i is in the half-open range [0, num_cols(a)) (or [1, num_cols(a)] if you choose to use 1-based in...

 
 
2 hours later…
5:59 AM
@FreezePhoenix 1. nuetrino? 2. partiicle? 3. you just realized? :P
 
?!?!?
Did I spell those all wrong?
 
6:21 AM
Bye.
 
6:31 AM
@FreezePhoenix Yes. Neutrino, Particle
 
6:54 AM
Cocoapods is a brilliant package manger, it has instant download times because it pre-downloads every single package when you install it.
 
@Downgoat O_o
 
 
1 hour later…
8:00 AM
Thanks. Finally some good results this year.
Btw, also thanks for the scraped scores on you webpage.
 
8:18 AM
@ConorO'Brien SOGL, 8 bytes
 
8:58 AM
@dzaima :| you can see each char being printed one by one. that must mean SOGL is really slow
 
@ASCII-only or you're just looking too fast
 
\o/ 24 bytes
 
@user202729 what is this
 
Hexagony HW.
What's wrong with the site now ...
That one took 1 minute(s) 22 seconds.
 
@ASCII-only I've intentionally put a sleep after each commands execution to make SOGL not hang the page/browser
 
9:05 AM
@dzaima Just in case someone unintentionally make an infinite loop.
Come on, offline for maintenance...
 
@ASCII-only oh and also so you can see the frames of an animation
 
@dzaima example pls? wouldn't it be too fast?
clearly Charcoal's animation builtins are better
 
@ASCII-only well you'd usually want a sleep in there too, but the system's made so it can do without
 
@dzaima yeah but wouldn't animations be too fast to see by default >_>
 
9:11 AM
I completely forgot that $ exists while writing my brute force program. Not sure how useful it would be.
 
9:35 AM
epic fail
 
Still running ........ Doesn't seem that it will terminate any time soon.
 
10:00 AM
23 bytes, done.
 
10:29 AM
hi all.. anyone here happen to use a chromebook?
 
@Anush HyperNeutrino . (not active right now, it'a about 5 or 6am)
 
also.. only two more reopen notes needed! codegolf.stackexchange.com/questions/164876/…
@user202729 sorry who isn't active?
 
I saw him just last night... ^^^
 
@Anush (but what's your problem?)
 
@Anush Yes.
 
10:35 AM
oh cool.. well I have two problems.. one is silly but it annoys me that the screen doesn't seem to fit the image... e.g. when I use google docs through the browser some words from the browser menus are just cut off as they fall off the edge of the screen
is there some way to fit the resolution so everything actually fits on the screen?
 
Can you just "zoom out"?
 
ctrl + shift + minus
 
I will try that thanks...
the second is Family Link which it's possible you don't use
 
Nope. I use amazonn Kindle Free Time.
 
I think the docs aren't correct. For example support.google.com/families/answer/… claims there is a "Daily Limit" card
but i can't find it anywhere
@FreezePhoenix oh I don't know about that.. does that let you control a chromebook?
 
10:39 AM
@Anush That depends on how it is set up - You may also have never run into it.
@Anush Nah it's for kindles
 
@FreezePhoenix ah ok. I don't have a kindle
@FreezePhoenix I have set up our dell chromebook 11 with account that are controlled by family link
I have the android family link app but there just is no Daily Limit card that I can see
I should award a bounty to anyone who can find it :)
it's possible no one else on the planet uses family link as I can't find much help online
 
That may be true - in a less exaggerated form - because family link just recently came out.
 
10:54 AM
ah I got an official answer... it doesn't exist
 
@HatWizard In this picture which direction is north?
 
BMO
11:25 AM
Interesting how nobody answered with a golfing-lang in this question :)
I guess golfing data-structures is not very suitable to them..
 
@Jakube sure, glad that you like it :) I just added the user page last night
 
11:50 AM
@BMO Not that, but writing golfing language solution to hard challenges challenges that involves using more than 1 variable at once is very hard.
@BMO Is the tree full?
 
BMO
@user202729 It could probably done with string replacements.
@user202729 What do you mean by full?
 
> A full binary tree (sometimes proper binary tree or 2-tree) is a tree in which every node other than the leaves has two children.
 
BMO
Ah, no not necessarily
(for example the second example)
 
Jelly has no ... wait a minute, that involves balanced group... probably someone can write a Retina solution.
 
BMO
12:25 PM
@user202729 I don't know Retina, but I got something that works with Vim :)
 
@user202729 Unless of course, you use GolfScript :p
 
BMO
Is there a neat character to signify <Esc>?
Like for return..
 
Theres one in Unicode that literally says "Esc" on a diagonal, IIRC
 
ngn
@BMO ␛
 
^^
 
12:29 PM
OwO
 
BMO
Nice :)
 
ngn
@BMO there are programs called "charmap" on both windows and linux where you can search for unicode characters
(on linux it might be called "gucharmap")
 
0
A: Sandbox for Proposed Challenges

MichailFor how long will my microwave be on? The time dial on my microwave looks like this: the knob turns clockwise, and numbers from 0 to 10 inclusive are spaced evenly (angle-wise) on the first half of the dial. After that, numbers 20, 30, 40, 50, 60 are spaced evenly on two thirds of the remaining ...

 
@ngn I think Windows's charmap.exe sucks :P
 
ngn
@EriktheOutgolfer it fits right in with the rest of the OS :)
7
 
BMO
12:36 PM
@ngn Yeah found and installed it :) Better than trying to google that stuff and constantly finding U+001B
 
 
1 hour later…
1:41 PM
0
A: Sandbox for Proposed Challenges

AngsGeneralized Cantor set segment lengths Problem Let's define a generalized Cantor set by iteratively deleting some rational length segments from the middle of an unbroken interval. Given the relative lengths of segments to delete or not, and the number of iterations to do, the problem is to wri...

 
2:11 PM
:( I just got a "too many requests" error on stackexchange, by leaning on the enter key on my keyboard
 
2:37 PM
0
Q: Regular expression

AnisaIs this regular expression valid for strings that don't contain a double letter? b(ab)*a + a(ba)*b . In my opinion it doesn't generate all the strings such as : a , b ,bab,aba. If it is not correct,can someone give me a valid solution please?

 
2:54 PM
1
Q: Self-enumerating pangrams

RobPangrams The quick brown fox jumped over the lazy dog. This is an example of a pangram - a sentence that contains every letter of the alphabet at least once. A self-enumerating pangram is a sentence that fulfils the criteria to be a pangram by producing an analysis of its own letter count....

 
@NewMainPosts I think I read this somewhere.
I think here. (no need to close, that one was a sandbox post)
 
3:13 PM
Re NMP: does anyone know what is "the Queen's English"?
 
@user202729 received pronunciation?
 
(so? How am I supposed to implement it as an algorithm? I don't understand...)
 
3:25 PM
@NewMainPosts CMC: Is there any set of letters for which this challenge is impossible? For example, if you say ... One n... That's false cause there are two, but if you say ... Two n's... That's also false cause now there is one
 
0
A: Sandbox for Proposed Challenges

soktinpkConstruct any Sporadic Simple Group There are 26 sporadic simple groups. Your task is to write a program which defines an operation isomorphic any of these groups. Input: Two symbols that represent elements of the group. You can choose how these symbols will be represented (characters, numbers ...

 
3:40 PM
If a Python challenge told you "Don't use built-in functions", how would you interpret that?
 
@DJMcMayhem but if there’s one, then two n’s is correct
 
@wizzwizz4 I think that generally means no functions that do exactly what the challenge asks for. If they mean no built-ins at all, VTC --> unclear
 
@DJMcMayhem Ah, ok.
 
@FrownyFrog But the question still stands
 
3 o’s
 
3:45 PM
@FrownyFrog Erm... "Three e's" could work.
 
you can spell out non-existent letters, ”one Ц”, adding to the count of o's, n's and e's
 
@FrownyFrog Only if you include one of those in your program.
 
why?
 
Never mind; I misread the question.
 
is there a source restriction I missed?
 
3:51 PM
@wizzwizz4 That must be a very old question.
 
@user202729 It's not on this site.
I should've made that clear.
 
... At least it's only for Python. Does operators count?
Obviously control structures are not functions.
 
@user202729 I assumed not.
Here's my solution:
# > Do not use built in functions.
# Ok.
s=lambda a,b,c,d:s.__new__.__self__(s.__code__.__new__.__self__(1,2,3*a,67,'d\x01\x00d\x00\x00l\x00\x00}\x01\x00|\x01\x00j\x01\x00|\x00\x00'+b,(None,-1)+c,('base64','b64'+'ende'[2*a-2:a*2]+'code')+d,("",""),"","",1,'\x00\x01\x0c\x01'),s.func_globals)
to_base_64=s(1,'j\x02\x00d\x02\x00\x83\x01\x00\x83\x01\x00j\x03\x00d\x03\x00\x83\x01\x00S',('ASCII','='),('encode','strip'))
from_base_64=s(2,'d\x02\x00d\x03\x00t\x02\x00|\x00\x00\x83\x01\x00d\x03\x00\x16\x18\x14\x17\x83\x01\x00j\x03\x00d\x04\x00\x83\x01\x00S',('=',4,'ASCII'),('len','decode'))
It's got room for improvement.
 
Does it have a judger or something?
 
@user202729 Yes, but it's not a good one.
I started off with the correct solution.
But that was too boring.
So I made this.
 
3:53 PM
Are you supposed to abuse the judger and make the solution as short as possible or make it interesting?
 
@user202729 There are two categories: Good (production-worthy) and Clever (PPCG-worthy).
I deliberately misinterpreted the question, so my solution uses nothing in the builtins dictionary.
 
What are we supposed to optimize for?
 
@user202729 Base 64 decoder.
https://www.codewars.com/kata/reviews/56a1b5deeb07a6fb39000010/groups/5b019635e‌​4b7ff783e000113 codewars.com/kata/5270f22f862516c686000161
@user202729 Link to the right, approximately above ^ this caret.
 
No objective winning criteria? :(
 
I have no way of telling whether my laptop is charging except by checking whether the heat sink vibrates.
 
3:58 PM
@wizzwizz4 :/ Which OS?
 
@user202729 No, but you can make your own challenges and they auto-mark.
@user202729 I honestly have no idea any more.
Originally Raspbian but I threw in some Debian stable and there are a few Debian sid programs on it too.
The battery indicator just refuses to add to the taskbar.
And the screen sometimes desynchronises / completely blacks out every so often, and I can't power-cycle the monitor without cutting power to the Pi...
Good times.
Almost like using an Apple Mac.
But it works, so there's that. :-)
CMP: Is it mean to set the TNBers on a programmer who can't blacklist eval properly?
 
Q: What do you think this code do? Is there a way to make it more readable?
for(char const* p="/\\_|<>";*p;++p){ /* do something with (*p) */ }
 
@user202729 C?
 
That was C++, but it doesn't make much difference.
 
It looks pretty readable to me, considering that it's C code.
That's not C++ code, despite being compilable in it. :-D
*p is /, then \, then _, then |, then <, then >.
 
4:07 PM
Assume it's C++, how should I make it more readable?
@wizzwizz4 Use ``\`` for \.
 
@user202729 TIL. Thanks! :-)
 
If it ends with backslash use two backticks. If it starts with backtick use backslash to escape.
 
I'm not very familiar with C++, but perhaps:
const std::string descriptive_name("/\\_|<>");
for (const char& p : descriptive_name) {
    /* Do something with p */
}
@user202729 Does this help? Note that you need to replace *p with p.
 
That... doesn't seem very performance friendly.
 
The compiler should be able to optimise that away.
Let's do a benchmark. What's the website called.
Goodb... something.
Godbolt!
Let's use p in a case statement, since that's what it's probably used for in the production code. I retract my statement.
That is a very bad idea.
 
4:20 PM
I do need to loop over them. Not just switch case.
 
@user202729 Switch case inside a loop is an antipattern.
It's just... wrong in almost all cases.
 
4:33 PM
@user202729 You were right. :-)
Irrevocably messed up the formatting of the example whilst trying to shrink it, sorry. :-(
 
5:30 PM
2
Q: Function clipboard: paste

Luis MendoThis challenge is related to some of the MATL language's features, as part of the May 2018 Language of the Month event. Associated challenge: Function clipboard: copy. Introduction MATL's function clipboard stores ("copies") the inputs to the four most recent calls to normal, input-taking fun...

 
6:20 PM
2
Q: Mathematical parser

Muhammad SalmanChallenge : Given a string representing a mathematical expression return the result Input : A string representing a mathematical expression : '1 + 2 - 3 * (2/3 * 1)'. Output : The result after performing all operations. Operators : Possible operators + ---> plus - ---> minus ...

 
7:01 PM
CMC: Output a random string (printable ASCII) of given length
 
@FrownyFrog I would not consider 007F (DEL) printable ASCII
 
oh I got 007F too
 
7:45 PM
@wastl Jelly, 5 bytes: ØṖX¤€
 
8:27 PM
@wastl APL, 15 bytes
 
@dzaima 13 bytes: ⎕UCS 31+?⎕⍴95
 
@EriktheOutgolfer right, I always forget the most straight forward program type
 
@wastl Charcoal, 4 bytes: ⭆N‽γ
 
8:48 PM
@wastl Jelly, 4 bytes ØṖṁẊ
 
oooh
 
That only permutes the first n ascii characters, unfortunately
Btw hi caird, long time no see!
 
@Mr.Xcoder Hi!
@Mr.Xcoder So? It doesn't say it needs to be uniform
 
Indeed. I just pointed that out for those who don’t know Jelly. Wrong use of Unfortunately, I guess.
 
I was quite disappointed that ØṖẊḣ didn't work when n > 95 :/
@ASCII-only Just a heads up: typo in charcoal.py
 
8:58 PM
Pyth, 8 bytes. If you really want a string, prepend s.
^_^ no ASCII built-in
 
9:28 PM
Who extended Euclid's algorithm?
 
 
2 hours later…
11:24 PM
2
Q: Modified Boggle Checker, with Modified Boggle-able Code

BubblerBackground Boggle is a board game where the players have to find English words on a 4-by-4 board of random alphabets. Words can be constructed by selecting sequentially adjacent cells on the board. ("adjacent" means horizontally, vertically or diagonally adjacent.) Also, same cell can't be used ...

 
11:58 PM
.................... what's wrong with built ins .......
(seriously. Does anyone have any idea how the calculator challenge can be made non-trivial, but not by disallowing builtin?)
 

« first day (2668 days earlier)      last day (2167 days later) »