« first day (1730 days earlier)      last day (3232 days later) » 

9:00 AM
@orlp nice one
 
smashes head against desk
 
9:17 AM
@Scott is ded
liek so ded
 
9:28 AM
@rightfold I noticed one issue with having a different alignment requirement for every Type - it makes it impossible to iterate over the heap linearly, since you don't know how many bytes you need to align with
@rightfold So I'll just take the maximum alignment and align everything to that
 
user1804599
Why do you want to iterate over the heap?
 
after marking all objects I want to iterate over the heap to check if an object is alive, and copy it to the start of the heap to compact it
 
would a type safe lisp make sense?
 
user1804599
@orlp While marking the objects, put their addresses in a set.
 
define type safe?
@rightfold I prefer not to - it makes GC O(n log n)
since I have some space for a bit inside every Object I can do it in O(n)
 
user1804599
9:35 AM
ok
 
statically-typed
 
user1804599
There are statically typed lisps.
 
for example typed racket: docs.racket-lang.org/ts-guide
 
user1804599
And Clojure has a library which offers static typing.
 
as for 'make sense'
I'd say probably not tbh
 
user1804599
9:38 AM
Why not?
 
from what I understand 'typed lisp' is a two part system that make it useful: a set of macros to make type checking and enforcing more convenient, and a compiler that can understand the meaning of the macros to make code more efficient
but in the end it's still a dynamic language - just with some checking and optimizations layered on top after 'decoding' the dynamic object
 
user1804599
Lisp programs are data structures.
 
user1804599
The compiler can interpret those data structures in any way it likes, and it can do static type checking just fine.
 
yes
but that's still 'interpreting' data as a certain type
 
user1804599
Data is useless if you don't interpret it in some way.
 
9:40 AM
it's making like a little enclave of type assertions inside a dynamic language
I wouldn't call that a statically typed language
 
isn't compiler too strong a word?
 
no
 
user1804599
@orlp It's not a language until you treat it as a language.
 
don't get me wrong
 
user1804599
You can take Clojure's reader to read a data structure and turn it into a C++ AST and pass it to clang.
 
9:41 AM
I think statically typed lisp is interesting, and definitely useful
but it doesn't make 'sense', intuitively
it's not elegant
 
user1804599
I have yet to see a lisp which isn't terrible anyway.
 
(unlike the rest of lisp)
 
user1804599
Maybe I should try LFE.
 
I thought you liked lisp?
 
user1804599
Though I wish it had syntactic sugar for tuples, like {1 2 3} instead of (tuple 1 2 3).
 
9:43 AM
tuples?
is this something LFE specific?
 
user1804599
Yes, tuples.
 
user1804599
Erlang has tuples, and LFE targets Erlang, so it also has tuples.
 
is that similar to scheme's vector?
or?
 
user1804599
No, more like Haskell tuples.
 
user1804599
You typically always know beforehand the size of a tuple.
 
9:44 AM
ah not familiar with those
 
user1804599
There are functions you can use to concatenate tuples and to append to tuples, but you pretty much never use those.
 
user1804599
They're like C++ std::pair.
 
user1804599
@orlp Yeah.
 
std::tuple?
hurr
little brainfreeze there :P
 
user1804599
For example, erlang:timestamp/0 returns {MegaSecs, Secs, MicroSecs}.
 
user1804599
9:46 AM
E.g. {1234, 1234, 1234}.
 
I should think of tuple as an atom type in lisp, I assume
 
user1804599
Step one is to define "lisp". There are many lisps.
 
user1804599
Clojure doesn't have atoms.
 
user1804599
What are atoms?
 
hrm?
what is 1 in clojure?
 
user1804599
9:48 AM
An integer.
 
yes, but it's not a list
so it's an atom
 
user1804599
OK.
 
user1804599
Well, if atom means "not a list" then tuples are atoms.
 
basically an atom as far as I understand is any non-data structure in lisp
 
user1804599
Not to be confused with Erlang/LFE atoms which are like Ruby symbols.
 
9:50 AM
and that's not really a proper definition either
I consider strings to be atoms
but you could consider strings to be data structures containing characters
in pseudocode, (type->string (type-of (tuple 1 2 3))) should print tuple-3?
 
clojure has Atoms
 
or
 
but they are used for concurrency
 
that's an entirely different meaning for atom
not really related
 
that's the point
 
9:52 AM
but I can see the confusion
I think you could say (define atom? (obj) (not (list? obj)))
 
user1804599
Clojure atoms are mutable variables that you can use with STM.
 
user1804599
ooh wait LFE does have sugar for tuples
 
user1804599
#(1 2 3)
 
Ell
I thought of a way I could stream my installation
 
I might be making a fool of myself right now, but even if it didn't exist, couldn't you make it yourself with reader macros?
 
user1804599
9:56 AM
But concurrency in Clojure sucks.
 
user1804599
It has no green threads.
 
user1804599
So you constantly have to worry about not invoking blocking APIs.
 
Clojures biggest strength and weakness to me seems that it's java based
 
user1804599
And deal with inferior hacks such as macros that transform linear code into state machines.
 
or well, JVM
 
user1804599
9:58 AM
Just wait for Mill.
 
I think I might've said this before, but perhaps Mill isn't the most wise choice of name right now
 
user1804599
WHY NOT
 
if the Mill CPU takes off you're going to have to deal with confusion and people not finding your stuff because they're only finding mill cpu stuff
 
user1804599
I have to choose now.
 
user1804599
What to write: type checker or interpreter?
 
10:01 AM
wait, you don't even have an interpreter yet?
or
are you talking about a 'type interpreter'?
 
@Ell What is it? Dragons?
 
user1804599
A bytecode interpreter.
 
user1804599
I already implemented module loading and type reification in the VM.
 
I'm confused
can you run Mill source files right now?
or do you need the interpreter for that
 
user1804599
@orlp No.
 
user1804599
10:02 AM
millc turns them into millm files which can be executed by the VM.
 
user1804599
But both are not yet implemented.
 
but you have no VM?
oh
 
user1804599
@orlp Only the interpreter part of the VM is missing.
 
start with the interpreter
so you have an API to code against
 
user1804599
 
> javascript
ugh
to be honest, I think the entire software development world is making a MASSIVE mistake by continuing to build upon javascript
this is NOT the language you want to build the rest of your infrastructure on top of
and once it's in place it'll be incredibly hard to get rid of
 
user1804599
@orlp I write a VM in JS because JS lacks threads and I want threads.
 
user1804599
I'm wondering.
 
I'm not criticizing your choice of writing a VM.
 
user1804599
Why don't computers have dust filters in their openings, and occasionally enable a fan which blows away all the dust in the filter?
 
10:08 AM
I'm criticizing (by proxy via you) the industry's mistake to consistently extend and rely on javascript.
@rightfold my case has removable filters
 
user1804599
I want autocleaning filters!
 
@rightfold and I want free blowjobs!
 
I'm aware
 
user1804599
Problem solved!
 
10:10 AM
should be called /r/randomactsofblowjobinotherlocationsthanyoursdonetopeoplethatarentyou
 
user1804599
@orlp there is no other way.
 
@rightfold there is
 
user1804599
The customer wants a web app and the web only offers JavaScript.
 
Ell
@nabijaczleweli use virtualbox with writethrough
 
> the web only offers JavaScript
well there you fucking go
stop offering only javascript
 
user1804599
10:11 AM
well
 
user1804599
no matter which language you support
 
user1804599
the dunning krugers of the web world will destroy it
 
the core of the problem starts at the CPU though
another reason why I'm interested in the Mill CPU
 
user1804599
what is it
 
you need reliable and fast memory protection
so that you can virtualize memory access per process cheaply
and make process, interrupts and jumping between processes cheap
 
user1804599
10:15 AM
You can't tell me what I need!
 
so you can fully sandbox, say, applications written in C++ to the web
 
user1804599
@orlp run everything in V8 in kernel space.
 
@rightfold sudo firefox
 
user1804599
That's not in kernel space.
 
fair enough
 
Ell
10:17 AM
The big browser boys have agreed on working on a bytecode anyway
 
user1804599
 
user1804599
@Ell The only advantage of bytecode is that it is possibly smaller than JS code.
 
@rightfold that's just retarded
that's what I mean
STOP BUILDING ON JAVASCRIPT
 
user1804599
Well then, let's write an interpreter!
 
I predict
 
user1804599
10:19 AM
I currently use YAML to represent the instructions but maybe I'll design a binary format right away.
 
in 10000 years
we'll have technology so advanced we'll be a type 2 civilization
 
user1804599
In 10000 years everybody still writes JavaScript.
 
with insanely fast computers
 
user1804599
Quantum JavaScript.
 
running 8 javascript interpreters embedded in eachother
making everything so slow it's still as slow as today :D
 
user1804599
10:20 AM
Software becomes slower to cancel out Moore's law.
 
user1804599
This is what a module file looks like right now: github.com/mill-lang/horror/blob/master/test/testdata/mill/…
 
needs more binary format cause muh hard drive
(/s)
 
user1804599
more like muh bandwidth :p
 
oh right
cloud compilation technology
 
user1804599
But this is easier to debug.
 
user1804599
10:23 AM
@orlp VM runs in the web browser.
 
user1804599
So all modules have to be downloaded.
 
user1804599
There may be JIT compilation for subroutines the VM can prove don't suspend the calling thread.
 
user1804599
But I don't worry about that right now.
 
Yes, because the REST call must come from the C++ code where in there there are security keys that are stored and things hidden from Javascript code — xybrek 58 mins ago
can we say security by obscurity
good morning
 
mourning
 
10:33 AM
lolwut. That's security by obscurity if ever I saw it. Your security is pretty flimsy anyways if it relies solely on some key hardcoded in the client. And even if so, why don't you just expose an encryption method? It doesn't make much sense to recreate an entire REST client just to hide the encryption. (I appreciate the challenge, but it's frequently wise to choose how you expend your energy. Basic martial arts) — sehe 50 secs ago
@nabijaczleweli That's my line
 
@sehe Not anymore it isn't
 
Actually, others have used it extensively.
 
Ell
@rightfold and more predictable optimisation, right?
 
user1804599
I have no idea what you're talking about.
 
Ell
For the bytecode
 
10:52 AM
what bytecode
 
@rightfold I'm wondering, the variable environments for lambda and the global scope, they should be managed by the GC as well, right?
since if a lambda gets collected, so should it's associated environment?
on the other hand, this can be done with simple shared_ptrs, since environments aren't first-class objects (yet) and can't form cyclic references
to everyone, is std::move for POD structs the same as std::memmove?
 
user1804599
@orlp I don't see why not.
 
user1804599
Making the GC manage all memory is easier.
 
@rightfold except std::map isn't POD :P
hence my other questions
 
user1804599
What are you using std::map for?
 
11:03 AM
mapping symbols (currently implemented as simple strings) to Object*s
 
user1804599
Globals?
 
user1804599
Just use std::map<GCPtr> globals;.
 
user1804599
Where GCPtr is a smart pointer which enroots the object on construction and deroots it on destruction.
 
eh
 
user1804599
I thought you meant you wanted the objects referenced by global variables not to be GCed.
 
11:04 AM
@rightfold I'll have more than just globals though
 
user1804599
But you obviously want to otherwise you're complicating everything.
 
every lambda has its own scope
 
user1804599
Make lambdas store arrays of objects, not maps.
 
user1804599
Oh wait you're not compiling to bytecode hahaha!
 
user1804599
11:05 AM
Well then I don't know. I've never written AST interpreters.
 
user1804599
If you generate bytecode you can erase names and use integral indices instead.
 
@orlp What would that have to do with anything?
 
@Puppy I'm moving chunks of memory around, since I'm using a compacting GC
 
Didn't do much of bushwalk, more of a photo session
 
11:06 AM
then don't write your compacting GC to stupidly memmove everything.
 
@chmod711telkitty send those to someone that knows how to work with raw image files and you can get images that look twice as good
 
@Puppy hence my other questions about std::move
 
std::map has a move constructor.. if you want to move the map, use it.
 
@orlp what are you implying :'(
 
11:07 AM
@chmod711telkitty nothing
I didn't say they didn't look good
all I'm saying is that they would look a lot better with post processing
 
user1804599
@orlp I suppose you can store move functions in your vtables.
 
user1804599
Then you might be able to use non-PODs.
 
@orlp I... don't really see what that has to do with anything. Logically, you can just copy the PODs and it's going to be the same thing.
 
to bring out the dynamic range or some shit like that
@Puppy there's some issues though
 
Ell
Time to try my homemade initramfs
 
11:09 AM
@orlp That's because you utterly moroned it and failed "How to pointer arithmetic"
 
@Puppy no
that was intentional you idiot
I was making a point
 
it was intentional that you moved the A into some random memory slot already occupied by the A?
 
std::move fails if the new location overlaps the old location
std::memmove does not
in a compacting GC, the locations can overlap
 
I hate that it's <type_traits> while it's <typeinfo>
 
user1804599
Create a new heap in the collection phase.
 
11:10 AM
temporary storage
use it
 
user1804599
Move everything to that.
 
@rightfold don't know how large that needs to be until I've compacted
@Puppy possible, but then I literally double the cost of copying
 
user1804599
Twice as large as the old heap.
 
@orlp Not really.
 
@rightfold no, it doesn't need to be
 
user1804599
11:11 AM
Or well.
 
you already have a bunch of free space lying around from the objects you already compacted.
you only need temporary storage for the first few objects..
 
user1804599
As large as the old heap plus the size of any objects you still want to allocate.
 
user1804599
Then you're safe.
 
@rightfold still grows unbounded in a simple for loop that only produces garbage
 
in fact
 
11:12 AM
@orlp You'll know after mark phase
 
the old and new locations can't really overlap at all for a compacting GC
unless it's the first few objects.
 
@CatPlusPlus oh wait I can make mark return the size, ofc
 
otherwise, you will have freed more than sizeof(A) space already and therefore the locations can't overlap.
so really this condition cannot trigger in the general case at all.
 
btw you probably don't want to compact on every collection
 
@CatPlusPlus I do
my allocator is a simple increment pointer algo
I don't keep freelists n shit
 
11:15 AM
Compaction has kinda big overhead on the collection
 
the thing is
without compaction you need to have a lot more complexity
dealing with fragmentation, freelists, etc
 
Well yes, but you seemed to care about overhead so :v
 
k, this makes things a lot simpler thanks to cat
I can precisely figure out how much space I use for alive objects, and then allocate 1.5x that
move over
and swap vectors, done
 
well, you should be increasing the size of the heap on collection anyway
 
@Puppy not necessarily
consider a simple for loop that only generates garbage
(not that uncommon for for loops)
it would grow the heap unbounded
if you always increase the size of the heap on collection
 
11:19 AM
you'd have to generate a tremendous amount of garbage for it to actually grow the heap unbounded
 
That's true whether you have a GC or not
 
n^2 garbage for n-sized heap.
 
you want to grow the size of the heap based on the amount of live objects
 
If you keep allocating you'll hit some limit eventually
 
user1804599
dunno whether the breakpoint instruction should increment the program counter.
 
user1804599
11:20 AM
probably not
 
Managed heaps usually have a fixed upper limit smaller than available memory to handle that semi-gracefully without triggering OOM killers
 
didn't know you could do that
but I guess the address of a statically allocated variable is constexpr
 
Ell
That isn't the address
Where are you taking the address?
 
it's a reference - it works by taking the address implicitly, and dereferencing the resulting pointer implicitly
 
all statics have constexpr addresses I believe and as a result references
 
Ell
11:26 AM
I don't think it does
 
the compiler knows where a statically allocated variable will be in the executable
 
user1804599
@orlp iff it has external linkage.
 
err
when I said 'statically allocated' I meant 'externally linked'
hurr durr
 
@Ell It does.
 
12:15 PM
hmm should I hash my tuples or introduce ids?
 
user1804599
you should be more specific
 
thought so
well I am trying to implement ecs using only static polymorphism. As it is I represent each object class with an std::tuple. Now for efficient addition/removal I need to map each tuple object to a position however std::tuples are not hashable. So I either implement a hash for tuples or I wrap the tuples to a class that keeps an id internally.
 
that is hilariously pointless
not only is ECS thoroughly pointless, but the only point it even has in theory is that the components are dynamic...
 
user1804599
lolwat
 
user1804599
why are tuples not hashable?
 
12:24 PM
@Puppy that's like your opinion.
 
no shit
that's probably why I typed it
if you wish we could migrate to a system where you express my opinions
 
when I express my opinion I usually say "in my opinion" or "I think that" etc. Not "this or that is".
 
how do I elegantly write has_foo<T>::value that is true if T has a member function named void foo() (or without signature check if much simpler/impossible), and false otherwise?
 
user1804599
Not very easy.
 
12:29 PM
I'd be willing to drop the 'has particular signature' if it significantly simplify things
 
user1804599
Because you have to distinguish between member functions and callable data members.
 
user1804599
Maybe by using SFINAE with casting to a member function pointer.
 
user1804599
Though that doesn't work with static member functions.
 
I don't have to protect against arcane misuse
it's just to make generating some arrays simpler
(hint: I'm doing vtables without actually using vtables)
 
@rightfold I assume I can add an is_same to yours to also check signature?
either way thanks guys
 
user1804599
No.
 
oh
 
user1804599
You can in no way query the signature.
 
why?
 
user1804599
12:39 PM
Overloads and templates.
 
rightfold's is more clear.
 
did you check veritas's?
@rightfold you can't overload
@rightfold there can only be one return type for every set of input types
@rightfold the set of input types for foo that we check for is determined
(in this example, ())
 
user1804599
dude
 
user1804599
one mention is enough
 
Ell
Fuck it I'm going to go with MBR
 
12:46 PM
main boot record?
 
Ell
Master boot record
Instead of GPT
Guided partition table
 
@nabijaczleweli cool thanks
@rightfold you're claiming ^ doesn't work, why?
 
user1804599
aaaaaaaaaaaaaaaaaaa how to implement discriminated unions
 
boost::variant
welp
since I started porting Wide to Clang 3.6 I found quite a few bugs
 
12:59 PM
In Clang or in Wide? :P
 

« first day (1730 days earlier)      last day (3232 days later) »