« first day    last day (62 days later) » 

04:34
@user well simple that is division
/ is a comment and division
@user i was thinking about something like that
typeclasses
04:53
@thejonymyster ^^^
so here is what i am thinking for the compilation
i want WS to be statically typed
it should be able to infer types
like [1,2,3].map(x->sin(x))
so the compiler will infer the types of the lambda
to (x: Integer): Double -> sin(x)
@user i guess i will use that
oh and there are no booleans
ok
i have an idea
like scala val is constant and var can be changed
and
the lambda return type can be explicitly stated like:
val inc: Integer = (x: Integer) -> x + 1
@user how does scala do it
do it infer the return type?
@PyGamer0 actually i dont think that will work
ok change of topic
about the actual implementation of the language
since this is compiled
i guess i can get away with a high level language like Python, Java or JS
for the lexer, parser and the bytecode compilation
and for the bytecode interpretation i can do it in C
for speed
so compilation will be slow
but the execution will be SPEED
now idk who is listening to my 70 page essay here
oh and btw the message which made this project happen
is
in The Nineteenth Byte, 15 hours ago, by PyGamer0
val range = (start, end) ->
  start >= end ?
  [] :
  [start] + range(start + 1, end);
05:16
@PyGamer0 wait what how? is it like, contextual?
its smart
/this is a comment
val expr = 1 + 1 / 2;  / this is another comment!
bascially it checks if there is and expression behind
yeah and blah blah blah
i might need to study rust's macros
i want a macro system too
first of all
^ that is the parser
library that i will use
do i use LALR(1) or do i use ANTLR
grammar is hard
i guess i can copy the JS grammar
and modify it
CMP: Which is better for conditional evaluation: ?: or if else
05:36
i will now rant about the bytecode
bytecode will be Myxal stack based
and i have no more details
@PyGamer0 so basically if the last non-whitespace character before the / was a ;, its a comment, otherwise its a division symbol?
yeah
06:44
If anyone wants to help me with this just ping me.
cause i am about to make a github org
nah lets make a github repo
 
5 hours later…
12:15
@PyGamer0 In Scala, you'd write val inc: Int => Int = x => x + 1 or def inc(x: Int) = x + 1
13:10
@user i see
Int => Int is the function type
taking a single int and return another
13:39
error messages be like:
SyntaxError 4:11: Expected semi-colon.
       val foo = 1 + baz
                  ~~~~~~^
Well scripted...
 
1 hour later…
15:09
in The Nineteenth Byte, 1 hour ago, by pxeger
@PyGamer0 well start by matching brackets, and then matching brackets while gathering their contents and build it into a tree, and then splitting the contents of brackets into terms of a + binary operation, and then extend that to multiple operators, and then extend that to multiple operators with different precedences, etc., etc.

« first day    last day (62 days later) »