« first day (3644 days earlier)      last day (1192 days later) » 

2:32 AM
@UnrelatedString hi integer
@pxeger the fun this about it is the chaining part. IT takes more time for the challenge to get hard (and in turn, more interesting)
 
2:46 AM
For some reason, Javascript thought it'd be a good idea to have two replace functions for strings: one that only makes a single replacement and one that replaces all occurrences. It doesn't help that other languages only have a single replace function that usually acts as the latter.
 
3:07 AM
@Lyxal Don't ever use replaceAll. It uses some weird iterator thing internally and only works on a few newer versions of browsers. Just use the g flag to make it a global regex
 
Example?
(of how it should be)
 
"this is text and it is more text".replace(/is/g, "is not")
Just do /regex/g instead of /regex/
 
I was never using regex
 
Oh, you're using .replace with strings?
 
yes
e.g. url.replace("+", "%2B")
 
3:10 AM
If it's a fixed string for the first parameter I'd just use a regex, although you can do replaceAll if you don't care about browser compatibility (which none of us do :p)
Note that JS does have a function to encode and decode URIs
 
@RedwolfPrograms it doesn't do +
nor does it do ), (, [ or ]
the brackets screw up cgcc links
and the + screws up the permalink decoding
 
wait I'm using encodeURI
there's a different URI encoder?
@RedwolfPrograms still doesn't do brackets
 
It does for me
 
and brackets need to be done
 
3:13 AM
The only thing it doesn't do for me is parenthesis
I think those are valid in URIs
 
I need it to do parenthesis
@RedwolfPrograms but they muck up [links](example.com?d=()
see
that's what i mean
 
Maybe just do "".replace(/[^a-z...]/g, c => "%" + somefunctiontoturnthecharacterintoacode)
I'll go check the RFC for the correct values for that
 
@RedwolfPrograms that also mangles =s
 
You want those unaffected?
 
yep
I'm refining the permalink buttons on my vyxal interpreter
Okay it's good now
But why can't I get the clipboard writing stuff working?
 
3:18 AM
You don't base64 encode the data?
 
@RedwolfPrograms have you ever tried base64 encoding unicode?
 
I had no idea that didn't work...what's the point of base64 in JS lol
 
@RedwolfPrograms base64 doesn't play nice with charpoints > 128
and unfortunately, Vyxal has a lot of unicode
it's a golfing language after all
a golfing language that recently hit it's first major release: Vyxal is now v1.0.0
 
For the clipboard thing, what part of the code are you running it in? There's lots of security stuff involved with the clipboard.
 
In the head part
on button click
 
3:20 AM
Hm, it should allow that if it's by user interaction.
 
Using inline JS to call the functions is probably messing it up
 
ah
it says the clipboard part is undefined
funny thing is that it was working once upon a time
 
Apparently it doesn't want to dotheshare
 
nor dothetio
well it outputs it to the box but not copy it
note that it's a jinja template, so things like {{value}} get replaced at render time
because I'm using a flask app *dabs aggresively*
 
3:25 AM
Did y'all use a chicken randomizer for the indentation?
 
no
it's called two collaborators
who probably use different indentations
 
Why not base85 (or base-whatever) to convert each Unicode codepoint into ASCII domain, then base64?
 
I just use the indent feature in google docs
I just love the look of my JS in crisp times new roman
 
(or just convert the source code to SBCS and base64 that)
> console.log(ok.codePointAt(0).toString(16)); // 61: occupies < 1 byte
Apparently the character a occupies zero bytes
 
@RedwolfPrograms okay the indentation is fixed
and I'm just gonna stick with url encoding for the permalink
the website is just a front for the real elegant stuff
 
3:58 AM
Doing a school project on Spectre and Meltdown, this should be fun
I've got a really cool analogy for how the CPU cache works and how Spectre manipulates it
 
4:32 AM
@RedwolfPrograms Uh... a school project? At this time of year? At this time of day? In this part of the internet? Localised entirely within your computer?
 
I think the answer to most of those questions is yes but Iḿ not sure tbh
 
@RedwolfPrograms may i see it?
 
I haven't done anything on it yet, it's 23:00 so I'm just doing some research
 
@RedwolfPrograms and you just missed the joke
That's supposed to be a steamed hams reference
 
I had a feeling I was missing some sort of joke :p
Sorry for ruining it
 
4:38 AM
all's good
you got it except for the "its 23:00 part"
 
4:58 AM
Just proposed a String#reverse method in the TC39 (ECMAScript) official forum: es.discourse.group/t/string-reverse-method/620
 
> given that it's a fairly common operation for both data types
[citation needed]
 
I mean I've reversed a string more times than an array, and TC39 apparently determined that it's important enough for arrays to have a reverse method
Plus it wouldn't be much of a pitch if I was like hey, what if we could reverse strings...nobody would want it but it would be cool in theory
 
 
7 hours later…
12:11 PM
Husk people
Is there any way to make this infer?
 
 
2 hours later…
2:35 PM
0
A: Sandbox for Proposed Challenges

EasyasPiWrite a Brainfuck compiler + decompiler! Many Brainfuck compilers will convert to a different language instead of compiling directly. Your job is to write not only a compiler in language X which compiles Brainfuck to language X, but also a decompiler which takes code compiled with said compiler a...

 
 
2 hours later…
4:25 PM
@Razetime Not a Husk person, but what are you trying to do?
 
@NewMetaPosts Fun facts: As a site, we got one Steward badge (for VLQ) and four Marshall badges (2093 flags)
 
4:51 PM
@user It starts with 3, then gets the hypotenuse of that i.e. sqrt(3^3 + 4^2)
then it does that with the next value
and so on infinitely
 
5:27 PM
@Razetime Where do the ^3 and 4^2 come from?
 
 
2 hours later…
7:07 PM
Oh, I see, are you trying to answer this question?
 
7:26 PM
@Razetime I have no idea how yours works and how to make it work (I can't read Husk), but here's an alternate solution that works for at least 5 elements. Good luck!
Here's a 19 byte version, actually, but it uses that ugly lambda :(.
 
7:47 PM
Looks like this is the shortest you can get, I tried making it pointfree, but it just got messy.
Actually, there's an 18 byter too!
Okay, I'm going to stop talking to myself now.
 
8:09 PM
Actually, never mind, that answer's invalid because it times out for the sixth element of the sequence. Sorry, I can't help you.
 
8:37 PM
Any feedback for Bot Factory KoTH (2.0) (any way I can make it shorter while still making sense)?
 
9:06 PM
@Razetime Btw, your current code infers and is pretty fast, I got the first 10 elements in about 22 seconds; the only problem is that the last few elements are off. Maybe there's a rounding error somewhere?
@RedwolfPrograms What was wrong with 1.0? It looks fine to me.
 
Jan 16 at 20:09, by Redwolf Programs
The problem with just counting the characters collected is that a bot can drop and pick up a character over and over again for near infinite points
 
I had intended to use the bots' scores as the winning criterion, but ended up using the unmodified number of characters picked up instead
 
Oh, I see
 
I'm thinking about adding a way for the owner bots to communicate with their workers, but I'm not sure how to do it without it being overpowered
 
0
A: Sandbox for Proposed Challenges

DavidePrint a 3D shape write a program/function to print this cube (or whatever it is) in different sizes: ¶L¶L¶L¶L¶L¶L¶L¶L¶L¶L¶L //¶L¶L¶L¶L¶L¶L¶L¶L¶L¶L¶L ////¶L¶L¶L¶L¶L¶L¶L¶L¶L¶L¶L //////¶L¶L¶L¶L¶L¶L¶L¶L¶L¶L¶L ////////¶L¶L¶L¶L¶L¶L¶L¶L¶L¶L¶L //////////...

 
9:21 PM
So what incentive is there for bots to drop characters? So their owners/workers can pick them up?
 
Either that or maybe as a distraction or bait
It's not a major aspect of the challenge, but it's something a lot of people had wanted in my first KoTH (about collecting gold coins)
 
9:44 PM
0
A: Sandbox for Proposed Challenges

caird coinheringaahingIs it a vampire number? Repost and improvement of this challenge from 2011 A vampire number is a positive integer \$v\$ with an even number of digits that can be split into 2 smaller integers \$x, y\$ consisting of the digits of \$v\$ such that \$v = xy\$. For example: $$1260 = 21 \times 60$$ so ...

 
Leo
9:57 PM
Does anybody here know how could I get the Husk room unfrozen?
 
You can ping a moderator (HyperNeutrino, Jo King, or Wheat Wizard) and ask for it to be unfrozen
I think that's the only way, not sure
 
Leo
@RedwolfPrograms Thanks!
@HyperNeutrino could you please unfreeze the Husk room when you have some time?
 
10:45 PM
G'morning y'all
 
@Leo You're one of the Husk people, right? Could you help Razetime out on this?
 
@Lyxal is it not normal to agree on indentation on a project by project basis
like, i'
m a 4 space guy, but if i'm working on something 2 or 8 space i'm using 2 or 8 space
 
8 spaces? Weak, I use 32 :p
 
@UnrelatedString not when it's a collaboration between two cg users
 
@RedwolfPrograms smh using a power of 2
11 spaces for life
 
10:56 PM
I use fibonacci spacing
3
 
I indent my program really far and deindent my nested stuff
 
void foo()
{
 foo { /* 1 space */
   bar { /* 3 spaces (1 + 2) */
      baz { /* 6 spaces (1 + 2 + 3) */
           qux { /* 11 spaces (1 + 2 + 3 + 5) */
                   foobar { /* 19 spaces (1 + 2 + 3 + 5 + 8) */
           }
      }
   }
 }
}
 
That actually looks good tbh
 
agreed
 
Y'all losers with your lame indents
I use 69 and 420 spaces
 
10:58 PM
original meme haha funny
 
to get the best mileage out of fibonacci spacing you should separate the regions of space corresponding to the last two terms with semicolons
 
It goes 69 spaces, then 420 spaces, then 42069 spaces, then 69420, then 4206969, 6942069, 6969420 etc
 
flat is better than nested amirite
 
@Lyxal Add that to the OEIS
 
would it get the 'nice' tag?
 
10:59 PM
I don't remember my account details
 
@rak1507 isn't that Fibonacci-2 spacing?
 
wdym?
 
I mean, I know you want to avoid 0, 1, 1 indentation, but you could have used Fibonacci-1 spacing 0, 1, 2, 4, 7, 12, 20
 
ah right yeah ik what you mean
 
But that's not as instantly recognizable as 1-2-3-5-8
 
I'd say yes
 
Leo
@user I'm not sure what's the algorithm they tried to implement there... It seems to be working, but it becomes extremely slow after a dozen elements or so.
@Razetime we can discuss about this and in the Husk chat as soon as it gets unfrozen :)
 
11:41 PM
@Leo The slowness is to be expected - mine and other people's algorithms timed out after just 5 elements. The issue seems to be some kind of floating point error, the last couple terms seem to be off, maybe because of the square rooting/unsquarerooting.
 
11:55 PM
@RedwolfPrograms sure but 0, 1, 3, 6, 11, 19 isn't recognisable either
 
Oh never mind, I see what you meant. I thought you were saying those'd be the amounts to indent (rather than the sum)
 

« first day (3644 days earlier)      last day (1192 days later) »