« first day (2388 days earlier)      last day (2753 days later) » 

00:17
@anyone what is typical RLE repeat size
i would guess that depends on the data
For ASCII-art :P
What's the difference between _getch and _getwch?
@Pavel _getwch takes a window
I don't get it.
Like, you tell it what terminal to read from???
00:20
@Pavel ... You pass _getwch a WINDOW* object
@Pavel basically, yes
Huh
(I'm bad at this whole C++ thing)
wait a sec
that's wgetwch
@Pavel :| nvm it's actually wide char
I'm assuming that includes unicode
Ok
That's simpler.
Normally that would mean I should use _getwch but with C++ I'd rather just get a normal char.
@Pavel why :P
Because those cause less segfaults.
00:36
@anyone what is typical rle run length
for ascii art
or at least sensible (preferably what you think would be optimal) upper bound
@ConorO'Brien ok what ._. long long long is too long but __int128 is just fine lol
@ASCII-only ikr lol
01:00
@ASCII-only How tho
Anonymous
@ASCII-only Depends on the number of distinct characters and the size of the thingy
Struct?
Anonymous
@ASCII-only __int128 isn't portable
I just realized that the gradscript icon has {} in the icon :p
01:26
@ASCII-only solution: use vsls Int128
@Downgoat +1
We can even have a UInt1024 not sure how that would work, but it would :P
@Downgoat *512 would be highest I think (SSE)
we can technically actually have like UInt1323242
Just define BigInteger as a single integer that takes up 10 MiB, and hope no one notices.
Throw OutOfMemoryException if anyone somehow exceeds the cap
01:35
@Downgoat No that's UInt<1323242>
@Pavel ...
@ASCII-only we are planning to have support for Integer which is basically public struct Integer { i1, (i32 | i8*) } and jos to support biginteger with near 0 overhead
@ASCII-only we cannot do this
@Downgoat why not
because generic =/= template
> =/=
what is problem?
@ATaco in mathjax gen. what is meaning of 24! prefix?
01:37
@Downgoat :| then what do
brb checking
@Downgoat ok is good but isn't this what gmp do
To be clear, does VSL use != or =/=
@ASCII-only Bitfield<1418297439128>
@Pavel sheep equal
like 1 sheep equal 2
ಠ_ಠ
Does your StdLib define a sane operator?
yes goat equal
@Downgoat That doesn't contain any equality operators at all.
0
Q: Save humanity from annihilation

Techrocket9Aliens have arrived, and they aren't friendly. Turns out, they've been in the process of converting all matter in the universe into compute capability so they can have more fun in their VR simulations. Our solar system is the last bit of space they haven't converted yet, and they're about to re...

@Pavel was in response to @ASCII-only
01:41
oic
I mean, sheep equal is still better than <>
wait where did @ASCII-only go
Ok, so it is !=
@Downgoat idk
01:42
stdlib is a little outdated though since we switched to new syntax for native blocks
    public static func ==(lhs: T, rhs: T) -> Bool llvm {
    define i1 <name>(<param>, <param>) alwaysinline {
        %2 = icmp eq <param> %0, %1
        ret i1 %2
    }
    }
is now:
@backend(llvm)
public static func ==(lhs: T, rhs: T) -> Bool native {
    %2 = icmp eq <param> %0, %1
    ret i1 %2
}
Oh gaot the indentation
}
}
yeah that is how it is suopse to be
ಠ____ಠ
@ASCII-only we probably want to manually add @constraint to entire stdlib to minimize γs in STL
@Downgoat @constraint?
01:44
like opt constraints
?????????
for δ (has to be minimized because if primitive is λ and all function are R for δ then that is not good because that means less ability to optimize)
btw fun fact: we'd be able to output a probabilty of infinite loop happening
(if undecidable in a case it would say 50%)
@Downgoat pls example of constraint
Does VSL actually contain λ symbol? It's a bit hard to type.
@Pavel >_> no what
01:51
Well goat started talking about δ and stuff
@Pavel lol that's type constraint implementation details
Actually IDK, haven't read Downgoat's thing yet
@Downgoat e.g. pls
02:07
@ASCII-only domain constrainment for declarative representation of functions
@Downgoat i meant example where is it need
like:
// Int.vsl
@constraint(domain, uniform)
@constraint(codomain, uniform)
@constraint(cardinality, +)
@constraint(typelen, 32)
public static func +(a: Int, b: Int) { ... }
@Mego hmm do you have any idea for a sensible limit for PPCG ASCII-art (or any ASCII-art for that matter)
@Downgoat D: so many globals
??? where is global
domain, uniform etc
02:11
those are not global
those are not variable either, they are just like identifier
@constraints(domain, uniform, codomain, uniform, cardinality, +, typelen, 32)
public static func +(a: Int, b: Int) { ... }
pls read paper really short only like 3 page
@Downgoat What demonic-goat spawn language is that?!
@Zacharý VSL
@Zacharý python
02:12
Link to the language?
See it's funny because it actually was spawned by goat.
@Zacharý It's kinda unusable rn
VSL looks pretty cool. It's not Fortress-Specifiation level of awesome, but it looks pretty weird.
02:13
@Downgoat :| why
@Zacharý You've never seen annotation before? I'm confused
@ASCII-only because what if I have something like:
@Zacharý why is fortress so aweseom
@Zacharý :| heresy
Not annotations like those!
@constraint(codomain, log, inv)
@constraint(cardinality, *)
@constraint(typelen, 64)
public var length: CSize { ... }
if that were 1 annotation
@Zacharý :| even python snek, java js but bad and C# have those
02:15
how would you know where codomain and cardinality start?
@Downgoat :| ok
@ASCII-only Java > JS
They're both crap languages but JS is more crap
@ASCII-only its ok this is only internal thing
@ASCII-only specification, the implementation sucks so bad though. ccs.neu.edu/home/samth/fortress-spec.pdf
@constraints({codomain: (log, inv), cardinality: *, typelen: 64})
02:16
@Pavel opls, java logo is cup with crap inside of it
@Downgoat also how is * valid
@Pavel This is PPCG, JS > Java
@ASCII-only we can't do this too complex
@ASCII-only it is already valid
@Downgoat why not
who will write parser for that
because not me :P
02:17
how to create new annotation type
@Zacharý Who knew people would be talking about not code golf in TNB. This has never happened before.
@Downgoat suppose to be method call like normal annotation
@ASCII-only transform/data/annotations
@Downgoat Teascript?
@Downgoat no as in user created type
02:18
Also, JS > Java non-codegolf because ... it's just better. I can't explain it.
Because in Java, you treat women everything like objects!
@Zacharý ... ok
@Zacharý It really isn't.
I would remove that message if I were you
@Pavel teascript is tea-cup you can take my testimony and name also implies that
02:19
@Zacharý In JS everything is an object
@Zacharý actually other way around >_<
Woman would be a class (i.e. not object)
@Downgoat Java logo is a cup of Java, the name implies that.
@ASCII-only But it doesn't feel like it.
@Zacharý how
@Pavel java is island(s) not a liquid
02:20
:|||||||||||||||||||||||||||||||||||| halp
i really really need an optimal rle length for charcoal
var a = 2; vs class Main { public static void main(String[]) { int a; } }. I hate boilerplate
@ASCII-only 32
idk what is max common run length in ascii art
02:20
@Downgoat Java is also a kinda of coffee
@Downgoat ok
@Pavel no there is coffee that comes from Java but Java is not coffee
@Zacharý That doesn't compile
@Downgoat ಠ_ಠ
@Zacharý not enough boilerplate, needs more to compile
@Pavel why does the name mean coffee, and not Java Sugar?
02:22
That better? I haven't used Java in forever, been programming APL and D.
@Zacharý you need argument name
@Zacharý Closer
also public class Main
Yes?
String[] args isn't strictly needed thoguh
02:22
@Downgoat IIRC it's needed for Java
Well you don't need to name it args
idk worked when I didn't include
public class Main { public static void main(String[] I_HATE_JAVA) { int a; } } <- THIS BETTER?
es
02:23
@Downgoat Class does not need to be public
void main(){int a;} is best.
You mean int main(){int a;} ?
(Assuming C/++)
interface M{static void main(String[]a){int a;}} is golfier (Java 8+)
9/10 Main can be shortened to one byte
02:25
VSL is best: var a:Int
That is worse.
That is so much worse.
D: I broke Proton
@Pavel why
> a: Int
a : ZZ32 = 0
02:25
Heresy
@Pavel how is that bad
Should be Int a
@Pavel then you can't do fn add(l left, r right) -> l + r
Should be System.DeclareVariable(System.A).Chain(System.A.DeclareType(System.Integer))
@Zacharý :| every variable is defined in System so much bloat
02:28
@ASCII-only I now know what that does, but I still disapprove of it.
It's not an actual language, it's a concept I have, where everything's an object, and everything is accessed like one.
@Pavel :| why
@Zacharý wait this can be done in vanilla JS
Suggestion: fn add(left as l, right as r) -> l + r
02:29
Nope. System.A would be undefined.
@ASCII-only s/can be/is
@Pavel ew no
Just no
@Zacharý But you can still access it
0/10 would throw sheep at
While I agree it isn't the best way, I do believe some keyword/syntax is needed to make it clearer.
@Pavel that keyword/syntax is called learning the basics of the language
02:31
Like this bloat-of-a-goat? System.StdIO.Write(System.Math.Two.Add(System.Math.One))
@Pavel Also what if you have fn rectangle(l len length, w width) -> canvas.drawRect(l, width)
@Zacharý holy shit this is too close to Java bigint API can't tell if joke or not
Not that this is recommended
I have a list of 100 objective reason doing function are name is better this way
#1 is that you can use prepositions
Which are great for command chain
>_< Can you imagine C without macros? >_<
02:32
yes
I never use macros anyway
I never use C anyway
I can C a C where you can't C any macros
6
Can you imagine converting every macro to a function by hand?!
@Zacharý does that include #include?
02:33
@ConorO'Brien No, just #define
@Zacharý convert to inline function -> magic it's almost exactly the same
@ASCII-only but even better because less likely for breakage
Yeah, D has no macros. I hate that when interfacing with C >_<, I have to write a wrapper function every time.
@Zacharý solution: use VSL with built in seamless C interopability
question: what datatypes should I add to Proton
I already have lists, tuples, and dicts. I'm going to add sets soon as well (but {} won't work because it's used for codeblocks)
02:39
Multisets, multidicts
what are those :o
Strings
Multiset is like this {1,1,2,3}, order doesn't matter, and you can have multiple values.
@ASCII-only why do you even need to have parameters with multiple names
02:40
oh so it's an unordered but not unduplicated thing
same with dict?
.o0(wait how would that word)
@HyperNeutrino [[1, 3, 5]]
but then what is a list of a list
( ͡° ͜ʖ ͡°)
[ [1, 3, 5] ]
that would be difficult to do
Another way to think about a multiset: A set of items paired with quantities. (For example, python's collections.Counter)
02:42
and that looks weird
@Challenger5 huh that's an interesting way to put it
That's how collections.Counter is described, I think
@Zacharý I only ever usually use #define for constants
@HyperNeutrino new Set([1, 3, 5])
@Pavel I was thinking of doing it that way (except it would be set([1, 3, 5]) which already exists)
new doesn't exist. Think of it like Python
@HyperNeutrino functions, numbers, rationals, bigints, stacks, trees, classes
02:43
RATIONALS.
Use sympy. But I could try to implement that as a built-in
Are round parenthese ever used not directly after the name of a function?
@Pavel tuples
Queues, Double Ended Queues.
@HyperNeutrino Oh right
02:44
tries, linked lists, doubly linked lists, pointers
@Zacharý arrays support that I think; use pop(0) for dequeue and pop() for pop from stack, or back-dedoublequeue
maybe structs too
note that functions and other objects are indistinguishable until runtime
Just completely mutable objects, like JS.
02:45
oh, and of course, don't forget to implement long long long
cent, 128 bit should be cent.
@ConorO'Brien lambdas exist (adding functions soon), numbers obviously exist :P, rationals would be interesting, bigints wouldn't be necessary since Python supports pretty big ints, stacks are just arrays but I could add them as specific things, I was considering adding trees and I'd have to think of a good syntax, and classes would look something like Python class defs
@HyperNeutrino I think pop(0) is O(n) performance though
@ConorO'Brien tries as in try/except? (exist) linked lists: interesting, would make a class for that. double-link-lists: same as link-lists. pointers.... probably not.
@HyperNeutrino rationals would be nice for, say, 3r4
02:46
@Challenger5 n being the length of the list?
Complex numbers, Quaternions.
@HyperNeutrino tries
@ConorO'Brien I could just make \d*\.\d+\s*/\d*\.\d+
@HyperNeutrino I think so. I'm not sure though
@HyperNeutrino afaict if you don't have pointers, linked lists wouldn't work terribly well
02:47
Pointers, Regexes
@Zacharý complex numbers exist because of Python, and quaternions... maybe
@Zacharý Ah, regexes. You could import re but I should add that too.
@ConorO'Brien Ah okay. Maybe not linked lists then either.
/ ... / if at all possible.
That would probably be possible, though then how would I distinguish it from say division?
For Positron, I think it was $ ... $
oo, symbolic math?
Same as JS does!
02:49
@ConorO'Brien sympy :P
You can import anything from Python into Proton
NOTICE ME SYMPY!
16
Proton is kind of like an extension of Python if you want to think of it that way
@Zacharý AAAAAAAAAAAAA why (starred though ಠ_ಠ)
it wouldn't work for positron, since the difference between division and regex is defined by adjacency; 3/4/5 has data before the "regex", whereas 3 + /3/ has on operator before the regex; positron splits statements on data adjacency
Because, it is.
@HyperNeutrino I just checked the docs, and it said preformance is O(k) (where k is the arg).
I think that's suspect, though, because I wouldn't expect that operation to be O(0)...
02:50
Is there a notice me Dennis meme already?
0
Q: Is "Polyglot the OEIS!" a dupe of "The versatile integer printer"?

programmer5000The recent question, Polyglot the OEIS!, has been VTCed as a duplicate of The versatile integer printer, however the community has not reached consensus on whether it is a dupe. Currently, it has been VTCed by the community, reopened, and is one vote from closing. The question: Is it a dupe? ...

please don't force "memes", they're almost always a bad idea
@ConorO'Brien oh actually that probably would work. Since / is neither a prefix nor a postfix operator, it wouldn't be matched after the binary_operator matching, so it might actually work if I check for /<expression>/. But then I need to prevent the things inside <expression> from getting tokenized...
@HyperNeutrino treat regex as a variant of a string
HOW IS THAT A DUPE?!
02:51
@Challenger5 That doesn't make sense though... O(any constant) is O(1).
Exactly
Wouldn't it be O(n) then?
@ConorO'Brien But I don't think that would work with the lexer then. It would get tokenized as division first, and if not, then division wouldn't be tokenized.
@Zacharý No big O notation ignores anything that isn't a term of the highest degree, and any constant coefficients
Oh, I thought since k varied or something similar.
well no, k is a constant based on the argument to pop, not the length :P
02:53
@HyperNeutrino I'm not entirely sure how your tokenizer works, but surely you could detect the invalid placement of a division operator?
Yeah, I don't think that's precise big O notation
@ConorO'Brien Actually, if I make my lexer look behind, then it would be able to
good enough
For practical purposes, I think performance will be Ok.
O notation's rigorous definition, is so ... impossible.
02:54
yeah if / comes after something that isn't an identifier or a literal, then it would be regex. hey good idea :D
When I looked at VSL's README.md, I was thinking "well, use D!"
Traceback (most recent call last):
  File "/opt/proton/proton", line 59, in <module>
    lang = interpreter.include('lang')
  File "/opt/proton/interpreter.py", line 14, in include
    with open(filename, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'lang.proton'
hard-refresh.
o_o_o_o
02:55
import re
print(re.match('He..o', 'Hello, World!').group(0))
shouldn't that go to stderr >.>
yes
I really need to fix that...
wait is there a sys.stderr.write()?
because I'm using print :D
For an array-oriented language, would this be good?
1 2 3+1 => 2 3 4
1 2 3+1 2 => (2 3)(3 4)(4 5)
1 2 3+1 1 2 => 2 3 5
@Zacharý I'd just like to mention that o_o_o_o is extremely hard to type.
@HyperNeutrino You can do print(msg, file=sys.stderr)
oh cool. thanks
@Zacharý yes probably.
anyway I gtg now. bye o/
02:58
@Zacharý How about this:
1 2 3 + 1 2 => 2 4 4
That's just cycling the elements of the second one if it's too short, which is consistent with the first and third
It's not very useful, though
@Zacharý 1st and 3rd examples are good and canon. 2nd example is a little dubious, since you wouldn't be able to replicate that as succinctly for other size lists. How about 1 2 3 + 1 2 => 1 2 3 + (1 2 1 2...).slice(0, 3) => 1 2 3 + 1 2 1 => 2 4 4, or, 1 2 3 + 1 2 => 1 2 3 + 1 2 0 => 2 4 3
@Challenger5 I think that's how CJam does vectorized operations

« first day (2388 days earlier)      last day (2753 days later) »