alexgordon changed the topic of #elliottcable to: https://gist.github.com/atg/0c323cc4b80c7372d05de77ab39b5d32 slash-𝕯𝖊𝖓-𝖔𝖋-𝕯𝖊𝖙𝖊𝖗𝖒𝖎𝖓𝖊𝖉-𝕯𝖆𝖒𝖘𝖊𝖑𝖘 || #ELLIOTTCABLE is not about ELLIOTTCA
cloudhead has quit [Ping timeout: 244 seconds]
embri0n has joined #elliottcable
embri0n has quit [Quit: Leaving...]
_whitelogger has joined #elliottcable
pelegreno has quit [*.net *.split]
Sgeo_ has quit [*.net *.split]
silentbicycle has quit [*.net *.split]
ChanServ has quit [*.net *.split]
aredridel has quit [*.net *.split]
pikajude has quit [*.net *.split]
ohhmaar has quit [*.net *.split]
incomprehensibly has quit [*.net *.split]
brixen has quit [*.net *.split]
ec\ has quit [*.net *.split]
gkatsev has quit [*.net *.split]
brr has quit [*.net *.split]
Sorella has quit [*.net *.split]
ljharb has quit [*.net *.split]
jwheare has quit [*.net *.split]
glowcoil_ has quit [*.net *.split]
Guest24510 has quit [*.net *.split]
dsamarin has quit [*.net *.split]
irclogger_com has quit [*.net *.split]
yorick has quit [*.net *.split]
krainboltgreene has quit [*.net *.split]
devyn has quit [*.net *.split]
Cheery has quit [*.net *.split]
jaawerth has quit [*.net *.split]
creationix_ has quit [*.net *.split]
ja has quit [*.net *.split]
meowrobot has quit [*.net *.split]
Sargun has quit [*.net *.split]
alva has quit [*.net *.split]
audy has quit [*.net *.split]
thealphanerd has quit [*.net *.split]
ec has quit [*.net *.split]
jfhbrook has quit [*.net *.split]
vil has quit [*.net *.split]
inimino` has quit [*.net *.split]
purr has quit [*.net *.split]
amatecha has quit [Ping timeout: 250 seconds]
katymoe has quit [Ping timeout: 250 seconds]
cmeik has quit [Ping timeout: 250 seconds]
_whitelogger has joined #elliottcable
_whitelogger has quit [Excess Flood]
_whitelogger has joined #elliottcable
_whitelogger has joined #elliottcable
_whitelogger has joined #elliottcable
_whitelogger has joined #elliottcable
_whitelogger has joined #elliottcable
_whitelogger has joined #elliottcable
_whitelogger has joined #elliottcable
_whitelogger has joined #elliottcable
_whitelogger has joined #elliottcable
_whitelogger has joined #elliottcable
_whitelogger has joined #elliottcable
_whitelogger has joined #elliottcable
_whitelogger has joined #elliottcable
_whitelogger has joined #elliottcable
Sargun has joined #elliottcable
gkatsev has joined #elliottcable
ljharb has joined #elliottcable
katymoe has joined #elliottcable
ec has joined #elliottcable
ec has quit [Excess Flood]
ec has joined #elliottcable
thealphanerd has joined #elliottcable
cloudhead has joined #elliottcable
Sorella has joined #elliottcable
alexgordon has joined #elliottcable
alexgordon has quit [Ping timeout: 252 seconds]
alexgordon has joined #elliottcable
alexgordon has quit [Ping timeout: 240 seconds]
alexgordon has joined #elliottcable
alexgordon has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alexgordon has joined #elliottcable
alexgordon has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alexgordon has joined #elliottcable
<cloudhead> alexgordon: didn't know you were in #haskell
<alexgordon> I joined it to become more cultured
<cloudhead> ^_^
<alexgordon> it's like going to the opera
<cloudhead> lol
<purr> lolnope
<cloudhead> exactly
<cloudhead> I sometimes descend from my ivory tower and visit #javascript and #ruby to see what the commoners are up to
<cloudhead> just to be informed you know
<cloudhead> in case there's a revolt or pandemic
<cloudhead> I ought to know
<alexgordon> lol
<alexgordon> I think the js pandemic has already happened
<cloudhead> oh
<alexgordon> but ruby is in danger of eradication
<cloudhead> it must have happened while I was having tea
<cloudhead> I'm sad to have missed it
<cloudhead> ruby nooo
<cloudhead> what will replace ruby?
<alexgordon> js!
<alexgordon> -troll
<purr> alexgordon: %everyone look look look! look! look at me! hahahaha!
<cloudhead> :<
<alexgordon> -trollface
<alexgordon> damn we need that
<cloudhead> thing is the node peeps have already moved on to Go
<cloudhead> like, in 2014
gkatsev has quit [Ping timeout: 260 seconds]
<cloudhead> ~2013 even
<cloudhead> but I guess it's a different crowd now
gkatsev has joined #elliottcable
<alexgordon> wonder what will replace go
<cloudhead> mmmm
<cloudhead> nothing on the horizon
<alexgordon> java?
<alexgordon> :D
<cloudhead> java!
<alexgordon> -java
<purr> alexgordon: a good sandwich
<alexgordon> always said java was a good sandwich
<alexgordon> most of the JVM languages are starting to show their age though
<alexgordon> java might get generators in like 2030
<cloudhead> haha
<cloudhead> yeah jvm makes me sad
<cloudhead> I've seen companies get sucked into a scala black hole
<cloudhead> it's not pretty
<cloudhead> I've seen good people go
<alexgordon> someone needs to make "Python, but fast"
ljharb has quit [Ping timeout: 260 seconds]
<cloudhead> that's go!
<cloudhead> kind of
<cloudhead> not really
<alexgordon> cause python is on the cutting edge these days. not just generators, but async generators!
<cloudhead> go is the closest thing to python but fast though
<alexgordon> I mean
<alexgordon> a language with python's featureset but faster than python
<alexgordon> and without a GIL
<cloudhead> python is fast enough for most things you would use a scripting language for
<cloudhead> I guess pypy will get there
<alexgordon> maybe, but I want something with primative types
<alexgordon> and a pony
<cloudhead> yes
<cloudhead> python is a safe space for me though
ljharb has joined #elliottcable
<cloudhead> it never really changes
<cloudhead> it's not hip
<cloudhead> it never will be
<cloudhead> it's always there when you need it
<alexgordon> only because they sank themselves into a decade long black hole
<alexgordon> but it's really hotting up now
<cloudhead> the python3 story?
<alexgordon> the last few releases have been awesome
<alexgordon> yeah
<cloudhead> talking about decade long black holes... perl 6
<alexgordon> until 3.4, python3 sucked
<cloudhead> yah
<cloudhead> and django is my go to framework for web stuff
<alexgordon> but 3.4 and 3.5 both have major new features, compared to 3.1, 3.2, 3.3 which were just fixing what python3 broke
<cloudhead> is js ever going to move away from callback-based io?
<pikajude> no
<alexgordon> yes
<pikajude> lmao
<alexgordon> "ever" is a long time
<cloudhead> there would need to be support in V8
<cloudhead> or a comparable vm
<alexgordon> nope
<alexgordon> it's already there
<cloudhead> it is?
<alexgordon> yield
<cloudhead> :0
<alexgordon> you can build async/await from yield
<cloudhead> but isn't v8 single-threaded?
<alexgordon> the vm is yeah
<cloudhead> I guess it can still work on a single thread
<alexgordon> I mean, you can multiple vms running concurrently
<alexgordon> browsers do that right?
<alexgordon> but who wants to write multi-threaded code in JS :P
<pikajude> nobody
<cloudhead> well you wouldn't have to think about it
<cloudhead> you'd just run with green threads
<cloudhead> and await would thread-switch
<cloudhead> no one actually does "multi-threaded programming" in 2016
<alexgordon> I do :X
<cloudhead> do you program in c++?
<alexgordon> objc :P
<cloudhead> ok well
<cloudhead> yeah
<cloudhead> you're part of my no one
<cloudhead> :<
<cloudhead> I didn't think of mobile
<alexgordon> I think you can write callback-less code today in nodejs, if you want
<alexgordon> 1. get a translator from async/await to yield coroutines
<alexgordon> 2. get a library that converts the callback apis to promises
<alexgordon> 3. profit!
<cloudhead> oh god
<cloudhead> you know something's wrong when the only way to do something properly is to do it in another language and transpile it
<cloudhead> anyway ghcjs is a thing now
<alexgordon> I dunno what the status of async/await in JS is
<alexgordon> it's a good idea so they've probably canned it by now
<cloudhead> :D
<cloudhead> I can't imagine hardcore js people switching to async/await
<cloudhead> callbacks are in their dna
<alexgordon> I just want my list comprehensions back
<cloudhead> js had list comps?
<alexgordon> was going to
<cloudhead> check out this cool diagram I made in vim: http://lpaste.net/3779501135203663872
<alexgordon> and then they killed it
<cloudhead> :(
<alexgordon> cloudhead: looks cool!
<cloudhead> hopefully the architecture will actually not suck though :D
<alexgordon> I'm transfixed by the rivers of colons
<cloudhead> hahaha
<cloudhead> that's THE INTERNET
<alexgordon> actually, rivers of colons sounds like a sign of the apocalypse
<cloudhead> :<
<alexgordon> AND THE RIVERS SHALL BECOME COLONS
<cloudhead> D:
<alexgordon> internet is definitely full of shit
<alexgordon> so in that sense it's accurate
<pikajude> the internet is 100% shit
<cloudhead> wish it was animated
<cloudhead> like, the colons could move
<cloudhead> hmm I don't know if I should watch a movie now
<cloudhead> or play another game of dota
<cloudhead> or do something entirely different
<pikajude> i'm playing a game of go to the gym
<cloudhead> :<
<cloudhead> I hate the gym
<cloudhead> well I've only been once
<cloudhead> but I hate it
* alexgordon tries to figure out what loops are
<cloudhead> at first I thought you meant, you were playing a game of go /on your way/ to the gym
<pikajude> no
<pikajude> i'm playing a game of
<pikajude> The Gym
<cloudhead> yrsh
<pikajude> i love the gym
<cloudhead> yeah
<cloudhead> oh, well that's merry then
<alexgordon> loops are definitely not functions
<cloudhead> loops
<alexgordon> I guess they are macros?
<cloudhead> loops are a mental construct
<cloudhead> they do not appear anywhere in the world at large
<alexgordon> xD
<cloudhead> everyone knows the only true loop is the tail-call recursive loop
<alexgordon> madman!
<cloudhead> other than that, they are just gotos
<cloudhead> JMP!
<alexgordon> what if you had like a... goto container
<cloudhead> :O
<alexgordon> then your macros could compile loops down to that
<cloudhead> you should implement loops as syntax sugar to gotos
<pikajude> yeah, create a docker image for loops
<cloudhead> haha
<pikajude> oh wait
<pikajude> that's not what you meant
<cloudhead> OH WAIT
<cloudhead> it exists already
<alexgordon> it does?
<cloudhead> I mean
<cloudhead> people have used docker containers for less than that
<cloudhead> alexgordon: I think it makes more sense to just implement loops as a primitive
<cloudhead> unless you are building a vm
<alexgordon> well
<alexgordon> I'm lazy
<cloudhead> in which case you can build jump as a primitive
<alexgordon> and so I want to write as little code as possible
<cloudhead> then implement conditional jump
<cloudhead> and you're done
<alexgordon> also I've set myself a challenge to make everything with macros
<cloudhead> oh
<cloudhead> :/
<alexgordon> no, it's cool!
<cloudhead> can you make macros with macros
<alexgordon> yes of course
<cloudhead> cool
<alexgordon> I was explaining it to micah but I think he was bored
<alexgordon> cloudhead: basically a macro is just a generator
<alexgordon> of code bits
<alexgordon> CODE BITS
<cloudhead> code bits, I like that
<cloudhead> add some milk
<cloudhead> put them in a bowl
<alexgordon> this is actually much more difficult to explain than it is to write
<cloudhead> is it similar to any system I might know
<alexgordon> don't think so
<alexgordon> but basically the idea is that you just merge all the tree structures in a compiler into one "code tree"
<cloudhead> also, where's the code for this!?
<alexgordon> lisp?
<alexgordon> it's similar to lisp
<cloudhead> ok
<cloudhead> I know a little bit about the lisp macro system
<alexgordon> it's not like that
<alexgordon> :P
<cloudhead> ok
<cloudhead> no, the code for your language!
<alexgordon> it's not on the internet
<cloudhead> :O
<cloudhead> are you like stallman
<cloudhead> hiding the code in your beard
<alexgordon> yeah I emailed all of github to myself
<cloudhead> nice
<pikajude> same
<cloudhead> make sure you print it
<cloudhead> to keep a copy
<alexgordon> cloudhead: so basically the "code tree" exists in different states of compilation at once
<cloudhead> ok yeah
<alexgordon> some bits haven't been lexed, whereas other bits have been parsed
<cloudhead> oh I see
<alexgordon> which is different to lisp, which at least bothers to lex the whole program first
<cloudhead> so parts of the tree are just c strings
<alexgordon> yes
<cloudhead> nice
<pikajude> you can do that in coq
<pikajude> with defining like
<pikajude> new syntax bits
<pikajude> in code
<pikajude> which is crazy to me
<pikajude> because it's not like everything is sexprs
<cloudhead> actually this reminds me of TCL
<alexgordon> oh god
<pikajude> it just sounds damn complicated
<cloudhead> TCL is great
<alexgordon> damning with faint damning
<cloudhead> "everything is a string"
<cloudhead> that was autological
<cloudhead> :D
<alexgordon> cloudhead: it's like peeling an onion. it lexes the first layer first, then it parses it and applies macros. these macros then go and lex _their_ part of the source code, ad infinitum
<cloudhead> ah yes
<cloudhead> I saw this coming
<cloudhead> that's great
<alexgordon> so the macros can _do_ literally anything, because they are just working with raw source code
<alexgordon> but what I need is a standard collection of expressions for them to output
<cloudhead> yeah so they can use the default parse()
<cloudhead> or implement their own
<alexgordon> right
<cloudhead> or even augment parse() for macros further down D:
<alexgordon> yeah you can do injections
<cloudhead> INJECTIONS
<pikajude> injections are dangerous
<pikajude> DARE told me that
<alexgordon> so a macro injects new macros into the macro applier
<cloudhead> this would work great with a homoiconic language
<cloudhead> :p
<alexgordon> I realised that it's basically how textmate works
<cloudhead> lol!
<purr> lolno
<alexgordon> the grammars
<cloudhead> oh right
<alexgordon> I mean not quite. in textmate each rule has start/end regexes, and then points to a collection of rules that will be executed inside the start/end
<cloudhead> yeah, similar to vim syntax files
<alexgordon> but you can inject stuff in textmate by having an include to $self and also an include to a rule collection
<alexgordon> anyway so this is my problem. how to represent control flow
<alexgordon> I could represent everything as while loops, lol
<purr> undefined
<cloudhead> yeah pretty much
<alexgordon> it's tricky because... originally I was just going to use functions and closures
<alexgordon> so like while(func() { return cond }, func() { /* body */ })
<alexgordon> but that doesn't really work at all
<alexgordon> especially if I want coroutines
<alexgordon> but I don't want to add a different kind of expression for every kind of loop, conditional statement, etc
<cloudhead> hmm
<alexgordon> because if I want people to be able to make their own control flow, then I should really dogfood it
<cloudhead> but isn't it just when (expr) { <statement...> }
<alexgordon> and implement the built-in control flows using some kind of "control flow" universal expression
<cloudhead> right
<cloudhead> well you can do that if you have syntax sugar
<cloudhead> like blocks in ruby or do notation in haskell
<alexgordon> yeah
<cloudhead> then it can be implemented with functions
<alexgordon> I always found that very unsatisfactory
<alexgordon> in ruby
<alexgordon> feels like a hack
<cloudhead> yeah
<alexgordon> I've come to terms with the idea that loops are fundamentally different from closures
<cloudhead> so you need some primitives right
<alexgordon> I mean, it IS all jumps under the hood
<cloudhead> if you have (cond _ _ _)
<cloudhead> you can implement everything from that
<cloudhead> yes
<alexgordon> yeah so conditional jumps...
<cloudhead> well, higher level than jumps, ie execution
<cloudhead> doesn't depend on line number
<cloudhead> cond test <expr> <expr>
<alexgordon> hmmm
<alexgordon> it's just got to be something that's easy to run static analysis on
<cloudhead> yeah I mean that can work, but forcing users to use that to write macros...
<alexgordon> aha well no they don't have to
<alexgordon> because macros can call other macros right?
<alexgordon> just generate a while loop then call the while loop to gotos macro
<alexgordon> cloudhead: all control flow https://gist.github.com/atg/f14b8bb2509fae5af076a087b25b4cff
<alexgordon> seems that this way will make it easiest to implement continuations
<alexgordon> oh I misunderstood what you meant about forcing users to use it to write macros. the macro system doesn't work like that though. user macros are executed in a separate context, so the macros themselves can use normal code
<alexgordon> this is about what the user macros _output_, i.e. the AST