« first day (422 days earlier)      last day (2072 days later) » 

2:07 AM
Howdy golfers. I'm not getting very far with my new language, but I remembered I have 2 older versions which are completed. So Language Request for inca and inca2 both from the inca repo. github.com/luser-dr00g/inca
make inca CFLAGS='-Wno-implicit-int -Wno-int-conversion -Wno-incompatible-pointer-types'
make inca2 CFLAGS='-Wno-implicit-int -Wno-int-conversion -Wno-incompatible-pointer-types'
 
> new
 
No rush. Not a very popular language lol
It's an ascii APL but far more primitive than J.
Next one will be much cooler but needs a lot more work and I'm busy with other stuff.
The first one, inca "one" only has arrays and integer types. It kindof fakes a string type but it's just integers for each character. You can kindof do fixed-point numbers if you keep track of the scaling yourself. But those limitations led to inca2 which has more types.
My next language which will be awesome has both more and fewer types by encoding all types into integer-sized "handles". So elements of arrays can be objects of any type, even arrays nested to arbitrary depth.
... and I'm done with my sales pitch. I'll lurk a little for questions, but I'm done filling the screen here. :)
 
2:24 AM
> teirs
@Dennis charging for beta access :P
 
2:37 AM
Oh. one more thing. User-oriented intro to the language. github.com/luser-dr00g/inca/wiki
 
Do you have a Hello, World! Program for it?
 
@ATaco Is it not just 'Hello, World!'
 
No idea, I can't test it.
 
3:25 AM
Yes Taco guessed it. Just single quotes
 
> ASCII-only
> Taco guessed it
 
Me and ASCII-only are the same person.
 
3:38 AM
Yes I am.
 
 
10 hours later…
1:44 PM
@Dennis I assume its possible to send requests to the backend of TIO from, say, a Java program, but I can't find any documentation on the protocol. How are requests/responses sent/received to/from the backend? (I ask because I'm thinking about running my own backend with a different kind of frontend).
 
2:25 PM
@SocraticPhoenix the closest you can get to documentation is searching this room for questions about the API and looking at the source code, which is on GitHub.
 
@Pavel but JavaScript makes my head hurt
 
Anonymous
2:51 PM
@SocraticPhoenix It makes all of our heads hurt...
 
Anonymous
Probably related to the repeated smashing of said heads against the nearest desk
 
3:02 PM
@Mego I thought that was moreso DnD related
 
Anonymous
@Pavel All of the above
 
5:01 PM
@Dennis could you update Alice please? :)
 
5:14 PM
@MartinEnder Syncing.
@luserdroog I'll check it out later today.
@ASCII-only That sounds more like a punishment than a reward. :P
 
@Dennis thanks :)
 
@Dennis Awesome! Buzz me with any questions or when it's done. I'll post to comp.lang.apl and update the APL faq too.
 
@SocraticPhoenix The API isn't documented yet and will change to a more usable format in the near future. These are the basics:
Sep 3 at 16:23, by Dennis
@Okx Requests consist of 6 different commands. You need three of them (create File, declare Variable, and Run) for a simple request. V must be followed by a NUL-terminated variable name, an array length n (decimal, then NUL), then n NUL-terminated strings. F must be followed by a NUL-terminated file name, a file size (decimal, then NUL), then the contents of the file. You need at least Vlang to pick a language and F.code.tio for the code. R runs the state.
You can execute JSON.stringify(stateToByteString()) in your browser's console to see how the current state would be encoded. The final step is to DEFLATE that string.
 
 
1 hour later…
6:33 PM
@luserdroog Two questions: 1. How would I print Hello, World!? In inca2, 'Hello, World!' appears to work, but inca just segfaults. 2. How do I provide code for a non-interactive session?
 
uh oh. It might need -m32
It should be the same. just single-quotes.
 
dennis-home:inca$ make inca CFLAGS='-lm -m32'
cc -lm -m32    inca.c   -o inca
dennis-home:inca$ ./inca
        'HW'
Segmentation fault
 
Well, crap!
that's embarrassing
No, wait. that's right. inca "one" uses a colon.
:Hello World
single-quote is something else.
 
Yes, that works just fine.
 
single quote calls a user function. So it was trying to call H as a function. segfault
 
6:42 PM
Convenient and descriptive errors!
 
Yes. the first one has some severe problems and limitations. :)
 
Heh... betcha it isn't as bad as the first language I made...
 
But it can do array arithmetic somewhat, but only on integers
 
How do I provide code for a non-interactive session?
 
pipe into stdin
have to suppress the prompts externally if desired, like with tr -d '\t'
 
6:47 PM
But how would I read from STDIN then?
 
In inca "one" you just can't. It doesn't have another stream or way to open one. Except with inca "one" you can load code through the arguments. But the stdin is still code input and you have to manually trigger it with a cryptic formula ...
In inca2 it can open files and execute code from strings. So it should be able to do something.
 
And how would I load code from arguments for inca or from a file for inca2?
 
In README.md it says how to load the library in inca.
I'm working on a way to do it in inca2. I think it needs a function or 2
The execute function only takes a statement at a time so I need to do a prog2 construct to feed it statements from the character matrix after it reads the file.
 
7:09 PM
I'm sorry, but I'm a bit lost. TIO stores the code in the file .code.tio and the input in the file .input.tio. How should the wrappers that call inca and inca2 from Bash look like?
 
@Dennis When you have the time, could you add OML to TIO?
should be able to compile it with gcc -lm -W -g OML.c -o OML
 
@Dennis I need to work up something so that will work.
 
@Dennis Could you pull V?
 
@luserdroog OK, I'll stand by.
@ConorO'Brien OML.c:14:10: fatal error: twister.h: No such file or directory
 
7:37 PM
The Mersenne Twister is a terrible PRNG anyway. :P
@DJMcMayhem Done.
 
Danke
 
Ugh. I never wrote take and drop. have to use compress. ick.
I'm remembering why I stopped working on this language. sheesh. It's missing a lot of niceties.
oh no. it looks like compress doesn't work on 2D arrays.
 
8:16 PM
@Dennis better than C's builtin one :P
@Dennis The files should be on the github now
 
8:52 PM
@ConorO'Brien Marginally. Slow and full of systematic failures.
 
what would you suggest instead ?
 
@ConorO'Brien xoroshiro128+ or xorshift128+. xoroshiro.di.unimi.it
@ConorO'Brien OK, compilation worked. There are a few things you should look into though: casting between 64-bit pointers and 32-bit ints, signed char subscripts, and int stack_unshift not returning a value.
 
"signed char subscripts"?
 
    char ident = inst->code[++inst->i];
    inst->vars[ident] = stack_pop(res);
 
is that a bad thing because negative indices?
 
8:58 PM
Not sure if that's a problem, but signed char seems an awkward choice for array indices (and gcc complains about it).
Negative indices would cause UB, yes.
 
weird... I didn't get any complaints. how did you compile it?
 
With -Wall -Wextra.
OML.c: In function ‘OML_exec_cmd’:
OML.c:620:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int64_t i = 0; i < size - count; i++) {
                              ^
OML.c:680:19: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         inst->vars[ident] = stack_pop(res);
                   ^
OML.c:684:35: warning: array subscript has type ‘char’ [-Wchar-subscripts]
         stack_push(res, inst->vars[ident]);
                                   ^
 
I thought -W was shorthand for -Wall. guess not lol
 
@ConorO'Brien How do I print Hello World?
 
"Hello, World!"s
 
9:07 PM
Hm, that just exits with a floating point exception, without printing anything.
Is /opt/oml/oml .code.tio correct?
Or does it not take a filename?
 
sorry, it does, thats OML -f <file>
(I updated the code, should be warningless now)
 
Right, that works.
@ConorO'Brien Only if I compile it as 32-bit, due to the pointer size issue.
 
oh
wait why?
I think I fixed the pointer thing with a macro cast
 
9:22 PM
@ConorO'Brien Yes, that one there are a few more though.
OML.c:625:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int64_t i = 0; i < size - count; i++) {
                              ^
OML.c:863:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
             stack_push(res, (int)addr);
                             ^
OML.c:874:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
             stack_push(res, (int) tmp);
                             ^
 
how did you get those? I had -Wall and -Wextra on ._.
 
Different version of gcc?
 
hm, maybe
now that I'm at my home computer I can try recompiling it with a more modern gcc
but thanks!
 
9:48 PM
@Dennis Could you please sync 05AB1E?
 
 
2 hours later…
11:22 PM
@Adnan Syncing.
 
: add a button to re-sync the language so we don't have to keep asking you... maybe force a delay of like 1 minute between each button press though...
 
This is slowly being worked on.
 
Really? Cool! Good luck, I guess.
 

« first day (422 days earlier)      last day (2072 days later) »