« first day    last day (957 days later) » 

00:13
@ASCII-only genius idea: use $ command to execute command
Because build scripts need to execute commands...
Cheddar uses `command`
Ruby has syntax for that as well
Wat, ruby has that syntax? That tells me I need to learn ruby.
Langs for build scripts
Bash = ??? + "if, else is hard, wat iz this lang"
Python = ??? + "oh hey that's useful"
VSL = (hopefully) :D
@noɥʇʎPʎzɐɹC ????
@ASCII-only rating for different langs for makingbuild scripts
build scripts need to execute shell commands, but have good if/then/else
Ranking of casualness: hackmd > chat > GitHub > real life
if vslNotInstalled {
    print('y u do dis ;_;')
    print('also how are you even running this')
    `vpm install vsl`
}
We may need support for async shell commands and getting results e.g. async `vpm install vsl` and foo = `echo foo`
00:22
^^^^^^
very good for scripting lang
that makes or breaks the deal
@Downgoat wat?
 
2 hours later…
02:45
PyPy is nice plus it would give a nice fast interpreter but it's not easy to use either, plus it only compiles statically typed programs
Ideally we should add JIT, GC and type inference to compiled programs only when needed
 
4 hours later…
06:29
@TheveryevilROFLcopter How much have you done
@ConorO'Brien What makes you so sure it wasn't
 
3 hours later…
09:01
@ASCII-only I was sleeping -.-
Why did you post a message while sleeping
rn I can't work on VSL
Do you have c9?
No
It ask for a credit card numer
Yeah, you had to join before like July 15
And only Downgoat and Conor, and I have c9 accounts :(
What editor do you use? I'd like to try using Floobits
;_; damnit floobits only supports nvim
neovim don't like Windows ;_;
Also why use C ;_; C++ doesn't need memory management
09:07
gtg
@ASCII-only Memory management is really easy
Memory leaks are rare if you code well
Hmm, I might need to read up then
See you
malloc allocate memory, free free it, malloc return a null pointer if it can't allocate, you need to free malloced memory
Yeah, but things like really long strings
malloc a buffer (of like 1024 bytes), if you need to add a character to the string but it's too long realloc it to like 2048 bytes, continue, etc...
malloc and free are fine, just 1. no classes, only structs and 2. how do you do strings and vectors
09:09
@ASCII-only ^^ and vectors can be emulated with linked lists
@TheveryevilROFLcopter How do you read a really long string at once
@TheveryevilROFLcopter Oh ok
fgets to read from a file
?
anyway gtg
 
1 hour later…
10:38
I am back and ready to work on VSL
@TheveryevilROFLcopter wait, need to put my current progress online (very unfinished)
Also how do we do the interpreter's classes in C
flex -osrc/lexer.yy.c src/lexer.l
bison -y --defines=src/y.tab.h -osrc/y.tab.c src/parser.y
src/parser.y: AVERTISSEMENT: 1 nonterminal useless in grammar
src/parser.y: AVERTISSEMENT: 1 rule useless in grammar
src/parser.y:20.1-4: AVERTISSEMENT: nonterminal useless in grammar: stmt
src/parser.y:20.8-41: AVERTISSEMENT: rule useless in grammar: stmt: PRINT expr
gcc -c -o obj/y.tab.o src/y.tab.c -Wall -Iinc
src/parser.y: In function 'yyparse':
src/parser.y:18:14: error: expected identifier before 'int'
Y U DO DIS @Bison ;_;
Wait
I need to put the name of an %union variable not a type
Now it work lol
.o/
10:43
Hi
I fixed the parser :D
»  echo -n '!193+10' > hello.vsl
Elie@elie-asus — /d/VSL
»  ./vsl.exe hello.vsl
203
:D
@ASCII-only copy Vala? :P
But class methods
struct with map of name/vsl value
Where a vsl value is any data type that VSL support
10:49
Because class methods will be stored with instance variables to ease of use
Hmm, okay, what about builtin operators
Also builtin methods and builtin static methods
@ASCII-only Builtins will use a special type pointing to a function
@ASCII-only I am against char, character and string having the same superclass
Not superclass
Just acts like it for foo is <textsuperclass>
char/character should descend from the object class, and string descend from list<char> or list<character>
All three are actually primitives
10:57
Plz no
This will make programming really hard
What will
(#javasintvsInteger)
There will be no non-primitives
not hard
I really dislike Integer (same with JS)
And make string descend from list will make some useful methods inherited
Example: indexOf
concat/+
etc...
And if every object descend from object, some useful methods can also be inherited
So, for example, we need to implement :: only once (in object)
@ASCII-only wtf char + char should be number but char + number char???
11:15
quick random thing: complex should be a datatype modifier. e.g. complex int, complex integer, etc.
Good idea
Idea: Add operator overloading-like things for modifiers
Eg:
class really_cool_class {
    modifier hello {
        // do things
    }
}
// do things
var v: hello really_cool_class
12:06
Datatype idea: n-bit integer
Example:
integer(128) define a 128-bit integer, integer(280) a 280-bit integer
(May be useful when emulating some older systems, like a 18-bit CPU)
Like struct { int a:128; } in C?
With this you can't access the top 64 bytes
The field will simply be padded
13:12
»  ./vsl.exe hello.vsl
AST 0 {
STR '1;'
}
Segmentation fault
lolwut
Oh
freeing a NULL pointer segfault
brb
13:50
@TheveryevilROFLcopter Yes, think about how you usually use them
@TheveryevilROFLcopter modifier?
btw gonna do flex/bison myslef as well because i have nothing better to do if that's ok with you @TheveryevilROFLcopter
14:14
@ASCII-only For example complex is a type modifier
@ASCII-only I near finished it
Just need to bugfix some things
14:28
»  cat hello.vsl
1+2-3;
Elie@elie-asus — /d/VSL
»  ./vsl.exe hello.vsl
 AST 6 {
  AST 0 {
    STR '1'
  }
 AST 7 {
  AST 0 {
    STR '2'
  }
 AST 0 {
  STR '3'
 }
 }
 }
\ಠ/ :D
 
1 hour later…
16:24
The entire parser is totally unborked, now finishing it
16:49
\o/
17:43
The parser is pushed on develop :D
17:55
@ASCII-only A basic parser is on develop
 
2 hours later…
20:08
@TuxCopter We need automated tests
Hoo, calm down
I just pushed the parser (don't support all the syntax for now :/)
@TuxCopter hey, why are C++ files in .c?
shouldn't the extension be .cpp?
@noɥʇʎPʎzɐɹC It's C
If you look in, I use struct to reference structs
@TuxCopter I thought we were using C++?
Nope, C
If ASCII don't wanted C it's because of the memory allocation
But it's actually very easy with a few macros
20:13
C++ has classes though
Not needed
It is C but more features, same performance
but let me contact @Downgoat @ASCII-only
Python, Go, Rust, GCC, etc... are written in pure C
And they are really popular languages/implementations
not rpython
20:17
but why?
Why what?
Is there a C++14 for ANSI C?
There is C11
@TuxCopter why do they do that? performance? honest question
Let's use that.
@noɥʇʎPʎzɐɹC Because it's easier to use a C library in C than a C++ library in C
20:19
@TuxCopter Huh.
C is a subset of C++ but OK
C++ classes can't be used from C
And create a native library in C if the interpreter use C++ is hard
kinda a subset
@noɥʇʎPʎzɐɹC C++ is a superset of C
not the same thing
kinda a superset
20:20
wat c got multithreading support in 2011
Multithreading existed long ago
pthread
then how did linux kernel work before :/
@betseg OS x86 magic
linus is magician confirmed
x86 have a 'task register' which permit to do easy concurrent multithreading
(Well, easy in assembly sense)
20:23
easier than "FUCK THAT'S TOO HARD"
Yep
It's as easy as loading the IDT
Is there an unofficial extension to C that is just adds some syntactic sugar to make life just 10% easier?
Define 'life easier'
C is actually really easy
e.g. like the coffeescript -> js dealio
foreach loops.
20:25
u mean Vala?
Yeah
Vala is an object-oriented programming language with a self-hosting compiler that generates C code and uses the GObject system. Vala is syntactically similar to C# and includes several features such as: anonymous functions, signals, properties, generics, assisted memory management, exception handling, type inference, and foreach statements. Its developers Jürg Billeter and Raffaele Sandrini aim to bring these features to the plain C runtime with little overhead and no special runtime support by targeting the GObject object system. Rather than compiling directly to machine code or assembly language...
yeah, misspelled google is not helpful
thats why i love it
gnome made vala
lul se u borked
@TuxCopter That's too thick, I want a small C extension that compiles to C and just adds some features like foreach loops and stuff. Vala doesn't seem to mix well with performance.
Then use C
For loops are actually one of the easier thing to implement with linked lists
Execute a function on each element of a list while the next element is not NULL
20:28
there are lambda, map, foreach etc macros in c
thats actually not hard
@TuxCopter I mean foreach syntactic sugar. Like for (auto x : b){} in c
@betseg oh ok good
Real programmers do not use syntactic sugar
@TuxCopter is that a joke or what
#define foreach(a,b) magic stuff here
you can find on the internet
@betseg brb writing the macro
20:29
18 secs ago, by betseg
you can find on the internet
@noɥʇʎPʎzɐɹC NO IT'S ACTUALLY VERY SERIOUS ಠ_ಠ
Let's set up some macros to help with development
flex -osrc/lexer.yy.c src/lexer.l
bison --defines=src/y.tab.h -osrc/y.tab.c src/parser.y -yv
src/parser.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
flex  -t src/lexer.l > src/lexer.c
gcc -c -o obj/lexer.o src/lexer.c -Wall -Werror -Iinc -std=c99 -Wno-unused-function
Assembler messages:
Fatal error: can't create obj/lexer.o: No such file or directory
make: *** [Makefile:22: obj/lexer.o] Error 1
rm src/lexer.c
halp makefile borked
#define foreach(type, list, block) \
    list_node_t *current = list->first; \
    while (current != NULL) { \
        type elm = current->value; \
        block; \
        current = current->next; \
    }
@betseg dafuq
do you people have linters set up
my editor has them all gtg
20:32
ye
vim syntastic
syntastic is a horror
does its job
@betseg very weird
@betseg It encourage to write non-functional python code
20:33
i dont write python, i didnt see what syntastic says bout python
A lot of bad things
lul
C <- B <- A <- APL
no
@TuxCopter i think i found why
$ gcc -c -o obj/lexer.o src/lexer.c -Wall -Werror -Iinc -std=c99 -Wno-unused-function
gcc: error: src/lexer.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
@noɥʇʎPʎzɐɹC BCPL -> B -> C
20:39
poor man's build script: just make a build script in a scripting language.
@noɥʇʎPʎzɐɹC I tried with OaaS, a build took 30 seconds
Makefile: 5 seconds
@TuxCopter then it's a bad build script
we should use Plankalkül then. it is the first programming language.
one step before algol 58
21:13
'Night
Same
21:42
I'm revamping the sidebar, wait a sec
I've noticed that the spec doesn't contain semicolons. How hard will it be to make those optional, without having whitespace sensitivity?
22:02
@PhiNotPi just don't. A semicolon can be used as it is in python - equivalent to a new line
22:54
huh, whoops
@TuxCopter Don't actually do this ever in C
btw, we can use C, it's not much different from C++, we can just port to VSL later
Aside from not being idiomatic it's not very readable anyways
Also preprocessor abuse eleven
23:12
@TuxCopter my god. Why are you doing this
how to kill compile time 101
@TuxCopter ..........
C++ is much much much much much nhch much much much much much much more that that
C is basically structs and fors
C++ has real stdlib
wbole world uses C++
there is no reason to use C over C++
@Downgoat so should I use C++
yes pls
okay
Why is nobody else on the hackmd
@ASCII-only i'm on hackmd
@Downgoat thank god I pinged you
@noɥʇʎPʎzɐɹC But only like 2 people ;_;
23:28
@ASCII-only i am ;_;
Okay now how do I do the interpreter
Do I build an AST? Apparently it's slow
^ this is why we should use C++
nobody can understand C code written by someone else unless it is 99% comment
what is isinstance and issub
operators?
@ASCII-only you'll need to integrate with the compile parser
for now, you can hack together a nltk setup, it's like yacc but for natural language - english, spanish, etc.. Works w/ code too
You're using nltk to parse a scripting language? What?
no we're using flex/bison
btw what is gonna be our syntax to construct a class?
23:33
Maybe we're talking about different nltks
We're talking about this one right github.com/nltk/nltk
I really like Cheddar's ClassName { args } syntax but that is confusing
@Downgoat yes
@ASCII-only what is issub
@quartata yeah, I said it might work as an ad-hoc one when flex/bison is incomplete
nltk is simple
@noɥʇʎPʎzɐɹC no
@Downgoat actual subclass check
pls no
@Downgoat just use python syntax? classname(args)
23:43
Why wouhkd that be useful?
btw make isinstance either instanceof or is
@Downgoat meh, it sounded like flex/bison was hard - Ctrl-Z on that thought
why not isinstance
@Downgoat because int is actually not subclass of number but it is number
So then do is
@ASCII-only ???? number is an empty abstract class from which everything else is
@Downgoat, requesting your present in hackmd
23:58
@Downgoat ?

« first day    last day (957 days later) »