« first day (2473 days earlier)      last day (2361 days later) » 
00:00 - 15:0015:00 - 00:00

12:06 AM
@Calvin'sHobbies Calvin's? Your name keeps changing back and forth (I like this one better if you ask). Why the change this time?
Oh
Nov 2 at 18:38, by Calvin's Hobbies
@cairdcoinheringaahing This used to be my old username here, and I've stopped using Helka Homba so much.
Maybe this time you'll stick longer with this name :-D
 
Hasn't changed that much. Like once per year.
 
I knew him as Calvin before I knew him as HH.
 
@Calvin'sHobbies No politics-related reasons this time :-)
 
No. Ugh
 
CMC: Make a Discord thingy that automatically forwards chat content back into TNB (except TNB bots are banned so cri ;-;)
 
12:15 AM
I'm finally going to give Funky the splat operator.
 
yaaaaay :D
 
You can already do t::apply(func), but I'd prefer to allow func(...t)
 
What do you plan on using for the syntax?
 
func(1, 2, ...t) mostly.
(And it's rather easy to add the syntax thanks to my tokenizer)
 
hm ok
I personally think it should either be *t or t... but ...t doesn't look awkward to me either
0/10 use * because golfier
 
12:20 AM
* would conflict with some things, and I prefer ...t because of the JS roots.
Funky is very much so not a golfing language.
 
ah ok
 
(Although it is fairly golfy in some areas, like variable names being allowed next to keywords)
 
wait what?
example?
 
!!!
I must say, I disapprove of that lol
 
12:23 AM
That's fair, it was accidental.
 
> accidental
?how?
oh I can see how that might happen
 
The tokenizer greedily matches keywords
 
oh ok
I could make that happen in Proton by switching two lines xD
anyway gtg o/
 
12:38 AM
I've got Splats working when calling functions, but still need to make them work for defining functions. Should be easy enough.
 
12:48 AM
@HyperNeutrino @cairdcoinheringaahing I said that I had got a solution but I don't want to post it because it's brute-force.
yesterday, by user202729
Currently I have a solution to the next OEIS sequence (A000112) (MD5 = 1816cbca5788befa7e8ae62b89f257c2) but I don't feel like posting it because it is brute-force and takes a lot of time calculating for 4. I've tested for values 0 - 4 and it gives correct result. There are still 3 days remaining, if I can't understand the efficient algorithm listed on the OEIS page and no-one post any answer I will post this anyway.
@orlp Sorry for not replying, but the expression ($\lfloor \frac x {lo} \rfloor = \lfloor \frac x {hi} \rfloor $ is effectively equivalent to either the ceiling equal, or $x \over {hi}$ is a whole integer, in the latter case all the values $a$ such that $lo \leq a < hi$ has the same value of $\lceil \frac x a \rceil$ as that of $lo$, so they are all invalid.
Seems that you figured it out anyway.
 
@HusnainRaza ↑ too.
 
(The semicolon is also optional)
 
@HyperNeutrino How can you even inject things into Discord? Can you?
 
12:56 AM
@user202729 inject? no, but a bot API exists
it's not great but it exists
uses webhooks
@DestructibleLemon ... what cmc is this?
 
ah ok
 
does funky have a repl?
 
Yes.
Oct 27 at 22:46, by ATaco
Alright! I made a Repl for Funky!
 
1:10 AM
ok, then Funky Repl: 5 bytes: "yes"
 
I suppose that does work.
 
hah. not even a "yes solution
 
0
A: Sandbox for Proposed Challenges

Ian H.The Guardian of the Chessboard Given a collection of chess squares1, output the chess piece with the smallest value, together with its position, that is able to reach all the given squares. 1 - A chess square is a notation of a position on an 8x8 grid, with the x-axis being labeled with letters...

 
Splat syntax now added.
It'll work on the Repl, but not on TIO just yet.
 
Splat would be a good language name.
 
1:34 AM
I wonder how much TC functionality you can get with the concept of splats alone.
 
@DestructibleLemon is that valid? I don't even know funky
 
It's not valid.
 
ok
@Calvin'sHobbies yes, preferably prefix though
 
(You should totally learn Funky tho)
 
function(args) would be f*a.b.c or something
@ATaco maybe later
 
1:41 AM
 
your funky repl seems glitchy
 
It is very glitchy.
I should add an option to toggle that syntax highlighter.
It's also on TIO and Here
And rather basic documentation can be found here
 
@ATaco nope
 
2:41 AM
CMP: Should I give Funky FileIO? On one hand, it makes me feel better about adding functions like require and even the execution of arbitrary JS and JS interfaces, however, it also ruins the "safe" property of it.
 
@ATaco So you added the capability to run a web server, but you're doubting adding File I/O?
 
That was sort of hacked in, actually.
The webserver code exposes the webserver functionality to Funky, rather than Funky having the functionality.
 
@ATaco Google translate thinks that's norwegian
@ATaco Yes you should add file io. I don't think that sort of "safety" is something to be desired.
 
3:37 AM
0
A: Sandbox for Proposed Challenges

tshGoto Nth Page It is common that we need create an user interface of page selector. It typically looks like this: prev 1 ... 3 4 [5] 6 7 ... 173 next Which means there are totally 173 pages, and you are on the 5th pages currently. This challenge require you take the total number of pages, and...

 
0
Q: The given path's format is not supported.C# IO

user75825I found a strange issue when i deal file by c# IO, I call a function (file path as a parameter), code as below const string imagePath = @"‪D:\AIAPI\DSCF2935.JPG"; byte[] imageByteArray = GetImageAsByteArray(imagePath); static byte[] GetImageAsByteArray(string imageFilePath) { //@...

 
4:08 AM
2
Q: Draw 'Til You Drop

MegoIn D&D 5th edition (as well as most other editions), there exists a magic item called the Deck of Many Things. It is an incredibly powerful item, as the cards all have very strong positive or negative effects. To use the deck, a character declares a number, and then draws up to that number of car...

 
5:17 AM
You can have plugins for StyleCop which is a plugin for Resharper which is a plugin for Visual Studio. Three levels of plugins! o_O
 
6:05 AM
0
Q: Take one to make one

Antti29Challenge Given a list of positive integers, find if there exists a permutation where taking up to one bit from each of the integers, a binary number consisting of all 1s can be created. The number of bits in the resulting binary number is equal to the highest MSB in the list of integers. Outp...

 
@Calvin'sHobbies you could just make a recursive plugin
 
"To install Recursive Studio you must have Recursive Studio installed. Please install it and try again."
 
Once you have it installed:
Installing:
Symlinking... Done
Install completed
 
Funky + Experimental and Ugly Syntax Highlighting.
 
> func()
@ATaco you could just use JS syntax highlighting, it would work 99% as well as the one you have therer
 
6:20 AM
Still I find the :: looks like C++ namespace/struct static access. Although you can't use : too.
What is the @ used for?
 
@user202729 that's not what it means in a lot of other languages...
 
@user202729 @ is essentially (a,b)=>a+b where + is the operator immediately after @
@ASCII-only JS syntax highlighting only works there because it’s written logically
 
 
1 hour later…
7:40 AM
1
Q: Counting Fibonacci Orbits

Martin EnderIf we define a Fibonacci-like sequence as fk(n) = (fk(n-1) + fk(n-2)) % k, for some integer k (where % is the modulo operator), the sequence will necessarily be cyclic, because there are only k2 different values for (fk(n-1), fk(n-2)). However, this cycle doesn't usually include all possible pair...

 
7:56 AM
0
Q: Goose, fox and beans shortest solution finding

micoYou know the classic problem: Once upon a time a farmer went to a market and purchased a fox, a goose, and a bag of beans. On his way home, the farmer came to the bank of a river and rented a boat. But in crossing the river by boat, the farmer could carry only himself and a single one of his ...

 
8:07 AM
CMC: Print out this ungodly large prime
 
Jelly 2*74207281’
 
8:20 AM
@ATaco 12 bytes
 
Bonus: Make a version that outputs on TIO.
 
@ATaco rip good luck
the permalink would be ~20mb
 
 
1 hour later…
Anonymous
9:36 AM
@ASCII-only Outputs aren't included in the permalink. However, TIO would fail, because there's a size limit on outputs.
 
no i was thinking since it can't be generated fast enough to just compress it
turns out all that did was crash my Sublime >_>
 
Anonymous
You would also run into memory limits on TIO, even with compression, because you would still have to decompress it (unless you did some sort of streaming compression that could decompress digits in chunks)
 
Anonymous
I guess you could do naive decimal compression, where you store each digit in a nibble, so you could decompress and output 2 digits at a time
 
Anonymous
But that's only ~50% compression, so it would still be too huge
 
charcoal would probably use base 10 to 256 compression
which is only slightly better
unless brotli somehow performs magic
but really nobody can really tell the difference if it's over 128kb :P
 
Anonymous
9:43 AM
@ASCII-only Sure, but you could only output digits in 1280-digit blocks
 
Anonymous
Unless you did bit magic to manipulate sub-bytes
 
Anonymous
Wait no I did my math wrong
 
Anonymous
But still - it would be big chunks to output at once without sub-byte manipulation
 
Anonymous
56 digits per block, decompressing 196 bytes of base-256 at a time
 
funct"honk" in funky defines a function which takes an argument t and returns "honk"
 
9:54 AM
@ATaco VSL: fn t=>"honk"
 
func is acceptable instead of function, You don't need () around a single argument name eg. function a{}, a variable name can exist after a keyword fine, so funca or whatever, The function body can optionally be just an expression, and a string sits snuggly after a variable name.
 
 
3 hours later…
1:09 PM
Can someone give me a link to the PPCG definition of programming language? I cannot find it rn.
Nvm I found it
thanks anyway
 
Oh no, I started finding the algorithm described in the PDF too hard, I think I'll post the naive bruteforce algorithm anyway.
 
@ASCII-only $t=>"honk" in Shnap :)
 
CMP: Char-by-char or regex tokenizer?
 
@HyperNeutrino Char by Char
 
Sounds like char-by-char will be faster. (if you implement carefully)
 
1:17 PM
For Enlist?
 
@Mr.Xcoder No, for a new language that transpiles down to Python
(I don't want to make an interpreter because that's the worst part of making a language)
(So I'll just make a tokenizer+parser which makes adding features a bit slower but easier)
 
Any quick feedback on this? I'd like to post it during the next 30 minutes, although I just posted it to the sandbox.
 
@SocraticPhoenix ಠ_ಠ
 
:)
1679 (1523 SLOC) lines of perfect smushed-ness...
 
1:20 PM
;_; only 1679 lines
 
what is SLOC
 
significant lines of code
 
@Mr.Xcoder string, use regex only when needed
 
oh ok
so not comments and blank lines
 
1:21 PM
it's source line of code.
 
@user202729 and way harder. if you do it the conventional way it's waaay slower than regex
 
@HyperNeutrino What you're describing is LLOC.
 
New idea: use YACC
 
@ASCII-only So use a trie?
 
@user202729 which is insanely hard to implement well
 
1:23 PM
0
A: Sandbox for Proposed Challenges

Mr. XcoderDo we share the prime cluster? (Quick Draft) Definition The prime cluster of an integer N higher than 2 is defined as the pair formed by the highest prime strictly lower than N and the lowest prime strictly higher than N. Note that following the definition above, if the integer is a prime itse...

 
@user202729 oh huh ok
 
@Mr.Xcoder seems ok to me
 
well i guess it's more you're going to have a lot of trouble either 1. writing the grammars or 2. constructing the trie from the frammars
@HyperNeutrino you what? it's not hard...
 
So just use regex.
 
@J.Sallé Thanks!
 
1:24 PM
@ASCII-only Personally, I find writing the parser less fun...
 
@ASCII-only I found it hard :P at least for Proton, not for golflangs
 
@HyperNeutrino for each syntax construct:
parser: 1 line
interpreter: 1 line
if you do it sanely
 
uh not really
example?
 
charcoal
 
@ASCII-only s/sanely/not in java
 
1:25 PM
for each syntax construct
 
But Charcoal is a golfing language.
 
Quick poll: I'm building a (not golfy) language with a string literal. Should I ignore all \r characters in that literal?
 
@user202729 verbose mode isn't...
 
ಠ_ಠ golflangs don't count
yeah but do you need customizable variable types
 
@HyperNeutrino customizable?
 
1:26 PM
@ASCII-only Example code with many syntax construct? (I don't know Charcoal at all)
 
well like can you make your own classes/types
 
@NathanMerrill disallow them or don't ignore them... probably shouldn't just pretend they don't exist. (Just my opinion though)
 
hmm i guess verbose mode doesn't have infix operators yet
 
ಠ_ಠ
and I mean for adding a new syntax construct it's one line of parser and one if-statement of interpreter
but the base framework stuff is slightly tricky and very time-consuming
 
*one lambda of interpreter...
 
1:27 PM
@ASCII-only my code was actually designed semi-decently this time
 
https://github.com/somebody1234/Charcoal/blob/master/unicodegrammars.py
https://github.com/somebody1234/Charcoal/blob/master/interpreterprocessor.py
 
@SocraticPhoenix I ignore them in every other spot (mostly because my language doesn't care about whitespace)
 
:o semi-decently written neutrino code????? what is this?????
 
@NathanMerrill no
 
why? If I'm on a windows machine, and I type enter, I pretty much always mean \n, not \r\n
 
1:29 PM
But not everyone is on a windows machine...
 
in which case you're not typing a \r
 
And besides, doesn't " usually me "read everything after this, until the next " as literal data"
 
@NathanMerrill if you want then if platform is windows replace all \r\n with \n.
in all other cases leave it
 
CMC: Find the highest prime factorization exponent of an integer higher than 1 given as input.
 
@NathanMerrill Okay then, so imagine a user includes \r in a string... how likely is it that that was an accident?
 
1:31 PM
@SocraticPhoenix right. I was going to do that as well, until I read that Go actually ignores \r
 
@Mr.Xcoder 3 bytes in Jelly.
 
Just so we're clear: I'm not talking the character "\" followed by the character "r". I'm talking about the Carraige return
 
@NathanMerrill oh... ignore everything I said, Go is by Google and Google are my overlords (not to say I work there... only that I want to)
 
@Mr.Xcoder ÆEṀ lol
(guessing that your code is the same as mine)
 
@HyperNeutrino CMC: Do it without the built-in (and spoiler, don't just post)
 
1:32 PM
@SocraticPhoenix lol. I'm not sure if they made the right choice, but its an interesting one
 
Anonymous
@Mr.Xcoder w♂NM in Actually
 
@Mego Exactly what i had.
 
Anonymous
@Mr.Xcoder Also dupe
 
@Mego I just remembered that challenge too
(I answered it lol)
 
1:33 PM
maybe too long
 
@HyperNeutrino Funnily enough, your version is a port of the 4-byter in Actually.
:P
 
lol
:P
 
and then there's also Æf¹ÐṀL
 
Nevermind, I am dumb
@EriktheOutgolfer ಠ_ಠ I don't think so...
 
1:36 PM
/me attempts to claim next OEIS answer
 
@Mr.Xcoder or something with key for 5 bytes
 
@EriktheOutgolfer It's wrong, Æf¹ÐṀL returns 1 for 60.
 
@SocraticPhoenix Huh, this is not IRC... (and doesn't support such commands)
 
@user202729 so? /me still conveys what I meant to convey :)
 
1:38 PM
@Mr.Xcoder APL (⌈/3pco⊢)
 
@J.Sallé Wrong.
 
@Mr.Xcoder is it?
 
@J.Sallé 60 should return 2. Highest prime factorization exponent.
 
@Mr.Xcoder oh exponent, not prime. Will fix
 
Any idea how } / { work in Jelly?
 
1:43 PM
} makes lambda z: f(z) into lambda x, y: f(y)
{ makes lambda z: f(z) into lambda x, y: f(x)
 
Do you have an example where it would be useful?
 
if you want to prevent a dyad-monad construct, you can turn the monad into a left dyad
you can also use that to make monads fork like dyads
I don't recall ever using it though lol
 
@Mr.Xcoder Jelly, 5 bytes LƙÆfṀ
 
@Mr.Xcoder 2⊃(⌈/2pco⊢) I think it works now.
 
EriktheOutgolfer once used } as the second "parameter" to ¡ to repeat the number of times equal to the right argument () if I recalled correctly.
 
1:46 PM
I have failed in my quest... math is hard... OEIS is evil... also I have no motivation sooo
 
@SocraticPhoenix Project Euler is evil
 
@ASCII-only Everything is evil
 
Evil numbers are evil
 
Evil (the language) is evil
 
anyway gtg o/
 
@ASCII-only Thank you for your irrelevancy!
(is there a dub... sub is evil cuz I hate reading)
 
@SocraticPhoenix apparently not (also warning: i haven't watched it yet so i cannot attest to its quality)
 
@ASCII-only grg... reading is too hard... I will not be able to attest to its quality either... ever...
 
@Mr.Xcoder Jelly 4 bytes
@Mr.Xcoder How does that work? How does ƙ works?
 
1:58 PM
@user202729 no
} is a quick
Ạ} is the link
 
Ok so it is H}.
 
0
Q: Downgrade to a Palindrome

Magic Octopus UrnGiven a string s, return the smallest contiguous substring you can remove to create a palindrome. Examples: 800233008 -> 2 racecarFOOL -> FOOL abcdedcba -> (empty string) ngryL Myrgn -> L M 123456789 -> 12345678 (or 23456789) aabcdbaa -> c (or d) This is code-golf, smallest byte-co...

 
Apparently Ctrl+Alt+K also indent here, so is AltGr+K. Bad design, now I can't type ƙ just by pressing AltGr+K.
 
@user202729 ƙ maps a link over the equal elements in a list. counts the occurrences of each element in the list.
 
Is the resulting link monad or dyad? And how is the resulting result vector ordered?
 
00:00 - 15:0015:00 - 00:00

« first day (2473 days earlier)      last day (2361 days later) »