« first day (117 days earlier)      last day (434 days later) » 

12:02 AM
@Downgoat so why don't I have the strict typing? :/
 
12:13 AM
idk
try rebuilding'
 
can you show me exactly what youre running to build/run
 
"node_modules\.bin\babel" src\ -d dist\ --source-maps
to build
 
and to run?
 
erm
ReferenceError: Unknown plugin "babel-plugin-transform-unicode-property-regex" specified in "C:\\Users\\Conor O'Brien\\Documents\\Programming\\Cheddar\\.babelrc" at 2, attempted to resolve relative to "C:\\Users\\Conor O'Brien\\Documents\\Programming\\Cheddar"
    at C:\Users\Conor O'Brien\Documents\Programming\Cheddar\node_modules\babel-core\lib\transformation\file\options\option-manager.js:204:17
    at Array.map (native)
    at Function.normalisePlugins (C:\Users\Conor O'Brien\Documents\Programming\Cheddar\node_modules\babel-core\lib\transformation\file\options\option-manager.js:180:20)
^ upon building
node dist\cli\repl.js
to run
 
12:16 AM
run npm install
 
12:27 AM
I got the usual error for windows, but it seems successful.
C:\Users\Conor O'Brien\Documents\Programming\Cheddar (develop) (cheddar-lang@1.0.0-beta.24)
λ npm install

> cheddar-lang@1.0.0-beta.24 prepublish C:\Users\Conor O'Brien\Documents\Programming\Cheddar
> make

./node_modules/.bin/babel src/ -d dist/ --minified
'.' is not recognized as an internal or external command,
operable program or batch file.
make: *** [default] Error 1

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
@Downgoat It works now! :D
wait
maybe no
@Downgoat I still have problems
bf.cdr:
var arr = [];
var a = "";
var lines = "";
print lines;
var line = "";
while(line = IO.prompt("")){
    lines += line + "\n";
}
print line;
C:\Users\Conor O'Brien\Documents\Programming\Cheddar (fn-lib) (cheddar@1.0.0-beta.11)
λ node dist\cli\cheddar.js < bf.cdr
Syntax Error: Unexpected token at 6:28
2 | var a = "";
3 | var lines = "";
  |  ^
 
@CᴏɴᴏʀO'Bʀɪᴇɴ wat
Such wat
 
can you replicate?
 
._.
@CᴏɴᴏʀO'Bʀɪᴇɴ idk willl try rn
 
._. weird
 
12:37 AM
so you can repro?
 
cheddar doesn't have while loops atm
the real bug is that error pointers are messed up
Syntax Error: Unexpected token at 6:28
2 | var a = "";
3 | var lines = "";
  |  ^
> 6:28
 
it's showing the pointer at 3:2
 
does cheddar have for loops?
 
yes of course
brb
 
12:39 AM
I'll use a for loop for now :P
 
for loop is best loop
 
var arr = [];
var a = "";
var lines = "";
for(var line = ""; line = IO.prompt(""); lines += line + "\n");
print lines;
λ node dist\cli\cheddar.js < bf.cdr
Syntax Error: Unexpected token at 4:10
2 | var a = "";
3 | var lines = "";
  |  ^
what did I do wrong
oh
 
you need {} in the foor loop
don't support expressions yet brb
 
var arr = [];
var a = "";
var lines = "";
for(var line = ""; line = IO.prompt(""); lines += line + "\n"){}
print lines;
prints infinitely :p
 
I believe IO.prompt() will return the newline too
 
12:42 AM
nope
 
oh wait no it doesn't
wat
.______.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ works for me in repl at least
 
@Downgoat I'm piping it
or whatever < is called
works in repl for me too.
 
hm... IO.prompt() might be borked with full programs
 
12:43 AM
perhaps
can I read from a file yet?
 
$ prog < bf.cdr

""
$ prog < bf.cdr
goat
""
 
@CᴏɴᴏʀO'Bʀɪᴇɴ idk what the function to read from file should be called is the problem
@CᴏɴᴏʀO'Bʀɪᴇɴ bf.cdr is:
 
@Downgoat read
 
var a: String = IO.prompt("");
print repr a;
@CᴏɴᴏʀO'Bʀɪᴇɴ that's for reading a byte stream
im planning for osmetiing like:
 
12:45 AM
@Downgoat readFile
 
i don't like camel case :|
 
you don't??
@Downgoat gives infinite loop for me, printing.. spaces?
 
PascalCase is best case
 
;_; y u haet pascal case
 
12:47 AM
we both can agree that snake_case_is_terrible
 
brb with readfile
@CᴏɴᴏʀO'Bʀɪᴇɴ aaahhhhhhh. yes
considering how terrible snake case is it's no surprise python users use it :P
 
pascal case is good for classes
 
yes
how about readf
or readfile
 
is that a serious suggestion?
 
12:48 AM
semi serious
 
should IO.readFile be syncronous or async?
 
ok
 
or have both
OR
have a function called fn.async(func, callback), which calls callback when func is done
 
@CᴏɴᴏʀO'Bʀɪᴇɴ how would that work? ._.
 
12:55 AM
fn.async (f, callback) {
    f();
    callback();
}
idk
maybe just define an async version of functions and have fn.async call that?
IO.readFile.async
 
how about just IO.async.read
@CᴏɴᴏʀO'Bʀɪᴇɴ that works too.... hmmm
 
I like that better, because it allows the more universal definition as a property rather than a method of a certain class
so fn.async(f) <=> f.async ? f.async : error
it's rather elegant
 
ok
will do that way brb
 
I could have fs.async without f.async
 
1:02 AM
how do I get a property of something with the API?
@Downgoat ?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ var res = foo.accessor("propname"). if res is string or null it has errored. then use res.Value to get the Cheddar object
 
@Downgoat capital v value?
 
yes
 
why ._. when its lowercase v value elsewhere
 
.accessor returns a CheddarVariable object which stores information on whether it's a constant, the type it's supposed to be, etc. inside of that CheddarVariable is the actual value.
.Value is for CheddarVariables .value is for cheddar objects
 
Why define async
 
isn't it just run async, pass return values to callback
 
so the user doesn't have to do anything
running any function asynchronously
Wait my bad, that's what you're saying right?
 
1:12 AM
no
I don't know what you're saying
that might be what I'm saying if I understand you correctly
 
@CᴏɴᴏʀO'Bʀɪᴇɴ like this, just callback(f());
If you actually
 
@MᴀʀsUʟᴛᴏʀ well, f might be a function that rouns async, so it doesn't have a return value...
but idk
 
If you want to do it like node, use a try catch and return error as first arg to CB on catch, else null as first argument signifying no error
 
I personally hate async, but I feel that it's necessary on some level
 
Especially for node
 
1:15 AM
yeah
 
@CᴏɴᴏʀO'Bʀɪᴇɴ why do you hate it
It's vital for many things
 
not saying it isn't
just that
reading a file should be sync by default.
that's all I'm saying >_<
 
Not for node
 
but that's because node is javascript. we can make the language so that many tasks that are async in node sync
 
Node is intended primarily for servers
so blocking is bad
 
1:17 AM
oh? ^^
I see
 
If you want non-server, use spidermonkey or something
 
naw, node is more universal
 
I think the reason people use node is because it's pretty much the only engine that has module support
plus there are already plenty of modules to do anything you need
 
What is with mobile chat? :(
 
For example about the async stuff C# has async versions instead of sync ones
I.e. C# is synchronous by default
 
@CᴏɴᴏʀO'Bʀɪᴇɴ why does your I/o module have a log function
 
@MᴀʀsUʟᴛᴏʀ because process.STDOUT.print is verbose
or whatever the command is
 
@CᴏɴᴏʀO'Bʀɪᴇɴ console.log
 
1:26 AM
@MᴀʀsUʟᴛᴏʀ that has a newline at the end.
rw.log doesn't.
 
right
Which I alias to print
but it has no place in an io module
 
sure it does
io = input output
rw.log = output
 
^^^
 
well, yours is file io
its called read write
 
@MᴀʀsUʟᴛᴏʀ is it?
 
1:28 AM
wait
idek
If you want to do command line io
 
it's beautifully vague
 
do you have an input function
 
I don't think that's possible.
 
you need to do some trickery with process.on("data") and stuff
 
1:29 AM
Yeah
not hard
 
I might do it in a future update
@Downgoat ???
 
nvm i have no idea what is being discussed
 
no, I just don't know what that is
 
 
17 hours later…
6:06 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ it's like Cheddar's IO.prompt()
though it doesn't work with REPLs
 
 
6 hours later…
11:48 PM
@Downgoat how do I update again?
 
npm install -g cheddar-lang
4
 
that doesn't work if I'm dev'ing my own branch :/
 
git fetch origin && git merge origin/develop
make sure you are on the branch that you want to merge into
 
idea: string.charmap(function)
λ git fetch origin && git merge origin/develop
remote: Counting objects: 64, done.
remote: Compressing objects: 100% (63/63), done.
remote: Total 64 (delta 17), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (64/64), done.
From github.com/cheddar-lang/Cheddar
   da8a288..0ebecc5  develop    -> origin/develop
   11a7eb1..0ebecc5  release-1.0.0 -> origin/release-1.0.0
 * [new tag]         v1.0.0-beta.25 -> v1.0.0-beta.25
Removing src/tokenizer/states/func.es6
Removing src/tokenizer/parsers/typed.es6
pls halp ._.
 
okay go to src/stdlib/stdlib.es6
you're going to see like:
>>> something
code
<<< something
more code
>>>
 
11:53 PM
yeah?
 
that means there's a conflict. You made some changes and I made some changes so git doesn't know who's changes to use
code is probably your code and more code is probably my code
 
okay
where can I find your version?
 
you need to remove the >>> somethings and merge my code and your code
 
another idea: recursive replace
 

« first day (117 days earlier)      last day (434 days later) »