« first day (4429 days earlier)      last day (713 days later) » 

00:00
Are any of them more efficient than console.log()?

I'm ... not sure if I need to run a console.log() at the very end
(Maybe I don't need to run a console.log())
not if u use a lambda
@TsumikiMiniwa V8 has print()
Only debug builds, I thought. Node 14 certainly doesn't expose it
Besides, you're allowed to use alert()
@Seggan Is that legal if I'm using multiple functions? I'm doing the "Golf a number bigger than Loader's number" challenge and I highly doubt I can do that in one function
you're allowed to say f=()=>"foo";g=()=>f and then the function you need is called g
f=()=>"foo" is treated the same as function f(){return"foo"} for the purposes of code golf
00:06
Guess I'll do that, then.

I assume g=_=>...code... would be better.
Yes, _ is better than () if it works either way
Great.

So no difference between the various types of JS for this, then.
Why doesn't JS allow ==> instead of =()=>
That could be parsed as == > which is obviously illegal
@Adám your interrobang makes me wonder if theres a character whose sole purpose is to combine the chars beside it
like a binary combining diacritic
00:09
@Bbrk24 And hence there's no ambiguity.
something something maximal munch
@Seggan start extracting random bits out of some database by entering text input with that diacritic a million times
lol
my username is a combining diacritic
@TsumikiMiniwa i wanna try that now :P
@Seggan Like a ZWJ? Or like U+0361?
@TsumikiMiniwa i meant binary as having 2 inputs
@Bbrk24 like the second but merging the character after it into the character before it
00:12
oh
if it combines the character before and after it
yeah
ZWJ does that for some pairs of characters in some fonts, like uh
@Seggan i know there are those cjk combiners but i don't think there's anything that just serves as a negative space
put two of them together, upload it on social media, crash all poorly-designed browsers and apps
ᛖ‍ᛞ
In Babelstone Runic Beowulf
00:13
you have a font that gives you bind runes???
@Seggan ‽ has a distinct purpose, though; indication a rhetorical question.
@TsumikiMiniwa your browser be like zalgo
@Adám i know
@UnrelatedString Yeah, the Babelstone Runic families do
F=ㅤ=>"Hello World"; print(F()) Try it online!
00:15
ᛞ‍ᛖ becomes:
@Adám whaaaaaaaaaaaaaaaaaat
how many chars is that
@Adám Did you use an invisible character that JS allows as an identifier
@Seggan You don't know JS, it seems. ^
00:15
@Adám oh that's interesting I put that chara into my "view non-printable unicode characters" thing and it's invisible in that too
\u3164
@TsumikiMiniwa It is printable. A normal (but zero-width) letter.
@Adám nope
zero-width?!
it's not zero width on my screen
It is supposed to be.
Oh yeah, the Mongolian Vowel Separator tends to break things. If you include one in a Discord message, iOS fails to render the entire message
00:17
@Adám zero width space?
No, zero-width letter.
that thing
And since various length sequences of them form distinct identifiers, you can do things like:
Jul 5, 2022 at 14:00, by Adám
avg=ㅤ=>ㅤ.reduce((ㅤㅤ,ㅤㅤㅤ)=>ㅤㅤ+ㅤㅤㅤ)/ㅤ.length;avg([3,1,4,1,5])
2.8
I find this much more readable than with visible identifiers. Very similar to APL's +/÷≢ where +/ is reduction using + and is the length function.
Of course, if just a one-off, there's no need to name the function, so this will do:
(ㅤ=>ㅤ.reduce((ㅤㅤ,ㅤㅤㅤ)=>ㅤㅤ+ㅤㅤㅤ)/ㅤ.length)([3,1,4,1,5])
We need Whitespace 2 that uses these chars
00:24
when u return to ur other computer that had tnb open
@Seggan would you like some more?
yeah @Seggan have some more
@Seggan let your cup of pings runneth over
@Bbrk24 no, but i would like a pr review :P
Did you see my latest comment?
yeah, fixed
00:25
oh you just did it. I didn't have Github open. Yeah I'll approve it, one sec
ty
now we can finally work within the new module system
@Bbrk24 you mentioned previously you were going to set a new github status. Did you settle on one? Because this is what I see
Once we actually design the bytecode I'm excited to implement it in Trilangle. It shouldn't be too difficult actually but it might be a decent amount of code duplication
@KevinLPG . . .
and no, I didn't
@KevinLPG You just lost The Game
I stopped playing a while ago
@Bbrk24 well hey, you're manually breathing and blinking now
Joke's on you I already was
00:28
@Bbrk24 the bytecode is gonna be quite high level and a bit different than usual
i.e. im planning for an operator/structure that implements the type overloading found in golflangs
I think I already mentioned this, but I designed the --disassemble feature with the purpose of being able to translate it into bytecode. If I just add a different version of the function that puts out bytecode rather than pseudo-assembly I have a compiler with most of the work already done
Array.prototype.ㅤ=function(ㅤ){return ㅤ(this.valueOf())}
[3,1,4,1,5].ㅤ(ㅤ=>ㅤ.reduce((ㅤㅤ,ㅤㅤㅤ)=>ㅤㅤ+ㅤㅤㅤ)/ㅤ.length)
2.8
Yesss!
Why?
Pure awesomeness.
@Bbrk24 hes an APL fan thats an understatement
and that code is much like apl written out
00:34
Okay but why is ' ' the identifier of choice
at least i think thats why
@Bbrk24 because it looks like written out apl
@Bbrk24 Because then it looks like it isn't there. Subordination of insignificant detail.
In Swift you get, without invisible identifiers,
extension Array
where Element == Int {
  func average() -> Int {
    return self.reduce(0, +) / self.count
  }
}
Hold on, are you adding an average method to the Array object?
Count? Length? Size? I don't know anymore. C# has three different ways to spell it
00:36
why is the keyword extension if you use it like that
xkcd 391 since it auto-embedded
it sounds like you're declaring an extension called Array instead of defining an extension for Array
@Adám Yeah, Swift natively supports extension methods with the extension keyword. It's the same thing you did with Array.prototype in the JS before
@TsumikiMiniwa the embed also links :P
@UnrelatedString Rust impl T for S is spelled extension S: T in Swift
00:37
@Bbrk24 No, I didn't add an average method, I added a method to call any arbitrary function on an array using .() syntax.
Yeah, but you still added a method
@Bbrk24 yeah i assumed that's what it does, it's just confusing in a natural-language sense :P
@Bbrk24 So how would it look in Swift to add a method that allows calling a given function?
I actually had to do this in real code once, so I have an existing implementation, let me grab it
extension View {
  func apply<T: View>(@ViewBuilder transform: (Self) throws -> T) rethrows -> T {
    return try transform(self)
  }
}
The entire reason this exists is that the @ViewBuilder annotation may be put there
new pr dropped
00:48
Public Relations?
@Seggan holy hell
@user yeah
the more we drop, the better public relation we get as the closer it is to a finished product
But really, what were you referring to when you said new pr dropped?
Made a couple comments
00:58
I left my comments as well
and i addressed 3
@mousetail SpiderMonkey also uses one-byte strings for ASCII
@Bbrk24 document.title acts as if it forwards to the <title>'s textContent
Makes sense tbh
@Seggan did ChatGPT tell you?
no
wikipedia
01:19
nice
It is a message from the gods, you must not spend or pay any more
@Seggan Which operators? I didn't need it for map or filter
CMQ: Is there an idiomatic way to append an Option's contents to a Vec if it is Some?
I could use if let, but it feels like there'd be a better way
01:31
@Bbrk24 when we are actually implementing the golfing operations
There's iter.filter_map if you're collecting at once, but not quite for pushing one by one
I love if let
@RydwolfPrograms java has flatMap
Swift has Optional.map but it's rarely used because it can be conflated with Array.map
yeah you should be able to just use map
@Bbrk24 that's a problem how? :P
01:33
Wait I think Option has a .iter() right?
I'm just saying I've never seen it used in production code because of the confusability of x.map vs x?.map
It's great for golfing
@RydwolfPrograms yeah that's probably the cleanest solution tbh
So I could just do [vec, option.iter().collect()].concat() or something
Hmm yeah, Option<T> has IntoIterator
and Vec<T> has Extend
so... vec.extend(option) should work?
01:36
niiiiice
Second question: I have a function which recurses through some parsed HTML looking for things to put in a list (I'm making a list of image srcs in the DOM). Would it be better to do it the FP way and have the function return a vec, or take a mut vec as an arg and push to it?
The first feels slightly cleaner from a purity standpoint, but from a simplicity/performance/etc. standpoint the latter seems better
why not both
have the returning one just be let vec = []; operation(&vec); return vec
@Bbrk24 Because I only need one?
Then you get the worst of both worlds
It's an impure function but also not simple or performant
yeah would there not be some way to make it, like, emit the stuff
01:38
@RydwolfPrograms fp way
i guess pushing to a given mut vec is how you would do that :P
i don't see why not to do it that way; you can also provide a simple wrapper method that provides an empty mut vec to build on and returns that :P
@RydwolfPrograms The latter is called a visitor and is used in libs like syn
I'll do the latter, mostly just since this looks kinda clunky:
let mut srcs = Vec::new();

for child in &element.children {
    srcs.extend(search_node(&child));
}

srcs
Like if I've got a mut vec anyway I might as well pass it around
@RydwolfPrograms (and yeah I could definitely do this with a one-liner but whatever)
01:42
right
@RydwolfPrograms Actually I'm pretty sure this is just flatMap lol
@RydwolfPrograms return element.children.mapNotNull(::search_node) Kotlin FTW
@RydwolfPrograms yep
11 mins ago, by Seggan
@RydwolfPrograms java has flatMap
@RydwolfPrograms Btw can't you just use crates like scraper
I'm doing some extra processing and stuff, simplest option is just a regular HTML parser and a 10-line recursive function
"a regular HTML parser" is not exactly simple but ok
01:47
Well I mean one from a library
html_parser
@Bubbler Reminds me of stackoverflow.com/a/1732454
@Bbrk24 who doesnt know of that post
why havent i upvoted it...
It's iconic
@Seggan Because it's locked
aww its locked
imagine the rep...
I would have upvoted it by now if I could
 
4 hours later…
05:29
@Bbrk24 i've never seen this before and it's amazing
 
6 hours later…
11:27
can chatgpt accept images as prompts does anyone know?
12:03
gpt 4 can
12:16
@Simd best you can get is use one of those image to text AIs to convert the image to text and prompt chatgpt based on that
at least, currently on a free plan
12:30
rabbit time
12:41
@Seggan why does TStatements have a location parameter?
12:54
Anyone know the which are the 5 well-received questions without any English characters in the title? meta.stackoverflow.com/a/423586/6333444
39
Q: 11 = (1+2+3+4+5) - (1+2+3) + (6) - (4)

ArnauldGiven a positive integer N, your task is to return the number of steps required by the following algorithm to reach N: Find the smallest triangular number Ti such that Ti ≥ N. Build the corresponding list L = [ 1, 2, ..., i ]. While the sum of the terms of L is greater than N, remove the first ...

29
Q: 1+1 = 10, 1+2 = 3

Stewie GriffinWrite a function or program than can do simple arithmetic (addition, subtraction, multiplication and division) in both base 10 and base 2. The function will take a mathematical expression as input, and output the correct result in the correct base. The input will be n numbers separated by one or...

25
Q: 1, 2, 4, 8, 16, ... 33?

Stewie GriffinChallenge Write a function/program that outputs either the n'th element, or the first n elements, in the well known number sequence: 1, 2, 4, 8, 16 ... Oh, wait... I forgot the first few numbers: 1, 1, 1, 1, 2, 4, 8, 16 ... Heck, I'll add a few more for good measure: 1, 1, 1, 1, ...

28
Q: 𝗠𝗮𝘁𝗵 𝖲𝖺𝗇𝗌 𝗔𝗹𝘁𝗲𝗿𝗻𝗮𝘁𝗼𝗿

pfgIntroduction Try to convert words to two different unicode fonts. Challenge Your task is to transform your input string into the 𝖬𝖺𝗍𝗁 𝖲𝖺𝗇𝗌 and 𝗠𝗮𝘁𝗵 𝗦𝗮𝗻𝘀 𝗕𝗼𝗹𝗱 unicode characters. All uppercase words should become lowercase 𝗠𝗮𝘁𝗵 𝗦𝗮𝗻𝘀 𝗕𝗼𝗹𝗱 words. For Example: WORD ->...

there's one more
Thanks
I hoped for something more interesting, but this was the most likely option
@mousetail that gives me the idea that something like $!@&%!&@ *&!#@&# would be a good title for a grawlix challenge lol
13:46
@Ginger because TNode requires it
Is it just me that lost the ability to type line breaks into chat with Shift+Enter?
Test
ing
nope
@KevinLPG thanks! I have never done that
14:25
5
Q: 0.0000000000000000001

Buffer Over ReadNotice the pattern in the below sequence: 0.1, 0.01, 0.001, 0.0001, 0.00001 and so on, until reaching 0.{one hundred zeros}1 Then, continued: 0.2, 0.02, 0.002, 0.0002, 0.00002 and so on, until reaching 0.{two hundred zeros}2 Continued: 0.3, 0.03, etc, until 0.{three hundred zeros}3 Conti...

91
Q: 4, 8, 15, 16, 23, 42

Radiodef4, 8, 15, 16, 23, 42 Write a program that outputs this sequence of numbers infinitely. However, The Numbers must not appear in your source code anywhere. The following is not a valid Java program to output The Numbers because The Numbers appear in its source code: class TheNumbers { public...

But the second one is closed so that may have been counted as alphabetic
Although actually, "well received" might mean the first one doesn't count since it has a score of 5
14:41
@Seggan why doesn't it use the first child's location like UStatements?
it doesnt?
@Seggan nope
14:59
hrm
15:29
@Seggan should it?
16:11
@Ginger yes
I have changed literally nothing and my CSS went from not working to working. This is concerning
16:43
so, uh, I just ran sloc on Rabbit:
      Source :  1508
     Comment :  10
good luck figuring out how it works! :p
Hmm, let's see what sloc has to say about my code
TypeError: File extension 'hh' is not supported
(-a hh=cpp fixed that)
---------- Result ------------

            Physical :  2169
              Source :  1827
             Comment :  123
 Single-line comment :  123
       Block comment :  0
               Mixed :  47
 Empty block comment :  0
               Empty :  266
               To Do :  1

Number of files read :  18

----------------------------
What's considered a good ratio of source to comments?
Uh, here's a different project of mine:
---------- Result ------------

            Physical :  1828
              Source :  946
             Comment :  657
 Single-line comment :  657
       Block comment :  0
               Mixed :  1
 Empty block comment :  0
               Empty :  226
               To Do :  0

Number of files read :  15

----------------------------
17:02
CMP: so ive done a bit of maths
suppose aliens stole the crust of the earth, broke it into the individual elements, and then sold those elements back to us at current prices
which element do you think they would make the most profit on?
ofc assuming they deport us all to the moon, otherwise thered be no us to sell it back to
i have a feeling my answer is really wrong, so im doing some manual maths rn
17:23
nvm its right, barring FP errors
stupid kls and its stupid not seeing new changes to my code
and I can't recompile because my code doesn't work
so youd be able to sell all the crust's rubidium for 3.86415e22 dollars
@Seggan I knew this sounded familiar. Unfortunately, that doesn't have a full breakdown by elements, but it says "Most of this value comes from potassium and calcium, and most of the rest comes from sodium and iron."
17:35
hrm my data days by far rubidium, followed by silicon, potassium, cesium, aluminum, calcium, sodium, scandium
the top 3 make up most of the value
@DLosc i have read that one, but wasnt thinking of it when i did this :P
the entirety of everything is worth 8.500111342906382e+22
sadly still 14 orders of magnitude not enough
18:35
@Seggan Advanced Kotlin: fun hasCommon(other: FullIdentifier): List<Boolean> = listOf(other.identifier == this.identifier, *this.child?.let { hasCommon(it) }?.toTypedArray() ?: arrayOf())
FINALLY
18:59
Are you sure a list of booleans is the best thing to use in that case?
How are you using this method?
@user don't worry, it's an internal function inside a different function
I need it because it's recursive
19:38
@Ginger better advanced Kotlin: fun hasCommon(other: FullIdentifier): List<Boolean> = listOf(this.identifier == other.identifier) + listOfNotNull(this.child?.let(::hasCommon))
wait no thats wrong
here: fun hasCommon(other: FullIdentifier): List<Boolean> = listOf(this.identifier == other.identifier) + (this.child?.let(::hasCommon) ?: listOf())
no weird array splatting
19:53
@Seggan :O
That’s one thing I never understood about Kotlin: Why do you have to say listOf? Why can’t you just use [] or something
because list literals are still in the works
Huh. Swift has most of the features discussed there, the only one it doesn't have is that you have to say [1] as Array instead of Array [1]
> JS is a good, LISP-like language
who knew you can fit so much untruth into such few words
oh wow
20:05
ಠ_ಠ
Oh that reminds me of that one lisplect designed for ObjC interop
Nu is an interpreted object-oriented programming language, with a Lisp-like syntax, created by Tim Burks as an alternative scripting language to program OS X through its Cocoa application programming interface (API). Implementations also exist for iPhone and Linux. The language was first announced at C4, a conference for indie Mac developers held in August 2007. == Example code == This Nu code defines a simple complex numbers class. The example is a basic definition of a complex number: it defines the instance variables, and a method to initialize the object. It shows the similarity between the...
@Bbrk24 Because that requires deciding on some sort of "main" data structure that people default to using
But a List isn't the best choice in all cases, so [...] shouldn't default to listOf(...)
the linked issue discusses type inference
I think it's reasonable to, as that article suggests, have [1] default to List but allow it to represent Set, Array, etc
im not too excited abt this honestly, the listOf is already a much better solution than java
when was the last time you used List.of vs new ArrayList<>() and building it by hand?
guess what
i just pressed alt + enter in microsoft word
i should start writing my papers in intellij
20:27
LDQ How to handle dynamic imports in a statically typed practlang? Is requiring a definition file in that case reasonable. This will be used in browsers so this feature is essential
trying to replace js?
Yep, once again
once again?
@Seggan what does alt+enter do in intellij?
I mean many people have tried it before
20:29
@Seggan He's doing it all over again
Not me personally
He'll do it fifteen million times over again if needed
because mousetail gets the joj done right
@Ginger opens context menu. does imports for you, fixes spelling errors, the like
ctrl-space is better (this post made by ctrl-space gang)
@mousetail check out how kotlin does js interop and take inspiration
20:30
TS lets you just have a type definition file (.d.ts) for each library
Though if the library doesn't provide one, you can write your own!
kotlin allows you to provide external definitions for js with types and everything
example: external fun alert(msg: String) tells kotlin that somewhere, in js, there is a function named alert and that it takes a string as far as kotlin is concerned
i think rust does smth similar
These libraries are in the same language, so there isn't the issue of missing type information that you have in eg. JS interop
It's there, just needs to be accessible to the compiler
I could just generate the definition file if there is a import but that limits your options to load a different module with the same "interface" on demand. Not sure if that's something you'd want to do though
well the compiler still needs to know whats in there
20:52
@Seggan Oof
21:10
Sounds vaguely like c header files…
21:22
Man
Every time I try to beat the "Beat Loader's Number" golf challenge I only become more impressed with Loader.c (and, fail again)
Ah the Bignum Bakeoff, definitely a classic
Thought I'd be clever and take the answers from "Golf a turing incomplete language" and invoke it for every possible input of length < L
but the strongest language on that golf is just an implementation of LOOP, which is weaker than f_omega
Unless I'm missing something about LOOP, of course. It feels like it should be able to break f_omega but I'm not immediately seeing it
21:37
@Ginger my turn
constants.add(ConstantLabel[symbolTable[unpacker.unpackInt()]].getConstant(unpacker, constants))
I really ought to pickup Kotlin
Java has a fowl taste in my mouth ever since I learned C#, but I like writing Minecraft Mods.
@ATaco If you're doing it for mods, you'll still need Java for some things
I've used Cs Preprocessor with Lua, I'm not afraid of language bashing.
Kotlin doesn't consider Foo::class.java to be compile-time constant, and some of the annotations have a Class-typed argument
Here's a very incomplete mod I worked on a while ago: github.com/bbrk24/amurians-mod notice the language breakdown
Pretty much all of the Java files have @Mixin annotations, e.g. github.com/bbrk24/amurians-mod/blob/master/src/main/java/org/…
@Seggan does your keyboard not have a context menu key?
21:50
Oh, I typically rip mixins into their own files with custom events anyway.
@ATaco What kind of fowl taste? Chicken? Duck? :P
That gave me flashbacks of a time before minecraft things having well known names.
Gunpowder often being called Sulfur... Sugarcane being called Bamboo...
And of course, Chickens being confused with Ducks
@ATaco Yeah, I just kinda wish I could understand Loader's code. Even the readable version on the Googology wiki isn't enough.
Apparantly every sentence in the Calculus of Constructions (what Loader used) can be written in System Fω, but I can't figure out which term in Loader's code is the one that makes a CoC sentence instead of an Fω sentence
loader.c uses BigInts right? Or atleast, assumes the int types is magically a bigint.
Yeah, it does. The bignum bakeoff golf challenge, the "golf number bigger than Loader's", etc. all variants all make that assumption
22:00
I can do better then: return INT_MAX; // hypothetically infinite
I fear it because the numbers start getting "Provably bigger or smaller" than one another rather than just being a simple number :(
@Ginger me when javascript foundation repair
You joke, but here's dovey.c from the original Bignum Bakeoff:
int main(void)
{ return ~0u >> 1;
}
And here's edelson.c:
int main(void)
{
return (unsigned int) -1;
}
To quote from the bignum bakeoff:

"These entries, {dovey.c}, {edelson.c}, and {f.c} all attempt to generate
a largest possible integer by using unsigned types. This also cannot
succeed and these entries all return -1."
I assume both were considered "Not in the spirit" of the challenge.
Oh lmao, that'll work too.
pete.c is similar, too
TL;DR pete.c is while(n<<1 > n){n=n<<1}
which doesn't terminate
(To his credit, pete made more submissions, with pete-7.c being on the order of F_(ω^ω), getting third place)
I can't find whoever ran the bignum bakeoff, but they got really lucky that only two submissions were "immeasurably large"

There's no listed upper bound for marxen.c, but he comments that it's just the Goodstein sequence and "probably goes somewhere around f_(ε_0+ω3)"
and, of course, the other "immeasurably large" number.
Loader.c
 
1 hour later…
23:13
**CMC** I wrote a function with the following type signature:
:: (Swap p, Comonad (p b), Comonad (p a)) => p a b -> (a, b)
however this type is much more general than I needed. What was I trying to do?
what
That's the challenge.
CMQ: For an Entity Component system, which data-structure should one use to store the Component List on the Entity? An ArrayList is slow for Component-specific lookups, but a HashMap feels messy to has by Component type.
Additionally, Multiple components of the same type may exist on an Entity, which means that a HashMap would at minimum have to be a Hashmap of Lists
23:57
Actual CSS I just wrote: border: 2px solid transparent;

« first day (4429 days earlier)      last day (713 days later) »