« first day (207 days earlier)      last day (750 days later) » 
00:00 - 08:0008:00 - 15:00

8:00 AM
@Phoenix any other languages you think have good ideas for VSL to draw from?
 
What is meant to be the purpose of VSL?
 
I've recently discovered you can apply the C preproccesor to arbitrary files and I've been trying to find excuses to use it for everything, but unfortunately everything already has something to replace the preproccesor with a better thing.
 
@KritixiLithos an adaptive-level language I guess
as in it will compile to machine code if possible, also have an interpreter
 
@ASCII-only Prolog :P
 
adaptive meaning it's high level when it's needed, low level when it's needed
 
8:03 AM
@ASCII-only Maybe something like bash, pipes and stuff
And streams
 
@KritixiLithos as in function chaining?
@Phoenix what feature(s) in prolog exactly
 
That was a joke. Prolog does its own thing.
 
I was thinking something like Röda where you can do stuff like this: seq(1,7) | print(_.." "). So yeah, I guess you could call it function chaining
 
@Phoenix Well, I mean a lot of prolog syntax is the same
prolog-style overloads aren't as easy to do though
 
Are you thinking about have variables with fixed types (more like Java), or types that can change (like Python)?
 
8:05 AM
@KritixiLithos well since | is bitwise or it can't be used for pipes
@KritixiLithos fixed types
 
when (x==0) { /*do stuff*/ } creates an event which will do nothing at first but keep checking the condition until it is met, and then runs once. Alternatively, on(signal) { /*do stuff*/ }, alert(signal); causes everything waiting for signal to execute.
 
changeable types should be able to be implemented by upcasting to any
@Phoenix keep checking = bad because doesn't it cause insane processor load
@Phoenix waiting?
do you mean await (and async)
 
Basically. That there is Zilch syntax, which is a custom language I worked with once, and is not great.
 
@ASCII-only then that's fine
what are you going to do about regex?
 
@KritixiLithos what about it
 
8:10 AM
Which flavor/engine
 
@Phoenix definitely pcre
we'll only change it if we manage to bootstrap
@Phoenix hmm on(event: Event) is fine
 
but with flags to do Perl6 and Ruby, maybe?
 
@Phoenix what would be the point
 
idk
Perl6 regexes are more powerful
Symbolic manipulation. If a is undefined, it's not an error, it's just the literal symbol a. If a gets defined at some point, any expression containing it will be able to evaluate fully.
That's another mathematica thing
 
@Phoenix what do you mean by a "literal symbol"?
 
8:20 AM
It is the variable a, just not defined as anything yet.
@KritixiLithos Try it online!
Notice, no error.
 
@Phoenix Not a good idea for a compiled language
 
tru
 
but in the interpreter it's fine, and when compiling it can just be converted into a string if it doesn't exist in the scope
@Phoenix pls no i don't want to have to bundle two entire interpreters just for more regex
 
Nah, compiled and interpreted should behave the same.
 
@Phoenix hmm ok
 
8:23 AM
It was a bad idea
Although, Print@CompiledFunction[a+3&][] is a thing that works.
 
then it will be converted to a string if it doesn't exist (also bad idea but useful if you want things to look natural)
 
Somehow
 
@Phoenix why would it not work
 
Because a isn't defined anywhere.
 
oh also we will have enums as well as symbols (symbol = :foo = turned into an integer id at runtime/compile time for equality checking)
 
8:25 AM
That works
Actual idea: Classes can define a .toString() method, called by print, and a .toNum() method, called by mathematical operators. Basically the poor man's operator overload.
 
@Phoenix well yeah, you said yourself Mathematica (or Mathics in this case) keepsit as a symbol if it's undefined
@Phoenix no, we already have cast definition syntax
operator String(MyType mytype) { return mytype.stuffAndThings; }
 
@ASCII-only But it compiles is to processor instructions directly.
 
@ASCII-only what's the operator do?
 
@KritixiLithos tells VSL it's an operator
in this case since it isn't a symbol it's a cast operator
@Phoenix well yeah but that doesn't mean it compiles to a low level function e.g. it doesn't turn them into int operations, the numbers in the expression are still adaptive precision
 
so can you do stuff like operator ^(int a, int b) {return pow(a, b);}?
 
8:32 AM
oh btw i'm thinking of having subscript operators with function argument builtin, is this a good idea
 
I believe that is also how it works in C/++
 
or will it be interpreted like a function so that you have to do a ^ b to call it?
 
@ASCII-only Example?
 
e.g. dict[?==1] is the same as dict.filter(?==1)
@KritixiLithos yes
@Phoenix *C(++|#)
 
@ASCII-only Yeah, sure
 
8:34 AM
idea stolen from R
 
Custom iterator definitions for objects
 
@Phoenix oh, so for foreach?
 
Ye
 
@Phoenix any ideas for nice syntax?
 
Java has implements Iterator<T>, then requires you to implement next() and hasNext()
 
8:39 AM
GetEnumerable is not builtin syntax, next and hasNext is to OOP imo
 
Python's yield maybe?
 
@Phoenix yeah that's what we're doing for normal iterators as well
but i mean nice syntax to define it in a class
 
public iterator -> T { yield foo }
 
@Phoenix hmm idk, i don't think this really needs a new keyword
also we will need a way to get an iterator function
so maybe we do need to implement as a function
 
In which case, next and hasNext is probably the best way.
 
8:44 AM
@Phoenix this is probably the best idea
VSL will automatically cache on hasNext
*cache the result from a normal iterator
 
 
5 hours later…
2:01 PM
@ASCII-only you mean with the caching flag or whatever it's called
For regex we will have to use modified version of pcre
 
how are you going to modify it?
 
Minor stuff with Unicode etc.
@Phoenix most likely were going to implement Iterable and with that we'll inherit a subscript
@KritixiLithos specifically static func ^(lhs: Int, rhs: Int) -> Int is header
casts may or may not be a thing
youre going to have JS like typing which no one likes so It might just be through constructors
 
00:00 - 08:0008:00 - 15:00

« first day (207 days earlier)      last day (750 days later) »