ec changed the topic of #elliottcable to: #
<alexgordon> ehhh
Sgeo has joined #elliottcable
<purr> <alexgordon> ← the maths is strong in this one
eligrey has joined #elliottcable
cloudhead has quit [Ping timeout: 240 seconds]
<alexgordon> hm
<alexgordon> I'll be away from the internet for the next 2 days
<alexgordon> I should hack on furrow
alexgordon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
alexgordon has joined #elliottcable
<alexgordon> cuttlebone: I'VE CRACKED IT!
<alexgordon> cracked how I'm going to build furrow
<alexgordon> actually I already cracked it months ago but I'm going all out on this strategy
<alexgordon> see what gets me every time is the *grind*
<alexgordon> there's lots of grinding to making a compiler
<alexgordon> all these different bits, have to faithfully translated from the design into the code
<alexgordon> especially in C++ you end up with a shitton of code for each little part of the design
<alexgordon> but the transformation is very mechanical. so before I came up with this idea of writing stuff in a .txt file, then writing a python script to make the .cpp code...
<alexgordon> but it just came to me, just now
<alexgordon> why not write the *whole compiler* that way
<alexgordon> write little to no C++ code myself, just human readable .txt files and some python scripts to generate the .cpp
<alexgordon> seems like a very beautiful way of making a compiler
<alexgordon> = less text + quicker to write + more readable + don't need to write C++ + self documenting = brilliant
<alexgordon> can even generate tests directly from the design .txt files
alexgordon has quit [Quit: Computer has gone to sleep.]
<joelteon> man my music library is soooo miscategorized
<joelteon> guhdamn
PragCypher has quit [Ping timeout: 264 seconds]
PragCypher has joined #elliottcable
<purr> <malia> Jenna is jenna and your friend and that is cool
Sorella has quit [Quit: Ex-Chat]
whitequark has joined #elliottcable
<whitequark> ELLIOTTCABLE: I suggested Don't Starve
<whitequark> it's fucking awesome and also eats too much time, so I don't play it anymore.
<whitequark> another suggestion: Gunpoint.
eligrey has quit [Quit: Leaving]
gazoombo has quit [Ping timeout: 240 seconds]
gazoombo has joined #elliottcable
<purr> <Eridius> I still haven't been taught Paws, but I'm a bit scared to ask
alexgordon has joined #elliottcable
sharkbot has quit [Remote host closed the connection]
sharkbot has joined #elliottcable
alexgordon has quit [Quit: Computer has gone to sleep.]
<purr> <elliottcable> sometimes I feel like the gqbrielle of programmers.
yorick has joined #elliottcable
cloudhead has joined #elliottcable
cloudhead has quit [Ping timeout: 264 seconds]
<purr> <elliottcable> If you mention CoffeeScript, I'm going to slap you with my tornado.
<whitequark> -stop
<ELLIOTTCABLE> -start
<whitequark> ELLIOTTCABLE: it's annoying
yorick has quit [Remote host closed the connection]
<purr> <alexgordon> the problem with C++ is: literally every part
cloudhead has joined #elliottcable
<ELLIOTTCABLE> White quark: that's largely the point, silly
<whitequark> meh
<purr> <prophile> I don't have a sleep pattern so much as a sleep PRNG
<cuttlebone> ELLIOTTCABLE: i am
<cuttlebone> hungover
<cuttlebone> it's starting to get better though
<joelteon> ooh, javascript
<joelteon> i remember when people write javascript directly
<joelteon> now it's just a target language for compilers
<joelteon> wrote*
<joelteon> how times change
<cuttlebone> joelteon: we need a proper vm in the web platform
<joelteon> word
<whitequark> pnacl
<cuttlebone> whitequark: what's going on on that front?
<cuttlebone> I haven't heard much lately
<whitequark> google's going full-on on it
<cuttlebone> that's good to hear
<whitequark> do you know
<whitequark> that DWARF debugging information includes bytecode for a stack machine?
<whitequark> it's turing-complete, of course
<whitequark> it has goddamn subroutines
<whitequark> YO DAWG I HEARD YOU LIKE PROCEDURES
<joelteon> yo dawg, i herd you like procedures, so i fucked your sister
PragCypher has quit [Quit: Leaving]
eligrey has joined #elliottcable
<cuttlebone> joelteon: lol
<cuttlebone> whitequark: what's dwarf debuging?
<purr> lol
yorick has joined #elliottcable
alexgordon has joined #elliottcable
<alexgordon> ANYBODY HERE?
<alexgordon> :(
alexgordon has quit [Quit: Computer has gone to sleep.]
alexgordon has joined #elliottcable
<alexgordon> man, module systems are so fucking hard
<alexgordon> MICAAAAAAH
<alexgordon> trying to build a module system and associated linker that correctly handles both versioning and both internal and external circular dependencies
<alexgordon> while allowing dynamic linking
<alexgordon> and static linking for that matter
<alexgordon> hmmmm
<alexgordon> hash-addressed libraries?
yorick has quit [Remote host closed the connection]
<joelteon> i love modules
<joelteon> just as long as id on't have to do them
<joelteon> what's cool is
<joelteon> docker!!!
<joelteon> docker
<joelteon> go docker
<alexgordon> joelteon: TALK TO BE ABOUT MODULE SYSTEMS
<joelteon> to who
<alexgordon> AND LINKERS
<alexgordon> TO ME
<joelteon> ok
<joelteon> what's the problem pal
<alexgordon> I've gone done an ELLIOTTCABLE
<alexgordon> I've designed how I *want* my module system to work
<alexgordon> but I have no idea how to make it work efficiently
<alexgordon> how I want it to work is that each "module" is a directory of source files
<alexgordon> each file can import symbols from other modules (it automatically gets all the symbols from the other files in that module)
<alexgordon> and each file can export symbols
<joelteon> uh huh
<joelteon> ok i'm with you so far
<joelteon> sounds like most other module systems i've seen
<alexgordon> yeah a bit
<alexgordon> ok but the hard part is: this all has to work in a compiled language
<joelteon> like haskell or rust?
<alexgordon> or C
<alexgordon> and the problem with compilers is: they're slow
<alexgordon> I hate slow compilers
<joelteon> but how slow
<alexgordon> what I want to avoid is recompiling the *whole program* each time
<joelteon> GHCi can build and link deps pretty fast
<joelteon> ok
<alexgordon> if you have a program with 1000 source files
<alexgordon> and you change one module
<joelteon> you mean only rebuild changed files?
<alexgordon> it shouldn't recompile Every. Other. Module.
<joelteon> and things that depend on them?
<alexgordon> preferably not even things that depend on them
<joelteon> how would you do that though
<joelteon> what if they need one of the new symbols
<alexgordon> C gets away with it
<alexgordon> then they've also changed
<joelteon> oh right
<joelteon> lol
<purr> lol
<alexgordon> if you have a dylib and you change it, you don't have to compile the code that links it
<alexgordon> unless you change that too :P
<joelteon> ok
<joelteon> well
<joelteon> ok we've been out of my depth since about 3:40
<alexgordon> LOL
<joelteon> but i know ghc has to recompile everything that depends on whatever module
<joelteon> and building shit in ghc takes forever
<alexgordon> yeah...
<alexgordon> but C is relatively fast if you use a wrapper that tracks changes
<joelteon> yea
<alexgordon> erm *build system
<joelteon> so like
<joelteon> if you have the function foobar that takes an int
<joelteon> and you want to change foobar to be more efficient
<joelteon> but the interface is the same
<joelteon> nobody should have to recompile
<joelteon> makes sense
<joelteon> but how to do
alexgord_ has joined #elliottcable
<joelteon> how do you determine whether dependencies have changed? I assume you hash something
alexgordon2 has joined #elliottcable
alexgordon has quit [Read error: Connection reset by peer]
<alexgordon2> wtf
<joelteon> oh
<alexgord_> oh now I'm back
<joelteon> how much of that did you get
<alexgord_> weird
<alexgord_> [23:44:26] <+alexgordon> just track changes to each module and put it into its own little zone
<alexgord_> [23:44:41] Disconnected
<alexgord_> [23:44:45] <alexgordon> shit
<alexgord_> [23:46:04] alexgord_ (~alexgordo@79.141.135.210) joined the channel.
<alexgord_> [23:46:12] <+joelteon> how do you determine whether dependencies have changed? I assume you hash something
<joelteon> heh
<joelteon> like in the build directory, have somefile-md5suffix.o
<alexgord_> joelteon: yeah mtime + hashing to determine it. It's fairly standard in build systems
<joelteon> but instead of hashing the contents, you form some kind of serializable representation of the interface it exposes
<joelteon> and hash that
<alexgord_> right but I was getting to the problem
<joelteon> ok
<alexgord_> it's easy to do THAT, you just make an object file for each module
<alexgord_> then get a inker to link them together
<alexgord_> but I have other demands
<joelteon> oh boy
<alexgord_> xD
<joelteon> not requests
<alexgord_> like I want to do circular dependencies
<joelteon> that is
<joelteon> ambitious
<alexgord_> and versioning
<alexgord_> e.g. I want to be able to have multiple versions of the same module in the same program at once
<joelteon> o-o
<joelteon> this could change everything
<alexgord_> haha
<joelteon> assuming you can do it
<alexgord_> node is pretty much the only language that can do it right now
<joelteon> it's just stuff you add to the hash
<alexgord_> "language"
<joelteon> "language"
<alexgord_> yeah
<alexgord_> but all with fast compilation
<alexgord_> can't get my head round it all
<joelteon> if you make it interpreted, you don't need compilation!
<alexgord_> joelteon: so what we know is, each module exports some symbols of a specific "version", it imports some symbols of specific "versions"
<alexgord_> that is the contract
<alexgord_> lolol
<purr> lolol
<alexgord_> fuck that
<alexgord_> compilers rock
<alexgord_> joelteon: oh and I didn't even get to the good bit yet
<alexgord_> the way I'm building this is that furrow outputs C++ files (so .cpp and .hpp)
<alexgord_> now certain C++ features (like templates) have to be present in an hpp file if they are to be exported
<alexgord_> you can't export a template
<alexgord_> except in a head file
<alexgord_> so the question really is
<alexgord_> how do you map a given furrow module to a given set of .cpp files and .hpp files
<alexgord_> presumably one .cpp file for each module
<alexgord_> but the .hpp files are tricker
<alexgord_> and a related question is: how do you order the declarations in each .hpp and .cpp file so that dependencies are satisfied (seems like it will involve a topological sort)
<alexgord_> thing is, furrow doesn't have the same kind of polymorphism as haskell does
<alexgord_> in haskell you can do
<alexgord_> map :: (a -> b) -> [a] -> [b]
<alexgord_> and there's no problem because a and b, [a] and [b] are polymorphic
<alexgord_> but in furrow that has to be a template
<alexgord_> template<typename A, typename B> List<B> map(Func<A(B)>, List<A>)
<alexgord_> and that map function *and its definition* must come *before* any uses of it
<alexgord_> which means that anything that map uses must come before map...
alexgordon2 has quit [Quit: Page closed]
<purr> <alexgordon> (that was an enema joke, my first ever)
<joelteon> oh jeez
alexgordon has joined #elliottcable
alexgord_ has quit [Ping timeout: 246 seconds]
alexgordon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]