« first day    last day (84 days later) » 

3:54 AM
hmm what do we want for numbers? big number support would be nice
@ASCII-only
 
Yeah
Just use this
 
how many decimal places should be the default?
 
Uhh
I'd say arbitrary
Because you need way more precision for the inputs to get some target precision
 
4:10 AM
@ASCII-only yeah, thinking that too, looking if that's possible
 
Charcoal kinda does it
Mostly doesn't :P
 
SOGL just has 200 or 1000 idk
ideally it'd be max(200, max(inputDecimalPlaces) + ±20)
oh, BigNumber doesn't have division that throws errors on infinite decimal representation. SOGL java does infinite precision when possible and just attempts to limit to 200 when errors happen
oh cool, BigNumber actually does do infinite precision, it only looses precision to the configs amount only when dividing
 
Side note: Charcoal things are very broken
More specifically, Wolfram's N
 
what even is that
 
Pi shaded according to grayscale lol
 
4:23 AM
oh charcoals negate is ±
 
Yeah
 
same for SOGL
dammit js why you need this. everywhere
 
4:43 AM
new (function() {
  this.ptr = cptr;
  this.start = cptr;
  this.end = tokens.length;
  this.next = () => {
    if (this.ptr < this.end-1) this.ptr++;
    else return false;
    return true;
  }
})()
half of this feels unnecessary lol
 
wait what
I'd say you don't need start or end
also what does next do
 
that object is meant to go on the pointer stack
along with loops and ifs (or maybe not ifs idk)
next just tells it to move forward
new (function(iteratable, cptr) {
  this.ptr = cptr;
  this.start = cptr;
  this.end = findEnd(cptr);
  this.iteratable = iteratable instanceof BigNumber? functions["1rangeIncl"](iteratable) : iteratable;
  this.counter = 0;
  this.next = () => {
    if (this.ptr < this.end-1) this.ptr++;
    else return this.cont()
    return true;
  }
  this.cont = () => {
    if (counter < iteratable.length) {
      push(iteratable[counter])
      counter++;
    } else return false;
  }
})(a)
that's the object for an iterate function
 
wait
shouldn't we do this the cjam way
 
@ASCII-only what is that?
 
detect blocks -> push them as objects
so no loop body needed
 
4:50 AM
ah
 
like maybe <if_command><body><closing_brace>
 
question: how is that better than a pointer/object stack
 
???
@dzaima :/ cannot read this halp
 
@ASCII-only that's the thing :p
rn I just have a stack of objects like that which contain their pointer and have a next function which, for the top/newest object, is called at the end of each tokens execution and it decides what to do
 
function tokenize(string) {
    var words = string.split(' '), i = 0;
    while (i < words.length) {
        var word = words[i];
        if (word[0] === '"' && word[word.length - 1] !== '"') words.splice(i, 2, words[i] + words[i + 1]) else i++;
        return words;
    }
}
 
4:58 AM
I've go a tokenizer already
actually github repo?
 
???
 
the basic syntax and stack almost work
 
yay :D
 
run("3 6 +")
main.js:84 3@0: ["3"]
main.js:84 6@1: ["3","6"]
main.js:84 +@2: ["3undefined"]
wat
push( ) that explains it (that's the + functions definition)
 
5:51 AM
oh, uneval isn't a standard function :/
 
@dzaima ???
 
@ASCII-only the javascript (well, firefox javascript) function uneval() which is like pythons repr
 
@dzaima Well you can use JSON.stringify :P
 
ah, JSON.stringify() works for what I needed it
ninja'd
it works!
 
woah nice
 
5:57 AM
that contains all the added functions :p
what next
 
make sure "foo bar" works properly
 
(old output was left there and %20 is a side-effect of output laziness)
 
Okay cool
If you want, then next is arithmetic I guess?
or maybe a loop?
 
the 1st screenshot has an iterating loop
 
oh wait it does :O
*while/if then
also maybe rename iterate to for?
 
6:04 AM
@ASCII-only I'd say for each as it iterates trough a given thing (or a range if on a number) but that's 2 words
 
right
@dzaima oops lol this is how Charcoal's for works
 
how about repeat which repeats pop times if that's a number, but on strings/arrays it pushes the index instead of item
 
pushes the index?
 
like "hello" repeat output would output 1 2 3 4 5
oh yeah 1-based or 0-based
 
right
 
6:07 AM
I say 1-based
 
okay
note: we might need to change later if it's less golfy
 
can't see why it would be less golfy
 
wait a sec
 
as then the index can also be used as a boolean with 0 being not found (but if used anyway would wrap around)
 
isn't this count not repeat
 
6:10 AM
@ASCII-only maybe "hello" repeat 2 + output end outputting 3 4 5 6 7 would've been a better example
or if that's not useful then just disable repeat after strings/arrays :p
 
idk
I don't think we need repeat at all
 
well in SOGL it's been quite useful
(for numbers)
 
example pls
how is it more useful than an iterate
 
hold on looking trough my SOGL scraped answers
out of the 95 answers I've got there, there were 15 [0-9\.]{ matches (in SOGL . takes number input)
there were 86 total uses of { but it's got other uses too
so it looks like that's had ~25 uses
 
pls link tyvm
 
6:21 AM
oh yeah and SOGL has ⌡ which really only works on numbers and is basically repeat with only one instruction allowed before end
@ASCII-only to what
⌡ has 24 uses
 
Or what can repeat do that iterate can't
 
@ASCII-only well iterate can replace everything, it's just that it can waste a byte if the number of which iteration it is isn't used
 
iteration isn't used?
:/ doesn't repeat push iteration too
 
my idea was that iterate always pushes the current item iterating over while repeat pushes nothing if it's given a number
 
@dzaima right, okay
 
6:30 AM
for example, a way to duplicate ToS 5 times would be 5 repeat duplicate end
 
So yeah I think you should just allow it for numbers
 
6:47 AM
a question is how much do we want to finish the verbose language before making the disabling & tree stuff
 
IDK
Up to you really
But one thing we definitely need is a corpus of programs
 
oh, for the tree optimization? That can come later, after there is an actual tree to optimize
 
No
For tree generation
 
for starters the tree could be simply everything equal
 
Oh so you want to get things working first
 
6:54 AM
yeah :p
 
okay fair enough
So we can probably start now I guess
Step 1: create a pseudo-interpreter
with only types I guess
 
@ASCII-only about that I really don't know. Then it couldn't really get the stack types after something like 5 repeat 19 "string" end
 
Yeah :/
Hang on
We use probability then I guess
If there are multiple possible states then just average the probabilities
 
my idea was that it'd be ~a full interpreter but after inconsistent length loops it starts over
@ASCII-only average of string and number = ?
 
???
@dzaima :/ what
fair enough
but what do you mean by starts over
 
7:02 AM
after "string" 2 random if 3 end ToS could be either string ("string") or number (3)
@ASCII-only probably just assumes that the stack is full of random type objects
 
but it doesn't need to start over if the looping amount is constant
 
I think it should start over completely
Just assume the stack has an unknown number of whatever the loop pushes
 
the loop could also delete stuff so that gets complicated fast
the loop can also push 0 of what it pushes
I'm open to other ideas on how to handle loops or everything though
 
rip lol
 
 
3 hours later…
10:08 AM
oh rip I'm gonna be away for ~2 days :/
 
D: oh no
put it on GitHub maybe?
 
repo name?
or rn a gist
 
anything
Chimera maybe?
Or something that indicates it changes a lot every commit lol
 
@ASCII-only too late
 
> 1rangeIncl
ok
 
10:11 AM
call as run('"string" + output', ["input 1", "input 2"])
 
@dzaima ty
 
@ASCII-only I wanted to be descriptive - starts with 1 and includes the input number
 
I would have gone for maybe [1,input] or (0,input]
 
oh yeah special characters can be parts of tokens
well you do that
 
Okay
 
10:18 AM
I also made sketchy but seemingly working ifs
 
sketchy?
 
they use the same method that loops use for moving the pointer although it's really not necessary
 
right
 
10:42 AM
gotta go very soon, have fun working (or not) on this :D
 

« first day    last day (84 days later) »