« first day (4317 days earlier)      last day (530 days later) » 

12:01 AM
Np*
Goddamn small phone keyboard
 
LOL
 
12:16 AM
@DLosc i mentioned this yesterday, but prolog already does this, except it doesn't have <=
and i've never seen => actually used anywhere
 
rust uses =>
 
@JoKing it doesn't look like => exists by default either; they probably just want it to be available for use
 
> SWI-Prolog as of version 8.3.19 support =>/2 as an alternative to normal Prolog clauses
basically the same as :- but it errors if no clause matches
 
12:36 AM
Guys how come on mobile I cant use web DC
 
ah, nice
i'm on 8.0.2 lmao
 
12:52 AM
@DialFrost I thought you coined it lol
@JoKing that could actually be useful in golfing to exit on error
 
Sandbox posts last active a week ago: Perceptron
 
1:26 AM
@Steffan ?
 
@Steffan i thought so too, but i can't think of too many situations you could use it in
maybe with a list like +[A|B]=> +B to prevent backtracking
 
2:00 AM
eyyyyyy
klein just successfully communicated with a language server for the first time!
granted it responded with an error but it's progress :p
 
ok there we go
klein told the server to start and it actually responded! it's like prom night but with bdsm
...I regret that analogy
 
2:23 AM
Klein, as in the topological 2d lang?
 
@cairdcoinheringaahing Klein, as in the IDE project I've been working on for the past month
 
@Ginger tf???
 
2:47 AM
really cursed idea: have lexing, parsing, typechecking, resolution, and compilation happen all at the same time
 
... compilation doesn't work like that
 
ik but in a streaming manner, and assuming no code depends on stuff after it
which is really cursed
 
though you can do lexing and parsing in one step (sometimes called larsing)
and maybe typecheck and codegen in small enough units
 
also, ima be gone until like sunday or monday, please direct all complaints to P.O. Box 8310110310397110
@Bubbler yeah thats what i meant
once it has enough info, it executes that bit
@Bubbler thats new information
 
2:58 AM
seems very complex
 
@JoKing is that bad or good
 
3:41 AM
i bet ajax will answer in a few minutes and then no one else will follow until somebody does it in apl 5 months later
 
@Steffan bro smth kinda similar to that happened to one of my other challenges, no one answers it for months, then ajax comes in with like a 900 bytes python answer out of nowhere
 
i think it was over 1000 bytes lmao
or maybe it will be the opposite, but lyxal posts a 30-byte vyxal solution that will terminate in approximately 35 trillion years
 
@Steffan lmfaooooo
 
0
Q: Is it a legal atomic chess move?

Aiden ChowBackground and Rules There is a variant of chess called atomic chess, which follows essentially the same rules as normal chess, except that pieces explodes other pieces around them when captured. In addition to checkmate, you can also win the game by blowing up the king. When a piece captures an...

 
4:03 AM
@Steffan times out for anything larger than a 2x2 chessboard :p
 
1x1 chessboard*
 
wait hmmm, should i make it so there are different sized boards? i just assumed it would be 8 by 8
 
@AidenChow No, it's just a reference to an answer I once wrote that timed out for matrices larger than a 2x2 despite the fact that it's easy to make an efficient algorithm that works for much larger matrices (which would have been longer)
 
 
1 hour later…
5:11 AM
anyone know a CGCC challenge that involves number->word? e.g. 9->nine
 
ah tysm
 
@Seggan rMf...are you tryna delete all my files? :p
 
 
1 hour later…
6:44 AM
CMC given a positive integer x, output the number of factors of x excluding x and 1
 
@graffe Desmos, 30 bytes: f(k)=∑_{n=3}^k0^{mod(k,n-1)}
 
@AidenChow is there an executable link?
What do you get for 2014?
 
@graffe vyxal, KḢṪ
No wait
KL⇩
 
@lyxal hv u asked anyone on git to help ya on the docker?
 
6:55 AM
@lyxal very nice!
 
@DialFrost been too busy to do so
 
@lyxal ohok
 
@lyxal how do you compute it?
 
@Steffan wanna help lyxal out? lol
 
@graffe length of the list of factors of the input minus 2
 
7:18 AM
if my code is correct, 2014 should return 6
 
@lyxal does this work for 1?
 
7:37 AM
@AidenChow that is correct!
@lyxal how do you get the list of factors?
@AidenChow do you have 0^0= 0 or 1?
 
@graffe 0^0=1 in desmos, im taking advantage of that fact to only count the factors
 
@AidenChow interesting trick!
 
yep, its pretty standard in desmos golfing actually
in many cases its golfier to use this instead of regular piecewise expressions
 
A well known fact by little known people :)
 
7:54 AM
@graffe K
 
@graffe lmao
it also uses the fact that in desmos, if the upper summation bound is lower than the lower bound, then the summation defaults to 0, which helps deal with 1
 
8:15 AM
@lyxal 1 returns -1 rip
 
 
1 hour later…
9:24 AM
hi
 
9:35 AM
sup
 
9:50 AM
Y'all ever just realise that there are so many parser types out there that it's not funny?
I do
 
Well now that you mention it, I do.
 
@Bubbler turns out this is actually pretty easy to accomplish
You just muck around with the contents to get an appropriate commit hash
 
 
2 hours later…
11:36 AM
nobody told me there was a new (released in 2019 lol i am late) arduino ide
 
11:59 AM
Is LeetCode fun? I'm thinking of doing those challenges
 
As long as you don't do it "competetively"
 
No I just want to do it because I find problem solving fun
I should probably start getting a good grasp of data structures and algorithms right?
 
I'd not recomend it as a way to learn data strucutres and algorithms, though knowledge of them will help you do better
 
I meant I should start by gaining a strong understanding of DSA prior to getting into LeetCode, right?
 
1:17 PM
0
A: "Hello, World!"

angel_p_57Functional(), 139 bytes 0,1,=,:,$,&,<,>,$(W,& a(>(a(:(Z,&()(W()0)))),W))0 Z Z()1()1 W()W()>()W()>()> >()>()W()1()0()0()Z W 1()1()1()> >()> Z W 1()W()>()Z W()1()0 Z Try it online!

 
 
1 hour later…
2:38 PM
0
A: Sandbox for Proposed Challenges

YousernamePrint the most uncommon character code-golf self-referential Your task is to write a full program that prints the character(s)* that appears in your code the least. For example, if my code was AAAABBBBCCCDDD, then the program should print CD or DC. Rules All printed characters* must appear at le...

 
2:54 PM
@DialFrost I keep telling you, I can easily make a Docker image, but I can't do the SBCS.
 
3:42 PM
Happy Thanksgiving!
 
3:53 PM
Are there any languages that use SBCS but the SBCS is actually just latin-1
 
I guarantee you one of those ISO-xyz or CPxyz character sets is that
So probably
 
Latin-1 is ISO 8859-1 and CP1252
 
4:42 PM
okay so why tf is Macy's making an NFT OF THE PARADE
I just can't handle it man
 
It's free money, of course they are doing it
 
@Ginger From the looks of it it's a bunch of NFT related things, not just "an NFT of the parade"
I guess they didn't get the memo that NFTs stopped being popular six months ago
 
@RadvylfPrograms that's not really an improvement :/
(I didn't know that because my Pi just flatly refused to load the page)
 
Yea that page's performance is absolutly the worst I've seen
 
It works fine for me but still feels very gross due to their usage of all sorts of weird animation and CSS tricks
Like the background scrolling slower than the content in a really disorienting way
 
4:52 PM
that's a pet peeve of mine: websites that scroll weirdly
 
Feb 1, 2021 at 20:30, by Redwolf Programs
Anyone else hate websites that override how scrolling works?
 
Gigabyte makes their motherboard info pages scroll one page at a time and it's so annoying
Like, scrolling is built-in to browsers for a reason. It's an established mental model and it needs to be performant. Just because you are able to override it does not mean that your preferred handling of scrolling is automatically better than the one everyone else in the world is already used to.
@Ginger Oh it's the same thing Gigabyte does
Except that Gigabyte has a header covering up part of the content too
 
the only exception to that rule is overriding the scrollbar, just the scrollbar, to fit better with your site's theme
 
So you literally cannot scroll to see it, since it'll scroll a while page
 
4:55 PM
and even then you gotta do it right
 
@Ginger Nah, I disagree
I'm on Chrome OS where scrollbars are invisible and don't show up in the first place, and when a site adds one in, it just looks ugly
 
well that's just, like, your opinion maaan
 
And on Windows/other OSs with scrollbars, they tend to be pretty non-offensive in how they look
 
firefox does scrollbars right IMO
 
I do gotta say though, I'm really spoiled by Chrome OS's lack of a physical scrollbar, a lot of my projects involving HTML probably look terrible on devices with them
Since I completely forget scrollbars exist 99.9% of the time
 
5:08 PM
@Ginger Yes, and even lets you change their colour.
 
@mousetail 05ab1e used to use CP1252 but now they have a custom one
 
5:35 PM
@Steffan Is it still based on CP1252 or is it totally different?
 
6:03 PM
Still based on it
 
0
Q: Base Neutral Numbering System

mousetailIt frustrates me that when you say "base 16", the 16 is in base 10. We need a base neutral way of writing down numbers when favoring a specific base would be inappropriate. How it works We define <n> to be the nth prime. So <1>=2, <2>=3, <3>=5. Note that every positive integer can be uniquely rep...

 
 
2 hours later…
7:56 PM
LDQ: How useful would a "not" quantifier be in regular expressions? It would match any string the same length as what's being NOT'd, but which does not match it. E.g., 1([a-z]{2})! would match 123, 1a8, or 12c, but not 1ab or 1 or 1000
Part of why I'm considering this is that, for complicated reasons, I can't use \D/\W/\S for the inverted versions of \d/\w/\s in my regexlike, and for similar reasons character classes with [] can't use the ^ syntax to invert them
 
Don't you need to be able to restrict the not to a sub-part of the entire regex?
So something like (!pattern)
 
It'd work like */+/?
 
Ah.
 
So you'd do (pattern)!
 
Now I'm wondering why PCRE doesn't have this.
 
8:01 PM
One issue would be that I think anything with a */+ in it that's NOT'd would just match the whole string a lot of the time
 
yeah
i think for more complex cases you'd just want to still use negative lookahead
but for fixed length matches you really would think there'd be a match-not
 
Possible solution: using Adám's proposed syntax of (!pattern), and making it so that you can put a string in between the ( and ! that the NOT'd part must match
E.g., (\w+!daniel) matches any \w+ that isn't daniel
 
ooh
that would be nice and expressive
 
it would mean there's no way of saying "an empty string that's not [some thing]" but that's totally useless anyway
And (! would just turn into (.*! (assuming . can be a newline)
 
So it'd be like | but instead of meaning OR it means BUT NOT.
 
8:07 PM
@RadvylfPrograms Or possibly it'd be smarter than that and do the match-the-right-length thing, so (!abc) would be a shorthand for (.{3}!abc)
 
That's less flexible, and what would (!abc?) mean? (.{2,3}!abc?)?
 
I like the BUT NOT one. Nicely complements |
 
@RadvylfPrograms You'd still be able to do the (is!is not) thing, but leaving is blank would default to something more convenient
 
Ah.
But still. (|abc) means "nothing or abc"
 
8:11 PM
@Adám I wonder if allowing chaining like with | would be useful at all...it would allow for an AND operator (![]!), which is pretty useless but kind of cool
@Adám Yeah, special casing the empty string feels kind of wrong, but at the same time, "empty string that is not [thing]" is never going to be meaningful anyway since the empty string is only ever one thing
 
Would ! have higher or lower precedence than |?
 
Probably looser
 
Btw, instead of grabbing a character which is normally inert in regex, how about (this|?not that) or something? afact, that's a syntax error.
 
Since !thing|other thing would probably be pretty common
@Adám I think it's worth it for the readability. This is a superset of regex in a lot of ways anyway, so I'm already making a lot of changes to what characters are and aren't inert
 
ok, but for your upcoming proposal on PCRE…
 
8:18 PM
@RadvylfPrograms Okay so this would depend on if it's left- or right-associative
If it's left-associative, any additional !s after the first are identical to |s
x!y!z is "x that isn't y or z"
Whereas with right-associative you get something more interesting
So x!!y would mean "x that isn't anything that isn't y", which is exactly "x that is y" or "x and y"
Could maybe be useful for intersections of classes
It's ASCII-only for now, but if I added Unicode support and, e.g., \s included non-ASCII whitespace, you could maybe have a use for \s!![\x00-\x7f]
 
It'd be nice to have a regex operator that's "these in any order"
 
Having the same substring match two patterns is really cool.
 
@emanresuA Would be cool if you could apply regex-y quantifiers to them too
 
@emanresuA incidentally that's another good thing to use ! as a character for :P
 
E.g., if (1)+ and 2? were the two "these"s, it would mean "any nonzero number of 1s with a 2 possibly somewhere in the mix"
The syntax would probably be definitively un-regex if that was allowed tho
 
8:24 PM
So 1+2?1*|1*2?1+?
 
Yeah. But with more than two or three things, it gets annoying to write out explicitly really quickly
 
For actual PCRE extension, |? could be BUT NOT and |+ could be AND IN ANY ORDER.
 
So that leaves the question, what would |* be
 
So the above would be 1+|+2?|+1*
 
@RadvylfPrograms BUT YES
 
8:27 PM
@RadvylfPrograms Yeah, I've hit that multiple times trying to match numeric literals like 1.5 and 1. and .5
 
I ran into something similar trying to write a regex for {} quantifiers. Any of {n}, {,n}, {n,}, or {n,n}
 
Right, all such ones.
 
\d+|+,|+\d+
 
@RadvylfPrograms Are you... parsing regex with regex?
 
Yes why not
 
8:29 PM
The number problem is actually pretty awful, trying to match ¯1.2e¯3j¯4.5e¯6
@emanresuA Of course, the obvious choice. I do it all the time!
regular expressions are regular, after all, so no worries there.
(yes, I know regexes aren't regular, but neither are regexes, so no worries there.)
5
 
@emanresuA and the parsed regex is for parsing html
 
! might actually be really neat in something like Regenerate
 
@DLosc You might be interested in this conversation
 
@Ginger A̵͕͛w̸͔̏ę̷͐s̶͎̾o̷̙̿m̴͇̄e̵̞̍!̸̨̐
 
How can I store python floats in a file using only 64 bits per number?
 
8:45 PM
Represent it as a byte string
20
Q: Converting a float to bytearray

tatatat0So, what I am trying to do is convert a float to a bytearray but I keep on receiving both no input, and EXTREME slowing/freezing of my computer. My code is import struct def float_to_hex(f): return hex(struct.unpack('<I', struct.pack('<f', f))[0]) value = 5.1 #example value ... value = byt...

That struct.pack method probably even works with collections of floats, saving you some work
 
@RadvylfPrograms interesting. Maybe storing a numpy array would work too?
 
9:03 PM
UX question: where should I put things like find, replace, etc in Klein? in order for them to be in the menu strip like in most IDEs the menu strip would have to be able to change depending on which workspace is selected and I don't like that idea very much
because those operations are workspace-specific
perhaps I could put them in a dedicated "Workspace" menu in the menu strip...
 
You could have a bottom/top bar specifically for find/replace like Atom does
(which by default only pops up when you're actually doing that, ofc)
 
so like you highlight some text and the bar appears?
 
No like, you hit Ctrl+F and/or use some menu to bring it up
 
but where does "some menu" go is the question
 
Does Klein have like, the old fashioned file/edit/project/... menus at the top?
That's where I'd put it if you do
 
9:07 PM
it does, but I don't want to put it there because:
> in order for them to be in the menu strip like in most IDEs the menu strip would have to be able to change depending on which workspace is selected and I don't like that idea very much
> because those operations are workspace-specific
 
Wait why would the menu strip need to change
Find/replace would work in any file right?
The actual text boxes wouldn't be in the menu
 
but it's not just files! klein supports other workspaces
what's the point of having "find/replace" in the Welcome workspace?
 
Well I would hope your menus change and/or disable some things for non-text workspaces
Otherwise they're basically useless
Since things which apply to both text and a welcome menu are few and far between
E.g., you can't have save as in the menu any more
Since you can't save welcome
 
but that would require special coding for non-text workspaces and I don't like that
 
You already need that
 
9:09 PM
not currently
 
Your menus cannot be exactly the same for totally different types of content, if they are, you probably don't need them
 
wait, you're right
ok fair enough, klein won't have a menu strip then
 
Wait what no that's not what...
 
but I don't like that either
:/
 
Just do what literally every other app that exists does and disable text-specific options in non-text contexts
And/or change what menus are visible
 
9:11 PM
fine, but I'm going to sulk while implementing it
 
The whole point of having them broken down into file/edit/view/... is that you can just remove the edit one for non-editable stuff
Will you have workspaces other than welcome and text? E.g., photo editing? If so, you're really going to want the ability to add more menus for those modes
 
yeah that makes sense
thanks for help!
 
I haven't seen a screenshot in a while, how's Klein going as a whole?
 
good question!
I'm working on the main editor body right now
been having some... issues with poetry and stuff but it's going alright
sadly I don't have very much interesting stuff to show you because most of my work has been internal
but I'll get you some ASAP
in the meantime here's a screenshot of the new project dialog:
Nov 19 at 22:31, by Ginger
user image
 
Nice. Maybe "version" should default to something though
Since most people don't open up a new file and start on version 3.8.1 :p
 
9:16 PM
good idea
 
I'd go with either 0.0.0 or 0.1.0 or 1.0.0
 
how about 0.1.0, it's what I usually use
 
sure, I think that's what Rust defaults to as well
 
9:53 PM
 
10:21 PM
me and the [Person]s waiting for poetry to finish whatever the hell it's doing
okay so
for some reason
whenever Klein invokes poetry via subprocess, it acts as though the virtualenvs.options.system-site-packages option is always true, ignoring the actual config settings
it's supposed to be true for Klein only
and running poetry config --list from Klein shows that it's false???
wtf
aha
I gotcha now you little [$!$$]
 
 
1 hour later…
11:37 PM
@RadvylfPrograms Screw WASM.
 
11:49 PM
Actually wasm is creeping into some non-browser territories, e.g. docker
 
Jesus christ.
 
anyone have hints to reduce this pseudo code?
while n%d<1
  n=n/d
  s+=sum(digits of d)
 
n/=d
 
@JoKing apart from that :3 this is elongated psuedo code
i thought there would be a way to put this in a comprehension since i wont be using the var n later in the code
 
"count how many times n is divisible by d, and multiply that by the sum of digits of d" is an alternative
 
11:56 PM
ye but how to do the first part, is what i've been wondering for a while now :(
oh wait
 
sum(digits of d)*sum([n%d**i==0 for i in range(1,99)])
cursed
 
@Bubbler huh??/
whats the range for
 
"count how many times n is divisible by d"
without an actual counter
 

« first day (4317 days earlier)      last day (530 days later) »