ELLIOTTCABLE changed the topic of #elliottcable to: a _better_ cult ˙ ͜ʟ˙ embrace, extend, extinguish.
<gq> i kind of miss when this place was called Hat.
oldskirt_ has joined #elliottcable
oldskirt_ has joined #elliottcable
oldskirt has quit [Ping timeout: 250 seconds]
Rusky has joined #elliottcable
oldskirt_ is now known as oldskirt
<glowcoil> gq: hee hee yes
<gq> right? so many good jokes.
<devyn> katlogic: my skills aren't quite at the level where I could sub anime… but it would be pretty cool to do
<devyn> katlogic: I did once upload a rare torrent
<devyn> and I seed rare torrents that I've leeched, of course
<devyn> does that count? ;)
<gq> xD
Rusky has quit [Quit: Leaving.]
<purr\Paws> [Paws.rs] devyn pushed 1 new commit to master: https://github.com/devyn/Paws.rs/commit/cba310a3e9b557a5a882df9965bf7420e727dfec
<purr\Paws> Paws.rs/master cba310a Devyn Cairns: Rust nightly: Share => Sync
* gq curious
<gq> -what
<purr> <banisterfiend> you just struck me as a naruto kind of guy
<gq> -fingernails
<purr> gq: they're weird
eligrey has quit [Read error: Connection reset by peer]
gq has left #elliottcable [#elliottcable]
prophile has joined #elliottcable
gq has joined #elliottcable
* gq curls up on purr & goes to sleep
* purr rrrrrrr
<Cheery> katlogic: are you around?
<Cheery> katlogic: know any benchmark that would give a hint about the quality of implementation?
<Cheery> katlogic: I would like to test the snakelisp.
<katlogic> just port some of the debian shootout ones
<katlogic> i believe there are several lisps
<Cheery> there's the list of functions I've implemented. might help in selection
<Cheery> whatever can be implemented in those, or minor superset of those
<katlogic> feels mostly like lisp, minus the lists :)
<Cheery> minus the linked lists.
<Cheery> I can write up the benchmark, I'd just need to pick up the one that's rather generic.
<Cheery> allocate/deallocate probably doesn't fly. I don't have GC yet.
<katlogic> pidigits for math, probably
<katlogic> binary-trees for gc / attribute access
<katlogic> and then some not-so-microbenchmark if you want some real numbers, like deltablue (SAT solver, idiomatic OO)
<Cheery> is the deltablue hard to implement?
<Cheery> that seems about the simplest thing here.
<Cheery> hmm
<Cheery> deltablue doesn't look hard to implement!
<Cheery> katlogic: you're probably curious about this too. How fast snakelisp is?
<Cheery> or how fast can it become
<Cheery> I'm going to describe the compilation strategy today in my blog.
<katlogic> Cheery: deltablue is about idiomatic code, though
<katlogic> instance creation, inheritance, member access
<katlogic> dunno if you have those, getting rid of those things kinda defeats its purpose :)
<Cheery> I probably won't have inheritance. or not sure.
<Cheery> member access I will have
<Cheery> and probably instance creation too
<katlogic> as for speed, i'm not sure
<katlogic> continuation passing is generally tough sell in compiled code - stack frame trashing ruins register renaming
<Cheery> yes. though the implementation allows calls to C functions, assuming you always keep space in the stack.
<Cheery> it also means you can compile parts of the program into plain C-like functions with explicit stack records.
<katlogic> well, the compiler seems rather naive, i suspect it will be tad slower than custom made asm interpreter
<katlogic> probably a bit faster than c interpreter in microbenchmark
<Cheery> also the JIT isn't closed out.
<katlogic> AOT like this or very naive jit are rather architecturally similiar, yeah
<katlogic> AOT has the advantage that if you play your hand right, compiler can hoist guards for you
<katlogic> which means getting rid of dynamic dispatch most of the time, giving compiler a chance to do code flow analysis
<katlogic> Cheery: There are really good AOT lisp compilers if you want to go high-performance route :)
<Cheery> hmm
<katlogic> needless to say; optimizing compilers are humongous
<Cheery> getting this thing to work in the first place using this technique has been sort of enabling.
<katlogic> yeah, direct threaded work for the sake of simply not having interpreter
<katlogic> good for code obfuscation and such
<katlogic> otherwise there is not much benefit, worse it tends to have drawbacks
<katlogic> its like compiling lua code to lua_* api calls
<Cheery> well I can give it an interpreter. actually been planning to because the C compiler is ass-slow :)
<Cheery> say.. after compiling to continuations, I could keep it in the data structures that produces and evaluate it directly
<Cheery> there's everything that's needed for it.
<katlogic> i'm not sure what you really have as continuations
<katlogic> functions? blocks? basic blocks?
<Cheery> the whole program
<katlogic> no, i mean the dividing line for one continuation
<katlogic> its hard to say without seeing source/result side by side :)
<Cheery> one call.
<Cheery> I don't inline anything yet.
<Cheery> just got it running. have written and getting used to the language I implement
<katlogic> yeah looks like each opcode equals one C function call
<katlogic> frame->proc(frame, argc, argv);
<katlogic> this is what it ruins it
<katlogic> because the dispatch is completely dynamic, the C compiler can't optimize out anything (boxing of arguments, type guards)
<katlogic> Cheery: you might adopt the V8 approach, though
<katlogic> initially, v8 compiles JS to something very similiar you have there
<katlogic> but it also inserts type-recording instrumentation
<katlogic> and on certain trip count, it compiles hot loops to optimised code based on recorded types
<Cheery> every function here still lacks the gc-overflow checker, and thought about putting breakpoints into every function for debugging
<katlogic> many suspect that approach is unnecesarily complicated though; and result of legacy of V8 being initially very naive JIT like this
<katlogic> gc overflow is checked simply on allocations, uh?
<Cheery> nah. it's not checked at all right now
<Cheery> it crashes if you write a program that uses enough memory.
<Cheery> planning to throw in : if (over_limit()) run_gc(...) in the code generation
<katlogic> oh, you use on-stack vars?
<Cheery> everything sits in the stack
<katlogic> ah, this is what chicken lisp does
<Cheery> though that's not practical if the user allocates something large.
<katlogic> all allocations on stack, and copying gc pulls out used values to new stack frame
<Cheery> yup
<katlogic> to check for overflows, it simply installs trip page when arch supports it
<katlogic> or simply checks for watermark each call
<Cheery> thought about the latter.
<katlogic> well now i look at it what you're doing very resembles chicken lisp :)
<katlogic> though clisp has C function per basic block (meaning it merges list of call statements into one C func)
<Cheery> it might make sense for me to do the same.
<Cheery> anyway I love the speed by which this was possible to create
<katlogic> yeah, lisp is awesome :)
<katlogic> how does it unroll the c stack when gc triggers, setjmp?
<Cheery> going to do the setjmp
<katlogic> you might want to consider if (!continuation1()) ... continuation1: if (!continuation2()) ...
<katlogic> and when gc triggers
<katlogic> simply return :)
<katlogic> (also what chicken lisp does)
<Cheery> hahaa. you mean it implements call as goto; ?
<katlogic> when, possible in same C function, yeah
<katlogic> for example tail recursion loop is usually c function with gotos
<Cheery> and the return causes one super-stack-frame to clean.
<Cheery> that's clever
<katlogic> well, its not single mega-c function
<katlogic> it chops it to several such superframes
<katlogic> anyhow check out its output
<katlogic> that compiler is not particularly efficient either (compared to STALIN or SBCL, or modern JITs), but the tricks there are cute
<Cheery> I guess it may be good idea.
<Cheery> though the trickset is likely very similar to ones already in here.
<Cheery> the compilation strategy is the same
<Cheery> I enjoy the possibility to get the thing running immediately, even if slow. Allows me to figure out what works and what doesn't.
<katlogic> I'm old and bitter and already wrote few half-assed compilers, hence the nagging "you wont beat the big guys".
<katlogic> but hit me up if you'll ever start doing tracing jit, im kinda getting tired of luajit :)
<Cheery> depends on how I'll get the things. Might ask you to look sometime just to verify that the design works.
<Cheery> no the benchmarks but the overall quality of the language
<katlogic> as for design of language semantics, better ask devyn or somesuch :)
<katlogic> Cheery: if i had to nitpick now, s-expressions seemed especially powerful to me together with lists
<katlogic> i'm not sure resetricting oneself only to arrays is a good idea
<Cheery> this is not in yet.
<Cheery> it's sort of another idea to extend the amount of things I'm doing inside the language
<katlogic> good scheme implementations simply optimize list operations to array operations whenever appropiate (ie there are no concatenations of lists)
<katlogic> Cheery: i see, human-readable spin on the whole car-cdr-cons-atom saga.
<Cheery> and here's another thing. slightly lazily copied from wiki page and ported.
<Cheery> I don't know how long these things will last. Wanted to do it this way at first. :)
<katlogic> which reminds me to try quadratic probing in luajit
<katlogic> because its chained hashing is pretty slow as it stands it turns out
<Cheery> I need to get going now. trying to write up a good description of the cps pass, and the compilation to C. also describing the idea of directly interpreting what you get.
<Cheery> well. once I get back.
<Cheery> thanks for giving it a look.
prophile has quit [Quit: The Game]
<gq> bored. fuq.
<gq> the good news is i reactivated my github acct
<gq> i mean it was never GONE
<gq> i just sort of....forgot about it n.n
<gq> -what
<purr> <vil> elliottcable: do I have to scream at yellow paint to use vim? is that why I'm not an expert yet?
<gq> -what
<purr> <IamTash> what's klined, hobbits?
<gq> -what
<purr> <alexgordon> fuck C++ up the comma operator
<Cheery> I read that the mill architecture is exploiting the C++ comma operator. they're using C++ as an assembly language
<Cheery> they mentioned it in a video too..
<gq> huh. weird.
<Cheery> every instruction in the architecture can contain 33 distinct operations.
<Cheery> I understood they combine those operations into instructions with overloaded comma operator
Rusky has joined #elliottcable
sharkbot has quit [Remote host closed the connection]
sharkbot has joined #elliottcable
Rusky has quit [Quit: Leaving.]
oldskirt has quit [Ping timeout: 245 seconds]
oldskirt has joined #elliottcable
prophile has joined #elliottcable
<Cheery> going to a walk. after the walk I'm probably cleaning that up a bit. Might even go far as rewrite my compiler and splatter it there instead. :)
<gq> heh
perrier has joined #elliottcable
prophile has quit [Quit: The Game]
Rusky has joined #elliottcable
Rusky has quit [Client Quit]
Rusky has joined #elliottcable
<Cheery> updated it
<Cheery> I guess I'll play a game. prep this thing soon and then wire it up for deliver for tomorrow
<Cheery> at once, for a long while, I've got the article ready before the monday :)
eligrey has joined #elliottcable
<alexgordon> ChanServ: "transpiling" ?
<alexgordon> you mean compiling? :P
<joelteon> cum piling
<Cheery> hmm.
<Cheery> okay
<Cheery> it's a compiler
<alexgordon> Cheery: well also, since most compilers compile to llvm these days...
<alexgordon> and llvm is a mid-level language like C
<joelteon> alexgordon dropping the knowledge
<joelteon> heya lex
<joelteon> alex
<joelteon> way to go
<alexgordon> joelteon: *eyebrow*
* joelteon transforms into an eyebrow
* alexgordon optimizes away joelteon
<joelteon> fuck
<alexgordon> NOTHINGS CAN'T SPEAK
<joelteon> speaking of compilers, i'm compiling one
<alexgordon> joelteon: really?
<joelteon> yep
<Cheery> I need to rewrite mine tomorrow
<joelteon> gcc
<joelteon> again
<joelteon> for the third time since yesterday
<Cheery> the cps compiling step from that guy was good
<Cheery> but when I studied it, realised it can be even better and beat shit out of my compiling step
<joelteon> and now openssl's test suite is running
<joelteon> my god
* gq sniffles
yorick has joined #elliottcable
katlogic has quit [Read error: Connection reset by peer]
katlogic has joined #elliottcable
eligrey has quit [Read error: Connection reset by peer]