« first day (210 days earlier)      last day (747 days later) » 

12:43 AM
@Downgoat ok so
idk about as?, as! and try?
ok first
what is difference between as? and as!
 
as! is OO-cast and will throw error if cast fail
as? is OO-cast and will return nil if fail
 
@Downgoat that's what normal as should do
 
normal as will ensure cast will never fail
i.e. throw compile-time error is possibility of fail
 
ok wat
 
e.g. downcast may fail
but upcast can be done with as as upcast can never fail
like if I do let someAnimal = Dog as Animal and then do someAnimal as Goat, that will fail
 
12:48 AM
@Downgoat isn't normal as just neverfail::MyType
 
that is for non-OO cast
 
what why different cast 0/10
 
because do different things
:: can comile to list a zest or a sext instruction
as needs much more complex type alignment stuffs
we should get SO tag going for VSL when start to work
 
1:25 AM
@ASCII-only btw things that need to be parsed: github.com/vsl-lang/VSL/…
 
2:04 AM
@Downgoat :(
 
@ASCII-only D: y y haet zests and sexts ;_;
shit came out wrong
 
@Downgoat haha
@Downgoat no i mean why can't you just special case non oo cast
 
Too complex
And slow
 
0/10 how
 
Because then have to manually determine inheritance and all
 
2:12 AM
@Downgoat ???
 
@ASCII-only like we'd then need a more complex verification stage
idk if you don't want two we don't need to have two
but as is kinda long:
e.g.:
pow(base: base as Double, power: power as Double)
compared to:
pow(base: Double::base, power: Double::power)
 
@Downgoat yeah i meant use :: instead of as
@Downgoat O_o you can use casts in function arglists?
 
why not?
 
2:37 AM
@Downgoat what does that even do
 
convert base and power variable to double
 
@Downgoat ok wat where does t come from
 
oh shit
oops
@ASCII-only hm, should we use KVC
 
 
21 hours later…
11:18 PM
@ASCII-only halp array bork. Im do var a: goat[]
also dictionary bork:
TypeError: t.DictionaryNode is not a constructor
same with SetNode
same with array
 
@Downgoat ok fix
 
thanks
btw what is syntax for immmutable dictionary
;_; typealias does bork
 
@Downgoat like tuple: (foo: 1, [1 + 1]: 2)
 
ono
problem: that is named tuple syntax ;_;
 
@Downgoat wait what
 
11:26 PM
like tuple but each element has name
 
@Downgoat because you forgot to add to tokenizer?
@Downgoat 0/10 bad idea
 
D:
 
that is what struct is for
 
tuple also faster than struct
 
@Downgoat how
 
11:29 PM
because struct uses myStruct.init.n methods
also sometime struct not always most idomatic
like converting from array -> tuple is much more nice than array -> struct
 
@Downgoat but how do you convert from array to named ttuple
 
named tuple's named don't have any semantic significance
they are just to make cleaer than [0]
like what is more clear:
(String, UInt)
or:
(username: String, id: UInt)
 
@Downgoat Unless we're operating under different definitions of struct that's not possible
What you just described is a struct
 
4 mins ago, by Downgoat
because struct uses myStruct.init.n methods
so yes different defnition of struct
has different internal behavior and all
 
maybe your structs shouldn't do that
in C++ if a class is POD it doesn't do that
 
11:34 PM
also may have different GC behavior
 
450
A: What are POD types in C++?

Greg HewgillPOD stands for Plain Old Data - that is, a class (whether defined with the keyword struct or the keyword class) without constructors, destructors and virtual members functions. Wikipedia's article on POD goes into a bit more detail and defines it as: A Plain Old Data Structure in C++ is an ag...

 
@quartata plastic orange disorder?
 
preempted that
 
@quartata structs are like classes in VSL
they are not like C types
while they may be represented like them
 
read the link I just posted
 
11:35 PM
they still have initalizers and all that good stuff
@quartata ok
 
If a class follows those criteria C++ compilers just turn it into a "normal" struct
 
cool
 
since it's just plain old data with no constructor funny business
I'd say using structs like that is much easier for typing
A named tuple would be basically anonymous: (foo: Integer, baz: String)
 
tuples are immutable however
in context of LLVM that is big difference
also for GC
makes tracking lifetimes much simplier
 
Are you doing Rust memory management
 
11:39 PM
wat
 
@Downgoat so are structs?
struct = basically immutable class
 
@ASCII-only what?
 
yeah, in the terms that it won't be reallocate but pointer can be change
that mean new object to attach to lifetime of struct
 
@quartata wait it isn't?
 
@ASCII-only Not in C++
 
11:43 PM
Btw we will need to write doc generator for VSL
 
@quartata well I meant in VSL it will probably be just an immutable class
@Downgoat imo we should have some kind of builtin doc support in the language
 
@ASCII-only yeah definetly
I've added java-doc style comments to existing VSL STDLIB
btw minor bork:
          Array {
            parentScope: null,
            parentNode: null,
            array:
             [ [ ExpressionStatement {
                   parentScope: null,
                   parentNode: null,
                   expression: Literal { parentScope: null, parentNode: null, literal: '1', type: 0 } } ],
               [ ExpressionStatement {
                   parentScope: null,
                   parentNode: null,
                   expression: Literal { parentScope: null, parentNode: null, literal: '2', type: 0 } } ] ],
Expression statements should not be wrapped in array
might need {% id %} somewhere or something
@ASCII-only btw super duper important: do not forget to implement get children
 
@Downgoat pls no comment docs
 
wat
 
@ASCII-only ?
 
11:45 PM
are you suggesting semantics for docs?
doesn't look bad or anything
 
@inline @unsafe looks kind of weird
 
pls suggest alternative syntax
 
@inline
@unsafe
 
Question: should I mark libc function like memcpy as unsafe
 
would be what I'd expect
 
11:48 PM
you can do serious bork with them
 
unsafe usually means pointer arithmetic
so yes?
I think?
Depends on your implementation
 
*of libc
 
someone needs to typo check my docs
 
Oh no that's me correcting myself
"Depends on your implementation of libc"
nothing to do with you
 
11:51 PM
oh
glibc
 
although if I accidentally discovered a typo in your docs that would be amusing
 
btw do you happen to know what FILE* in C actually is?
I have typealias FILE = OpaquePointer atm >_>
 
OS dependent
So just treat it like void *
 
shit i dont think llvm allow named opaque type
@ASCII-only btw what is type heirarchy for number
I say the hackmd
 
Just wrap it in something?
 
11:54 PM
but we need a SignedInt vs UnsignedInt class
 
I mean I hope you're going to have a wrapper around filehandles anyways
Because C file I/O is unfun
 
oh
well libc is literally libc binding
in libvsl we will have nice fs class or something
 
then don't bother giving it a name for now
it's just a number that's the size of your architecture's pointers
 
actually looks like LLVM just makes i8* a void*
wait actually I can just do @FILE = type opaque :D
Quesiton: does reflection infos go in .DATA section
 
@Downgoat yeah
 
11:56 PM
@ASCII-only sorry I mean to say I saw
2 mins ago, by Downgoat
but we need a SignedInt vs UnsignedInt class
they are seperate instruction for signed div vs unsigned div
also will allow for special optimization]
 
yes
SignedInt = normal Int so imo you don't need it
 
ok
then we need unsignedint class
because we will have like UInt64 snd UInt8
and regular UInt of course
btw do we want typealias Size = UInt or something like that?
shit I think it is actually UInt64
 

« first day (210 days earlier)      last day (747 days later) »