« first day (827 days earlier)      last day (708 days later) » 

4:07 PM
what are the methods of file i/o in K?
 
which one
 
let's say oK because that's what I've learned first
nvm that's in js
let's say ngn/k
 
ngn
@Razetime 1:"file" to read bytes, "file"1:"data" to write bytes, 0:"file" to read lines, "file"0:("line0";"line1") to write lines
 
1: is the word there right
sounds simple enough
how do i use ngn/k on a file?
./k filename?
 
ngn
@Razetime yes, verbs like 1: are parsed as a single token (: there is not something separate like a "hyperator")
@Razetime yes
 
4:19 PM
ah great
 
ngn
./k filename loads the file (usually they have a .k extension, but it's not enforced) and evaluates it as if it's typed line by line
 
will be back with more simple questions(or hard ones)
 
ngn
always welcome
 
is repl.k partly a cheatsheet or is there some other file I can refer to
 
ngn
@Razetime like the manual?
 
4:24 PM
yeah something like it
just a quick refereence with name and a few one liner examples
 
ngn
@Razetime if you're using ./k repl.k and type \ it should give you one liner examples for most stuff
 
hm cool
I'll just copy that and put it in a separate file
 
@Razetime ktye.github.io/ref/ref.html (you can click on a line to expand) (might be out of date)
 
ngn
when you type \: it prints examples for i/o verbs
 
this may be a wsl thing but idk
./k doesn't seem to work
 
4:35 PM
@Razetime k.c is a source file. you need to compile first.
 
oh ok
 
4:46 PM
@ktye do you plan on nominating this for LoTM?
 
ngn
@Razetime does wsl have a "make" command?
 
@ngn yep, I'm installign clang now
I like graphical output question so I'm interested
 
5:25 PM
i have acquired the k build
 
ngn
5:35 PM
great
 
 
1 hour later…
6:36 PM
@ngn I have a pair of segfaults/crashes
 
ngn
6:47 PM
@coltim thanks! i'll look into them tomorrow
 
7:02 PM
also I found a use for deep-where! @rak1507's CMC, which, if I understand correctly, can be done with this
 
it solves the problem but not in under o(n^2) time
 
 
1 hour later…
8:28 PM
hmph, true. I think this has better time complexity
 
8:46 PM
also, I dunno what's going on with these, but I sense golfing opportunities...
 

« first day (827 days earlier)      last day (708 days later) »