last day (958 days later) » 

8:03 PM
I think the Makefile is OK
 
push then
 
ok I added contributing.md pls read
 
@betseg I need to test it first
 
we should make website for VSL
 
> You’ve been added to the Neoscript-lang organization!
Wat
Thanks, but it's my organization... ?
 
8:09 PM
idea: have logo be of an animal
 
a rat?
(love to cheddar)
 
i was thinking of a goat :|
idea: goat eating cheese at computer for logo
 
wtf
 
;_;
 
8:11 PM
flex -o src/lexer.yy.c src/lexer.l
flex: can't open src/lexer.yy.c
Makefile:13: recipe for target 'src/lexer.yy.c' failed
make: *** [src/lexer.yy.c] Error 1
Huh
 
@TheveryevilROFLcopter :(
 
idea: work on logo later so the language can actually be designed first
 
i'll need to sleep sometime soon
 
@ConorO'Brien ok
 
8:13 PM
bison -y --defines=inc/src/parser.tab.c.h -osrc/parser.tab.c src/parser.y
bison: ne peut ouvrir le fichier « inc/src/parser.tab.c.h »: No such file or directory
My makefile is borked
 
;_; je ne parle pas francais tres bien
 
There is the english version of the message at the end of the error -.-
 
lul
 
bison -y --defines=src/parser.tab.c.h -osrc/parser.tab.c src/parser.y
gcc -c -o obj/parser.tab.o src/parser.tab.c -Wall -Werror -Iinc
src/parser.tab.c:291:3: error: unknown type name 'YYSTYPE'
   YYSTYPE yyvs_alloc;
   ^
src/parser.tab.c:983:44: error: unknown type name 'YYSTYPE'
 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
                                            ^
src/parser.tab.c:1026:1: error: unknown type name 'YYSTYPE'
 YYSTYPE yylval;
 ^
src/parser.tab.c: In function 'yyparse':
ಠ_ಠ
 
oh
 
8:15 PM
I need to compile the lex file before the yacc file
 
^
 
But to have the header file needed by the lex file I need to compile the yacc file before
 
wait wat
 
¯\_(ツ)_/¯
 
this is impossible then .__________.
;_;
 
8:17 PM
I think I found a workaround
 
:D
 
nope dont work
 
:(
this is being roller-coaster of emotion
\o/ Mars is online
 
:D
wait lol
The errors are because of -Werror
 
@TheveryevilROFLcopter ;_; -Werror clearly represents --want error
 
8:24 PM
Yay
 
-Werror treat all warnings as errors
 
Uh what
 
we did name poll
 
@ASCII-only I sended you an invitation to the GH org
 
8:24 PM
Pls
No flex/bison
 
;_; y u sai dis Q____Q
flex/bison = best
 
becus whole world has used it since beginning of time
 
1. I have no idea how to make it ot error 2. everyone uses recursive descent because way better error reporting
 
8:25 PM
> Way better error reporting [citation-needed]
Seriously
 
@ASCII-only its ok, Tux will do all the makefile stuff and we just add grammar
 
Everyone meaning GCC, V8 to name some
 
@ASCII-only LALR's have difficult error reporting but lex/yacc have helping tools
@ASCII-only no they use handwritten parsers
 
It's still really readable
Yess
 
8:26 PM
GCC is like 3/4 LALR 1/4 RD
I think we should value speed and idiomaticy over debugging
 
I already tried to make a hand written parser (neoscript) it ended in unmaintainable code
 
^
have you see cheddar parser?
 
And debugging was a pain
@Downgoat no
link?
 
RD is usually k = 1 which mean no left-recursion :(
 
@Downgoat Left-recursion can be emulated with repeated groups
 
8:27 PM
Handwritten recursive descent parser combinators, still really readable as long as you don't have (I'm guessing) like 10MB of parsing code
 
BTW I have a makefile for flex/bison
 
@ASCII-only handwritten parser is painful tho
 
@ASCII-only :D
 
it is such easyness and quickness to just change grammar
 
8:28 PM
@Downgoat wtf
 
CC=clang++
CPPFLAGS=-std=c++11 -lgmpxx -lgmp
# -O3 -fno-exceptions

default: ch

gen:
	mkdir -p parser/cheddar/
	node generate.js cheddar > parser/cheddar/parser.y 2> parser/cheddar/lexer.l
	bison -Wno-other -o parser/cheddar/parser.cpp -d -v parser/cheddar/parser.y
	flex -o parser/cheddar/lexer.cpp parser/cheddar/lexer.l

ch:
	mkdir -p parser/cheddar/
	node generate.js cheddar > parser/cheddar/parser.y 2> parser/cheddar/lexer.l
	bison -Wno-other -o parser/cheddar/parser.cpp -d -v parser/cheddar/parser.y
 
@ASCII-only ur avtr iz 2 spooky4me
 
@ASCII-only btw I checked out GCC source and it uses lex/yacc
 
Was gonna use LLVM because compilation but I gave up
@Downgoat D: D: D: oh no
 
is VSL gonna be interpreted or compiled?
 
8:28 PM
flex -osrc/lexer.yy.c src/lexer.l
bison -y --defines=src/y.tab.h -osrc/y.tab.c src/parser.y
flex  -t src/lexer.l > src/lexer.c
gcc -c -o obj/lexer.o src/lexer.c -Wall -Iinc
In file included from src/lexer.l:2:0:
src/y.tab.h:59:8: error: unknown type name 'YYSTYPE'
 extern YYSTYPE yylval;
        ^
src/lexer.l: In function 'yylex':
src/lexer.l:8:11: error: request for member 'i' in something not a structure or union
     yylval.i = atoi(yytext);
           ^
In file included from src/lexer.l:2:0:
wtf
 
@daHugLenny do oyu wanna be added tot he GH?
 
@Downgoat JIT compiled
 
@TheveryevilROFLcopter What, that isn't hard to debug
 
@TheveryevilROFLcopter if you need expression grammar: blog.vihan.org/index.php/2016/05/29/…
 
You're assigning to a primitive
 
8:29 PM
@ASCII-only It's in the generated code ._.
 
Interpreted + JIT (later), compiled afterwards
 
@Downgoat cool MathJax test
 
thx
 
Oh you forgot to link to -lfl (libflex)
 
@Downgoat I know nearly nothing about C/C++
 
8:30 PM
@ASCII-only Someone on SO said me it's useless
 
2
A: Flex and bison defining their own 'main' function

ricilibfl and liby both define a main but if you use the invariant rule of always putting libraries last in the link command (or compile command if you are linking and compiling in one step) then they should not create any problems. (In other words, never put -lfl -ly before the object or source file...

 
speaking of greek letters ^^
 
@Downgoat Beautiful lol
 
thx
 
8:31 PM
> if you use the invariant rule of always putting libraries last in the link command (or compile command if you are linking and compiling in one step) then they should not create any problems
 
E=m*c*c isnt greek but ground-breaking very wow math quantum physics stuff
 
> libfl and liby are "convenience" libraries which can help write quick and dirty tests or hacks. Production code should not rely on them. The functions they add comprise less than a dozen lines of not very useful code.
 
Oh TIL
 
@betseg ε=μς² fixed
 
shit have to do CS homework bai
 
@TheveryevilROFLcopter :O
 
Did you have <i> in your bison
 
penguin is math genius
 
or yylval.i in your flex
 
@ASCII-only %token <i> INT
 
8:33 PM
@TheveryevilROFLcopter D: D: D: that's your problem
wait a sec
 
1. Don't use ints, we need arbitrary precision ones
2. use:
 
i'll sleep, cya after i wake up, bai
 
%union {
    int i;
    std::string s;
}
 
8:34 PM
@betseg bai .o/
@ASCII-only i is the length of the string?
 
And it'll work (const char *) if this is C
No
 
@Downgoat u no gone ಠ_ಠ
 
@ASCII-only We'll use C to make interfacing easy
 
i is int value, s is string value
@TheveryevilROFLcopter Interfacing??????
 
We will make a DLL version
 
8:35 PM
@betseg becuse i go to conor o'brien school of leaving chat rooms :P
 
And if we use C++ it will not be possible to use the DLL from C code
 
i do too, but u said homework
 
;_____; I have 5 CS assignents due tomorrow
brb dying of stress
 
I don't do CS
:D
BTW I think I died of too many bugs yesterday
 
@Downgoat done almost the same thing, didn't die. Don't worry.
 
8:37 PM
@Downgoat What are they on
If it's 5 of "write a new language" just get ROFLcopter/Conor to do them
 
please me
I write more languages that anyone
 
No
I wrote more languages
 
I have at least twenty.
 
8:39 PM
I have at least 40
 
links?
 
All on his GH
 
y create langs if you no use them again ;_;
 
@ASCII-only java ;_;
 
8:40 PM
I've written like 3
@Downgoat RIP Dogwngoat 19somethingttysomething-2016
 
@TheveryevilROFLcopter wait, you're TuxCrafting?
 
._.
 
lol
If you look at my chat profile my chat bio is still '( ͡°I AM ͜ʖ COOL PENGUIN ͡°)'
 
@ConorO'Brien pls halp golf
is: cigars >= 40 && (isWeekend || cigars <= 60)
the same as: cigars >= 40 && isWeekend || cigars <= 60
 
8:43 PM
Also yes we should have implicit types
 
@ASCII-only np
 
@Downgoat no, && has higher precedence
 
@ConorO'Brien Huh
Oh yes nvm >_<
 
is this an esolang?
 
Q: With lex/yacc, how to parse a string?
 
8:44 PM
@noɥʇʎPʎzɐɹC No
 
@noɥʇʎPʎzɐɹC As esoteric as ruby
 
Nonononono
@TheveryevilROFLcopter Regex?
 
@ConorO'Brien thanks
 
@TheveryevilROFLcopter using magic
 
paradigms, goal?
 
8:44 PM
I mean, I have the lexer and the grammar, how to parse the input?
 
:D at least CS homework is golfing
 
@noɥʇʎPʎzɐɹC Functional/OO/Imperative
 
@Downgoat o_o
 
is it performance, or like Python/Ruby?
 
8:44 PM
%{
#include <string>
#include "parser.cpp"
#define YY_DECL extern "C" int yylex();
%}
%option c++

%%
[0-9]+ {
    yylval = std::string(yytext);
    return INTEGER;
}
[0-9]+.[0-9]+ {
    yylval = std::string(yytext);
    return DECIMAL;
}
[a-zA-Z_$][a-zA-Z0-9_$]* {
    yylval = std::string(yytext);
    return IDENTIFIER;
}
"'"([^\\']|\\.|\\?\r|\\?\n)*"'" {
    yylval = std::string(yytext);
    return SINGLE_QUOTED_STRING_CONTENTS;
}
"\""([^\\"]|\\.|\\?\r|\\?\n)*"\"" {
    yylval = std::string(yytext);
 
@TheveryevilROFLcopter I count 27 not 40
 
@noɥʇʎPʎzɐɹC Performance like Python
 
Shit
 
some sample code?
 
8:45 PM
@ConorO'Brien 27 what?
 
I dropped my glasses under my bed
 
@TheveryevilROFLcopter languages
 
We don't know yet
 
I can't reach them
 
@noɥʇʎPʎzɐɹC The syntax is stil to be defined
 
8:45 PM
that had some code written for them
 
@ConorO'Brien Oh
 
I can make a abstract grammar parser
this vs. Pytek?
 
@ASCII-only You can drop the curly brackets for single-instruction tokens
 
Integration with other langs?
 
@noɥʇʎPʎzɐɹC We use Flex/Bison
 
8:46 PM
Is it like Kotlin in that it is Java but better?
 
@noɥʇʎPʎzɐɹC FFI and interpreter in dynamic library
 
Motivation?
 
@noɥʇʎPʎzɐɹC I want to steal a lot of ideas from Pytek
But Pytek isn't focused on speed IIRC plus it's function syntax is not what I would like
@noɥʇʎPʎzɐɹC Motivation is performance, conciseness and non-Pythonness
6
 
Function syntax suggestion:
fn f(x: int, y): int {
    x * y;
}
 
Yeah, that's cheddar function syntax
 
8:48 PM
So Python but performance, C++ but easier, and Java but Python mixed in?
This vs. PyPy?
 
@noɥʇʎPʎzɐɹC wtf
 
I'm playing devil's advocate to help y'all out
@TheveryevilROFLcopter ?
 
@ASCII-only It's basically Rust's syntax but with function type specified with :
 
@TheveryevilROFLcopter That's Python Function annotations
 
@noɥʇʎPʎzɐɹC Are you saying the language is a mix of Python, Java and C++?
 
8:49 PM
@TheveryevilROFLcopter no
 
@noɥʇʎPʎzɐɹC Nope, type definition
 
Is static typing optional?
 
@noɥʇʎPʎzɐɹC Yes
 
fun f(x: int, y) -> int {
    x * y;
}
 
8:50 PM
@noɥʇʎPʎzɐɹC The -> is for type annotation
And the keyword will be fn
 
Wait ->?
 
Scripting or general?
 
And anyway we will use : not ->
 
Browser?
 
@noɥʇʎPʎzɐɹC Scripting and general
@noɥʇʎPʎzɐɹC Native
 
8:50 PM
@TheveryevilROFLcopter that's unreadable
 
Browser integration? Maybe
@noɥʇʎPʎzɐɹC No ;_;
 
OK: one question: why not pypy with type annotations?
 
Plus I want -> for map like Cheddar
 
^ so do I :P
 
8:51 PM
Idea: Fork pypy (it has many of the good qualities) and extend it!
 
@noɥʇʎPʎzɐɹC many
Plus I want to do this from scratch because it's a nice learning experience
 
@ASCII-only 1. readable 2. performance as-good-as C 3. a type annotations syntax
 
As good as C? Won't be easy for most non-annotated functions
 
@ASCII-only Haha, PyPy doesn't even use type annotations
The type-inference engine is really good.
@TheveryevilROFLcopter Star it!
@ASCII-only and PyPy's speed is close to C++, Java, and C
See, devil's advocate helps!
 
8:54 PM
@noɥʇʎPʎzɐɹC Only because of memoization
 
@ASCII-only so...?
 
If C had memoization it would be way faster than PyPy
 
@ASCII-only I don't think pypy has memoization google.com/…
 
Parser error: syntax error
thx lol
 
XD
 
8:58 PM
@noɥʇʎPʎzɐɹC Huh
 
*clears throat*
Fork PyPy. 1. readable 2. performance as-good-as C 3. a type annotations syntax
Extend it. Build upon it. Include obvious of-course-you-should-have-these-libs.
Paradigm #1 is common-sense.
@ASCII-only Fork PyPy. Making a new regular language is hard.
 
1. unreadable, it's Python
 
> Making a new regular language is hard.
And this is why we are making one
Because it's good to know how to make a language
 
2. with type annotations and JIT...
 
@ASCII-only then just change the grammar. It's not even code. Just some grammar files.
 

  last day (958 days later) »