IRC channel logs

2019-09-14.log

back to list of logs

<xentrac>I never implemented ports in Ur-Scheme
<xentrac>actually I never implemented GC either, which is pretty questionable but probably okay for the limited purpose of compiling small programs on modern hardware
<xentrac>and Ur-Scheme does a lot of its allocation on the stack --- not conses, but local variable bindings when nearly the dumbest possible escape analysis shows it to be same
<OriansJ>xentrac: GC can be rather trivial https://github.com/oriansj/Slow_Lisp/blob/master/lisp_cell.c#L169
<OriansJ>well finally got the scheme version of hex2 up to the level of a working hex0; now to add support for pointers
<OriansJ>For those following intently: https://paste.debian.net/1100644/
<OriansJ>nckx: ^_^
*nckx waves.
<OriansJ>anyone know how to the the guile version of C's "unsigned value = displacement;"?
<OriansJ>aka convert a negative number into its 32/64bit equal representation in binary?
<OriansJ>well the ugly way of (set! value (logand #xFFFFFFFF displacement)) I guess sorta works
<OriansJ>Getting real close to done: https://paste.debian.net/1100662/
<OriansJ>Ok minimal hex2 version is up (now just comes filling in the missing pieces and testing)
<OriansJ> https://github.com/oriansj/slow-utils/blob/master/hex2.scm
<OriansJ>right now it only supports hex input, x86 and AMD64 targets but filling in the rest should be rather mechanical.
<OriansJ>I must say scheme's lack of return forces some inefficient constructs
<OriansJ>got basic armv7l and aarch64 support (now just need to add octal and binary)
<OriansJ>appearently write-byte to a binary port doesn't actually mean write a byte... How fun
<OriansJ>logand with bitmasks are clearly my best friend into the world of scheme (why would anyone want "#\newline" when writing "\n" to a binary port?)
<OriansJ>janneke: play with slow-util's hex2 to see if it is good enough (I just finished getting it to feature parity)
<OriansJ>(commits are up)
<janneke>OriansJ: i'm sure you found out that `write' uses `read' syntax, `display' procudes the actual value; write-char uses actual value too...
<janneke>OriansJ: great to see you're "having fun" with scheme
<janneke>i don't really get the 'lack of return' thing, i thought you're a lisper?
<janneke>a first test run of hex2.scm works beautifully!
<janneke>now for a full mes check
<OriansJ>janneke: I think 3 years of assembly programming has made me notice wasted steps and duplicated computational effort. I guess hard exposure to all of the low level languages made me language neutral.
<janneke>OriansJ: your `lack of return' remark just puzzled me; esp. as scheme == lisp
<janneke>and i thought you once were a lisper :)
<janneke>maybe you/we want to keep the scheme code mostly identical to its M2 implementation, for review and updates?