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

12:01 AM
@Downgoat hi
 
@ASCII-only problem:
#0 0x00007f9eb1723338 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/bin/../lib64/libLLVM-3.9.so+0x643338)
#1 0x00007f9eb172145e llvm::sys::RunSignalHandlers() (/usr/bin/../lib64/libLLVM-3.9.so+0x64145e)
#2 0x00007f9eb172159a (/usr/bin/../lib64/libLLVM-3.9.so+0x64159a)
#3 0x00007f9eb0ed35c0 __restore_rt (/usr/bin/../lib64/libpthread.so.0+0x115c0)
#4 0x00007f9eb407c019
#5 0x00007f9eb407c041
#6 0x00007f9eb2445a15 llvm::MCJIT::runFunction(llvm::Function*, llvm::ArrayRef<llvm::GenericValue>) (/usr/bin/../lib64/libLLVM-3.9.so+0x1365a15)
scary segfualt is scary
okay now outputting random gibberish:
þ*‘}Ú
Question: how to print a char with puts
oh
I think I need to add null byte
AWWW YISSS
IT WORK
YAAAASSSSSS
 
12:50 AM
@ASCII-only halo I have quesiton
does this look correct:
unsigned int __vslcount(char* string) {
unsigned int c = 0;
while(*(string + sizeof(char) * c) != 0) c++;
return c;
}
it gets length of string
e.g. "foo\0" returns 3
 
@Downgoat yeah
 
:/ it segfaulst
:(
 
@Downgoat while(string[c]) c++;, or for (;string[c];c++); should work?
 
yeah but doing in LLVM
 
@Downgoat wait is that valid llvm
 
12:54 AM
no its C
 
@Downgoat ok wdym
 
like i literally translated to C
0/10 LLVM very difficult
 
@Downgoat pls link to segfault
 
A bit faster than doing one byte at a time
but y'know
You're going to have to link to glibc eventually
if you wish to maintain sanity
 
1:01 AM
Why?
 
1. not as portable as we like (can likely find solution but not main reason) 2. will likely be wrapped in libvsl
hm, bundling clang is totally unviable for obvious reason
also ABI problem
 
@Downgoat why did you post hello world twie
 
wait wat
https://tio2.tryitonline.nz/nexus/llvm#lVLNasMwDL77KXQJtMEbSTZGKAz2HqUEx3FagWNnjlu6jT72zp0cN81K2WEnC38/1if53CiphVOATwW89Xs/LLBMl4w1qkVzua6qw6Afpd0bH1BI0BBzCV8MoHagRa00JI4xt6KbBOEV@h2O2jVkHJIMNpzKpKLawSaQeiJ9qqMfWSTxFvDleUSCfqu80qpTxvfeAZqaHm8GwJLD3AEPEhIE1YFE2opmpvTIQWjcGsgDoSKCaJrLezxeSrpE2fWg3klELhyyGApzQvmUreW/UrYhpVNT6@x0O61OoFlQNbaRhilRCvcRRPRia@19vDKNZEjymCmPZPTdHOvKIYsICwKl0PqvLfluGYkHoUN6ra0UsC7gSE4bFjFqIL/raOLwa5WOLrG77HJcDYp/GuSTQXSoSe7d3sg4UTF@hnLEBm/D56TV1NNaqd9bKJuRgkXLeSrTl47COI9pdxk7nc/fxj5IIXfqBw
I feel like problem is here:
%foo = getelementptr i8*, i8** %1, i64 1
idk
@quartata even if I use glibc problem is still not fix
@ASCII-only actually we can look at node.js source and copy
 
I just mean you'll be using glibc sooner or later. Unless you want to do this yourself.
 
looks fun
 
1:06 AM
@Downgoat is %0 in phi calling scope thing
 
yeah
llvm ref sucks :(
 
@Downgoat Really? Because it doesn't to me. That right there is just the implementation of sin and cos
 
@quartata btw have you gotten started on pytek compilation
 
Bits and pieces
 
I can just copy + paste into clang
but was sarcasm >_> :P
 
1:08 AM
It can emit code but has trouble with certain things
 
@quartata how is your 1) ABI 2) startup code (i.e. loading argv into pytek string[], setting up process & co. items)
@ASCII-only btw I think we're going to need full GC because ref counting isn't practical for VSL imo
we'll have to see how goes
@ASCII-only btw do we have array yet
 
Yes although I probably broke it a couple months ago
 
sorry >_>
 
I can't do much serious dev without El'endia who hasn't worked on it in 6+ months
 
D:
 
1:13 AM
@Downgoat syntax? yes
@quartata 0/10 you should be able to do it yourself
 
Eh.
 
@quartata I could try to help, but it's more likely that I break it and take like a day to find the bug I introduced :P
 
ABI is regular C++ mangling + magic identifier for importing in interpreter
 
1:41 AM
@ASCII-only pls VSL first :P
@quartata if pytek is not going anywhere ATM can you help with vsl? :O :3 :3 :3
 
 
2 hours later…
3:21 AM
nope
 
;_;
 
I mean what did you expect, look at your starboard
 
@quartata But most of that is from last year :(
 
also I'm too busy anyways
 
@quartata I have question: how are you linking Pytek types with internal implementation
 
3:28 AM
Hm?
 
like if you have like
\class{PytekString}{
    \func{split}(seperator) internal
}
(made up syntax based on what I think pytek looks like)
how would you make split emit internally generated code
 
Good question. Currently built ins are defined purely inside the compiler, but I would like to do what you're describing (which Java also does: native) and make it so you can have the signature in a source file and the implementation internal
 
@ASCII-only Please grant write-access to the C9
 
type:PytekString {
  (native func):split(separator);
}
Backslash free :P
(@Downgoat)
 
@ATaco done
 
3:41 AM
since I forgot to use reply after that wall of text
 
<3
 
@quartata so do you like check if (identifier in listOfAllNativeFunctions) identifier.replaceWith(nativeAlternative)
I was thinking of defining stuff in libvsl
but I am not sure how that would play with namespaces and all
 
What print function are you going with? There's like several dozen.
 
@Phoenix likely just print(Any)
what specifically do you mean?
 
printf, println
 
3:45 AM
I was thinking we'd just pipe to `puts(string + "\n\0")
would be most crossplatform way i think
 
But also wondering if you were doing something edgy like PutStrLn
 
unforunetly i am suppose to support stupid windows which doesn't like normal POSIX function
@Phoenix that is haskell right?
 
Ye
 
We could do Console.print
because we might have multiple streams
e.g. File(name: "foo.txt").print("asdf")
 
@Downgoat Essentially. Interpreter works like that too
 
3:46 AM
but that doesn't make much sense
 
I might put them in a header file though with the types
Then it's the C compiler's problem
 
I'm trying to read this source, and I'm pretty lost tbh
 
so if native functions are in C/C++, with a typical C++ ABI, how are you going to handle namespaces?
Or are you going to demangle C++ stuffs
@ATaco what part is confusing
 
@Downgoat But if you want, you can do from Console static import print; and access it directly?
 
The structure.
 
3:47 AM
source code documentation: vsl-lang.github.io/VSL
 
Not the language structure; the Implementation structure.
 
@ATaco so the compilation happens in a couple parts:
 
C++ has a builtin for demangling y'know :P
 
Is it called switching to something readable like Ruby?
 
Parser (outputs AST) -> Transformer (mutates AST, resolves scopes etc.) -> Generator (outputs LLVM IR)
 
3:48 AM
ReSharper++ FTW btw
 
Check out cxxabi.h
 
@quartata ik, but that gives a string. are you going to parse the C++ type e.g. Pytek::String<...>... stuff and then use that?
@ASCII-only I was thinking we would do:
 
Not sure what you mean?
 
sorry I did not finish that message >_>
 
Static imports: For or against?
 
3:51 AM
public class String {
    init(int: Int) internal("__vsl_string_init")
}
 
Oh OK now I get what you mean
 
then we would setup LLVM to lookup String(int:) to __vsl_string_init
 
I guess demangling is not so much what we need as it is mangling: we have a Pytek type signature which can be converted into a list of C++ type signatures, and from that we want the symbol
I've been hunting around for something that will do this
 
oh hey mangling, that's what I am stuck on right now
I mean it's not that difficult
but not sure best way to implement
 
We need it mangled to the same thing as whatever the compiler uses though
 
3:55 AM
As far as I can tell, VSL is a language that started trying to be a scripting language, but ends up being "C, but better" with JS kludged in.
 
@Phoenix wat
 
C and JS are almost polar opposites
 
VSL is like Java + Haskell + C# + Swift
 
If it is, then someone changed a lot of high-level design ideas and didn't update the hackmd.
 
The only C is that it 1) compiles to LLVM (which represents C concepts_ 2) libvsl is likely to be coded in C
@Phoenix yeah, this has happened
if you want to get a taste of syntax check here: github.com/vsl-lang/VSL/tree/master/src/vsl/stl
 
3:57 AM
@Phoenix IMO it's still supposed to be a scripting language, it's just we're doing the easy parts (compilation) first
 
GitHub is blocked ;-;. Will look at it later.
 
so we can bootstrap
 
I guess I understand what you were trying to say better now which is how do you know the native isn't shadowed
 
> easy parts (compilation)
 
I can check the scopes but it would be better to have gcc do that for me
 
3:58 AM
are you compiling to C/C++?
wait shit that is good idea
 
Which is why I'll probably move it to a header only library
Yes
 
though if you do that then JIT performance would be sub-optimal
 
I told you that almost a year ago
 
unless you're going to JIT some other way
 
We don't care
If you're not compiling then you don't care about performance
That's why we have a regular interpreter in addition
Also used to resolve compile time directives potentially
 
4:00 AM
@quartata I mean performance is one thing, being not-very-slow is another :P >_>
 
We're hoping not to be Cheddar slow
I mean we aren't
 
if you JIT through GCC you will
also excuse me
 
More like not Perl 6 slow for comparison
 
@ASCII-only wait shit I closed LLVM tab did I send you a link
oh no
welp there goes 2 hours
 
@Downgoat We aren't JIT period
GCC only comes into play in AOT compilation. Then there's either regular interpreter or JS compilation
 
4:03 AM
Why do you need an AOT compiler, a JS compiler, and an interpreter?
 
^
it took C like 30 years to get to that state :P
 
One for speed, one for browsers, one for portability and prototyping
 
C has a JS compiler and an interpreter?
 
@quartata why not just do C compile and emscripten
 
emscripten and tcc
 
4:04 AM
I think emscripten can do DOM
@Phoenix emscripten, and lots of interpreter
 
@Downgoat because we can do it better than emscripten would
 
ok we'll see
 
when one's type system has already been through one transpiler a lot is lost in translation
 
If I'm understanding this properly, VSL uses the C/++ standard library?
 
cut the middleman and get sane output
 
4:07 AM
@Phoenix no
but we are planning to implement VSL standard library in C
 
Like translating from Klingon to Chinese then to English
 
@quartata more like English to Spanish to Chinese
 
You could have made this a JVM/.NET language. And then you don't need to write a standard library.
 
aaaahhhhhhh
 
Also emscripten couldn't transpile some things we'd do
like context switching
 
4:09 AM
example?
 
Coroutines
I haven't gotten to it yet but assembly magic may be required
 
like code example of JS you need
because you can always write pytek_lib.js and include
 
Not a standard library thing really
 
in JS everything is library thing
lets not forget we literally outsourced entire DOM management/state mangement/network requests to a shitty JS library for like years
 
Which one was that?
 
4:11 AM
jquery
It would compile to a chain of function*s I guess
 
Right
I never figured out JQuery. It didn't like me.
 
One global context that switched to child generator "coroutines" when yielded out
Hmm
 
Allow executing arbitrary V code for text manipulation.
That is a good and not a terrible idea
 
I almost fantasized about adding a Grime interpreter to the standard library
I'm still not convinced it would be a terrible idea
It's written in Haskell right now which wouldn't be too hard to rewrite
 
.NET/Java interop would be amazing. I wonder how difficult that would be to achieve.
 
4:18 AM
It's been done
At least in the .NET -> Java direction
 
Well, to be fair, they did rewrite Java for .NET and called it J#
 
ikvm.net for .NET -> Java
Java on JVM -> .NET is a different story
 
Right, but what we're considering is VSL -> Java
 
this is possible
 
JVM is a pretty nice VM.
Jasmine can be used as a human readable IR for it
 
4:23 AM
Or VSL -> .NET, depending on how much you trust Mono.
 
.NET core
Mono will be dead in ~5 years
 
Hopefully, but apparently .NET Core is also unstable.
 
the way VSL is written it should be trivial to port to another assembler
 
It's getting better, but more importantly MS seems willing to throw money at it
That gives me confidence that they'll make it work
There's a difference between "hobby project by MS employees" and "something they're spending money on"
 
This recent Open Source/Linux trend from microsoft has been pretty great overall.
12
A: How do I call a .NET assembly from C/C++?

Francis B.[Guid("123565C4-C5FA-4512-A560-1D47F9FDFA20")] public interface IConfig { [DispId(1)] string Destination{ get; } [DispId(2)] void Unserialize(); [DispId(3)] void Serialize(); } [ComVisible(true)] [Guid("12AC8095-BD27-4de8-A30B-991940666927")] [ClassInterface(ClassInterf...

Probably not as scary for people who know C++, but to me it's pretty scary.
 
 
1 hour later…
5:55 AM
@Phoenix pls no, JVM/.NET is fine, Java/C# is not
 
I meant VSL -> .NET
@ASCII-only I fully concur, I kind of thought it was implied. Personally I would prefer .NET Core
 
@Phoenix so we're still doing LLVM IR right?
so the CLR will just be another target
also wasm and the JVM
 
If it was my decision, it would be a .NET language, but it is not my decision, and I can see why people wouldn't want to do that.
 
@Phoenix It's fine
just the .NET VM si overkill for some things
 
You are trying to make a practical language though, right? I think a lot of people could get behind "C#, but better"
 
6:22 AM
Idea: env.command("arg") is the equivalent of executing command arg in bash, e.g. env.rm("-rf", "~/foo")
env.eval("foo") lets you execute long complex commands.
Actually that doesn't work if you're trying to invoke something like ./foo
 
6:38 AM
Other idea: func type.foo( x : int) -> Void { ... } is equivalent to func foo( this : type, x int ) -> Void { ... } and can also be called as object.foo(3) being the same as foo(object, 3), however it requires that type does not already have such a function.
So many times I've wished I could define my own e.g. string reverse function that I could call as "foo".reverse() and not necessarily reverse("foo")
 
@Phoenix pls no
 
I kind of realized why it doesn't work halfway through
 
syntax for shell command is `command`
@Phoenix In JS?
 
In Java and C#
 
@Phoenix pls no this is not OOP
@Phoenix ... They both have extension methods, so you can do that
 
6:50 AM
I can
I think my life has just been changed
*StackOverflows*
I should sleep it's getting late.
I *might* still think of an actual good idea though
 
For extension methods we're stealing Ruby's class reopening
 
Can we steal Mathematica's Apply syntax?
foo[bar] is equivalent to foo@bar, foo[bar, baz] is equivalent to foo@@{bar, baz}
Where [] denote function arguments and {} denote lists
 
@Phoenix JS has that, [].__proto__.map.call([1,2,3], _=>_*2), [].__proto__.map.apply([1,2,3], [_=>_*2])
 
Is most of that just noise that you used to show an example, or do you actually need the .__proto__?
Because @ is actually convenient to use.
 
@Phoenix well you need it for class methods (which Mathematica does not have)
eval.apply(null, ['1+1'])
 
6:57 AM
I think I like Mathematica's way more.
I'm also fond of it's lambdas, but I know they aren't for everyone.
 
@Phoenix well in general too many globals = bad
 
They don't have to be for globals.
 
But I think it's fine
 
Instead of foo.bar(baz), foo.bar@baz
 
@Phoenix why @
 
7:03 AM
Because that's how Mathematica does it.
 
@Phoenix pls no this is not a wolfram language implementation
 
I suppose it doesn't need to be @, but I can't think of any other character that would fit.
 
@Phoenix @ is fine but what i mean is: When is this useful?
 
It's not that useful, but it does help prevent foo(bar(baz(bla(dur())))) parenthesis bloat. It's mostly for code readability.
 
@Phoenix oh that is what function chaining is for in sane functional languages
foo, bar, baz ~> quux :> somefunction, someotherfunction :> alsoafunction
Stolen from pytek
 
7:09 AM
The @@ and @@@ notations are useful though. (@@@ is @@ but it flattens the list)
 
@Phoenix hmm ok will add
 
If I have a function f that returns {"foo%d/%d",5}, I might do printf@@@{f(),3}
That isn't the best example, but it does show show it could be used.
 
hmm ok any other ideas?
 
Mostly mathematica inspired ones which are largely impractical.
 
@Phoenix pls give example
 
7:15 AM
Instead of (n,m)->n+m lambdas, #+#2& lambdas.
It's golfier but less readable.
Symbols for irrational numbers which have an N method to yield a decimal representation
 
@Phoenix Well in VSL it will be {$1+$2}
 
And $ is shorthand for $1?
 
@Phoenix no it's shorthand for current scope
 
In mathematica style that would be $$
 
$$var is shorthand for var in parent scope
$$ is parent scope
 
7:18 AM
I like your thing though.
 
but hmm # may be a good character to use for whatevers
 
It's a scripting language, you need #! support.
There is a problem with the Mathematica lambda syntax. Lambdas that return lambdas are a PITA.
 
@Phoenix {{;}} (because {} is object)
 
I mean it get's confused which variables belong to which lambda.
 
@Phoenix true
@Phoenix oh haha
that's not a problem with the syntax then, it's a problem with the implementation
on second thought: ? can be overloaded used for whatevers
 
7:23 AM
It is a problem with the syntax. $1 references an argument in the inner lambda, how do you reference the first argument to the parent lambda?
? should be ternary.
 
@Phoenix Each lambda has its own scope: {let foo = 1; {$$foo += 1}()}
 
?. should be C#'s null safe operator.
 
@Phoenix It will be
@Phoenix Yeah, it already is
 
?: is the null coalescing operator?
 
@Phoenix ||
 
7:25 AM
Oh right
?: could still be useful if you care specifically about null and do want to accept 0
 
@Phoenix ok true
 
I hear that some people like the Maybe monad/Java's Optional, but tbh I don't see the point when null is a thing that exists.
 
@Phoenix ...
 
That's a nullable int
That's not an Optional
 
@Phoenix Oh that's to prevent NullPointerExceptions
 
7:31 AM
So instead of NullPointerException you have NoSuchElementException
 
Since we're solving that the C# way (?.) we don't need that
 
Yep
 
@Phoenix yes that's why people don't use java :P
Java: hey look we solved the NullPointerException problem, here's another exception that is thrown instead
 
Idea for lists: ?{foo,bar,baz} becomes {foo,baz} if bar is null.
(That particular syntax is bad but you get the idea)
 
@Phoenix 0/10 remember this is a scripting language (also a sane one) so it uses [] for lists and {} for sets
 
7:34 AM
Right.
[?element1,element2] is a nonnullable list literal, which acts like a normal list but any null is removed.
It's a distinct type from a normal lists, so if you try to put null in there later nothing will happen.
 
@Phoenix hmm when is that useful
 
Golfing and no other application I can think of at the moment.
I'm trying though
Maybe if you have a list of the first indices of a in some strings, and you end up with a bunch of nulls for strings that don't have a in them, so you don't want to do anything with those.
 
@Phoenix it's normally -1 for not found
 
That's a remnant from when ints couldn't be nullable. I think having it be null makes more sense.
int?s are
I'm told nullable ints are like the reason F# works
I don't know F# though so I can't tell.
 
@Phoenix yeah but nullables are slower so bad idea most of the time, plus in normal languages it's super verbose to unbox
 
7:43 AM
Right, or you could do the trick where instead of Integer.MIN_VALUE being -2^32, it's -2^32+1, and -2^32 represents null
@ASCII-only it's not at all verbose in C#
Actually, that trick is what C# does iirc
Fuck it, why not just use .NET System.int32 and make it a .NET lang
...
I need sleep
 
because .NET is overkill
 
Yes
 
@Phoenix hmm true
 
Nullable value types should be a thing either way
 
@Phoenix yeah definitely
 
7:52 AM
Small idea: deprecated keyword, e.g. deprecated public foo() -> Void { ... }. Doesn't do anything but causes a compiler warning: "function foo is deprecated". deprecated<bar> public foo() would say "function foo is deprecated, use bar instead."
 
@Phoenix that will be an annotation: @Deprecated
 
Annotations are neat.
Maybe C# style annotations, if @ is apply? They wouldn't actually be confused by the compiler since there wouldn't be anything before the @ in annotations, but for readability.
 
@Phoenix I don't think that makes it more readable
annotations and apply should generally not be used together
 
yeah you're probably right.
 
since apply is a functional thing, annotations are an OOP thing
 
7:57 AM
Also [annotation] is a list, so that's even worse.
 
hmm ok
 
00:00 - 08:0008:00 - 15:00

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