<alexgordon>
pikajude: if you were starting a langauge from scratch
<alexgordon>
how would you make it
<pikajude>
er
<alexgordon>
:D
<pikajude>
great question alexgordon
<alexgordon>
two words: javascript kernel
<pikajude>
i would probably start with the type system
<alexgordon>
yeah but what language would you write the compiler in
<alexgordon>
lisp would be more impressive
<alexgordon>
but javascript is more practical
<pikajude>
by impressive what do you mean
<alexgordon>
well... implementing a lisp is not much work
<alexgordon>
a microlisp
<pikajude>
wait what
<pikajude>
i thought you said if starting a language from scratch
<pikajude>
lisp is not from scratch
<alexgordon>
no no
<alexgordon>
ok
<alexgordon>
say you want to build a compiler
<alexgordon>
what do you write the compiler in?
<alexgordon>
you can't write in the language you're building, because that doesn't exist yet
<alexgordon>
sooooo
<pikajude>
oh
<pikajude>
haskell
<alexgordon>
lol fuck that
<purr>
lol
<pikajude>
its ok its turing coplete
<pikajude>
complete
<alexgordon>
it's also a 700MB download
<pikajude>
i don't understand the restrictions of your question
<alexgordon>
you could write the compiler in javascript, that would be the most practical because most people have node installed these days
<pikajude>
are you saying the compiler should be distributable
<alexgordon>
yes obviously
<pikajude>
so theoretically i could offer bindists
<alexgordon>
I want it to be maximally hackable
<pikajude>
oh ok
<pikajude>
bash then
<alexgordon>
:D
<pikajude>
or maybe yaml
<alexgordon>
pikajude: the other alternative is to use a small lisp, like scheme or the like
<pikajude>
it's fun when you try to use a piece of software that blatantly has never had even a vestige of QA applied to it
<pikajude>
i just paid the fee for KVM access to my SoYouStart server for 24 hours
<pikajude>
the first thing you get when you log in is a `less` session that cannot be logged out of
<pikajude>
i went to the #ovh channel and asked them what to do
<pikajude>
and they said "oh idk. ctrl-x?"
<pikajude>
i want to call up an ovh sysadmin on the phone and say "can you give me the guide you've presumably written for how to administrate a box from the KVM console?"
<pikajude>
because i genuinely have no proof that their KVM console functions in any way
<pikajude>
but they damn sure took my $30
<alexgordon>
wtf is soyoustart
<pikajude>
it's ovh's "budget" option
<alexgordon>
i c
<pikajude>
$40 for a box with 24GB RAM and 2TB RAID HDD
<alexgordon>
ok ok so I think javascript is the best option to write the compiler in
<pikajude>
and what i believe to be a xeon
<alexgordon>
because A) everybody knows it, and B) everybody has it installed
<alexgordon>
as much as I would prefer scheme, I think it's only me :P
<pikajude>
and being able to statically analyze or sensibly test your compiler is presumably for squares or non-rockstars
<alexgordon>
pikajude: no no, the compiler is written in the language itself
<alexgordon>
this is just for bootstrapping
<alexgordon>
e.g. ghc was originally written in lazy ML (I just looked it up)
<pikajude>
ok
<alexgordon>
but now it's in haskell
<alexgordon>
once you _have_ a compiler, you can go back and rewrite the bits that are in JS
<alexgordon>
but you have ot have a compiler first
<pikajude>
oh ok
<pikajude>
so you're saying they'd use a browser
<alexgordon>
no, nodejs
<pikajude>
oh
<pikajude>
and you're saying that everybody has node installed
<pikajude>
i will bet you american dollars that's not the case
<alexgordon>
more people than scheme :D
<pikajude>
perl then
<pikajude>
everybody has perl
<alexgordon>
yeah or more seriously, ruby
<alexgordon>
but JS seems right
<alexgordon>
SO
<pikajude>
ok
<pikajude>
perl it is
<alexgordon>
you want as much of the language written in the language itself as possible
<alexgordon>
*compiler
<alexgordon>
as much of the compiler written in the language itself
<alexgordon>
my state of the art for compiler building goes like this
<pikajude>
perl, if i recall correctly, has a sensible definition of "this"
<alexgordon>
you write an interpreter
<alexgordon>
then you interpret the type system and code generator as code in the language itself
<alexgordon>
pikajude: so I've worked it all out (hooray!)
<pikajude>
awesome
<alexgordon>
you start with the source code in a string: e.g. "2 + 2"
<alexgordon>
then you run it through a function: tokenize(), to get [{ "kind": "integer", "val": "2"}, { "kind": "symbol", "val": "+"}, { "kind": "integer", "val": "2"}]
<alexgordon>
then you run it through a function parse() to get uhhhh
<pikajude>
so tokenize is just split()
<alexgordon>
not exactly
<pikajude>
:^)
<alexgordon>
2+2 is also the same
<pikajude>
in javascript it is
<pikajude>
so you just do split(/./)
<alexgordon>
yeah but what about
<alexgordon>
2/-2
<alexgordon>
is 4 tokens
<alexgordon>
but
<alexgordon>
2/*2
<alexgordon>
is only 3
<alexgordon>
:)
<alexgordon>
you are doing longest matches of each regex
<alexgordon>
a bit like doing /R1|R2|R3|R4/ and then just looping on that
<alexgordon>
anyway so after you tokenize, you parse to get say {"kind": "expr.call", "func": { "kind": "expr.var", "ref": "add" }, "args": [ { "kind": "integer", "val": "2" }, { "kind": "integer", "val": "2" } ] }
<alexgordon>
phew
<pikajude>
phew
<alexgordon>
then you interpret to get { "kind": "integer", "val": "4" }
<pikajude>
ASTs in javascript
<pikajude>
they're beautiful
<pikajude>
you can just put anything on anything!
* alexgordon
cries
<alexgordon>
so you just need three functions
<alexgordon>
plus some kind of error log
<pikajude>
cool
<pikajude>
so writing a tokenizer and a parser
<pikajude>
can be done in any language
<alexgordon>
I'm gonna make a github project
<pikajude>
go for it
<pikajude>
you should write a generic library for generating parsers :^)
<alexgordon>
sure that must already exist
<alexgordon>
I know of Jison
<pikajude>
and bison
<pikajude>
and alex?
<pikajude>
finally i got my god damn fucking OVH box provisioned
<alexgordon>
as a semi-predictive recursive descent
<pikajude>
a fucking node package for lexing
<alexgordon>
should block comments nest?
<alexgordon>
pikajude ^
<pikajude>
idk
<pikajude>
sure
<alexgordon>
lol
<purr>
lol
<alexgordon>
actually yes they should if there's no #if 0
<alexgordon>
hmmm
<alexgordon>
multiline strings are hard
<alexgordon>
multiline strings are hard
<alexgordon>
oops
<alexgordon>
wrong window
<alexgordon>
everything working perfectly except for multiline strings
<alexgordon>
woohoo
pikajude- has joined #elliottcable
pikajude- has quit [Client Quit]
whitequark has joined #elliottcable
whitequark has left #elliottcable [#elliottcable]
<glowcoil>
ec: i am 1000% convinced there is like 1 simple thing that you're thinking of wrong regarding haskell type signatures and if we had like 10 minutes together in person with a paper you'd be like OHHH THAT'S WHAT I WAS THINKING OF WRONG
pikajude- has joined #elliottcable
pikajude- has quit [Client Quit]
pikajude- has joined #elliottcable
<alexgordon>
lol
<purr>
lol
pikajude- has quit [Remote host closed the connection]
<alexgordon>
glowcoil: I don't get what the problem is
<alexgordon>
haskell type signatures are not harder than C type signatures
<alexgordon>
if you can understand int (*)(int) then you can understand Int -> Int
<alexgordon>
:|
<ljharb>
i find haskell type signatures entirely obtuse
<alexgordon>
o_o
<ljharb>
to be fair, i haven't tried to learn them - but i think a type signature that requires learning isn't a good one
<alexgordon>
what's difficult about it?
<alexgordon>
[a] is a list, (a -> b) is a function, Foo a is a parametric type, (a, b) is cartesian product
<alexgordon>
simple
<ljharb>
lol
<purr>
lol
<alexgordon>
as they say, a monad is just a monoid in the category of endofunctors, what's the problem
<ljharb>
and a git branch is just a homeomorphic endofunctor mapping submanifolds of a hilbert space
<alexgordon>
mmm thai food
<alexgordon>
experiencing math / food synesthesia
<alexgordon>
endofunctors correspond to thai food
<ljharb>
well, a monad is like a burrito
<ljharb>
even if you put another burrito in it, it's still a burrito - and when you unwrap it it contains a burrito
<alexgordon>
lol
<purr>
lol
<alexgordon>
ljharb: coffeescript is sooooo nice for writing compilers in
<alexgordon>
get the first token of the line, put it through a dispatch table, then call that function
<ljharb>
alexgordon: ok so you do get major points for me for not using a switch statement there
<ec>
I love C
<alexgordon>
I did have a switch statement before
<alexgordon>
then I thought of this
<ljharb>
glad you improved it
<alexgordon>
:P
<ec>
lol geeze
<purr>
lol
<ec>
be nice people
<ec>
nice is fun
<ec>
and good for code
<alexgordon>
ec: so let me talk to you about extension points in the 10 minutes before I go to bed
<ljharb>
i was being nice, i complimented alex
<ec>
#taoofec
<ec>
meh idk you're doing your Alex thing
<ljharb>
i just gave a compliment about some coffeescript code. how much nicer could i be
<ec>
if my Elliott thing is year-long ivory-tower thought-experiments
<alexgordon>
ec: when the parser reaches a syntax error (something it doesn't know how to parse), it calls eval() on the user code that has registered to extend the parser
<ec>
your Alex thing is diving into the *parser*, specifically, way too soon, without even considering semantics
<alexgordon>
no no this is semantics too
<ec>
idk why, I've never seen anything like it )'=
<alexgordon>
it all makes sense
pikajude- has quit [Ping timeout: 260 seconds]
* ec
eyebrow
<ec>
it evals what?
<alexgordon>
the rest of the code!
<alexgordon>
this is a major wtf I realise
<alexgordon>
but it does actually make sense
<ec>
omg glowcoil's new profile pic tho
<alexgordon>
say you want to add a new statement to the language
<alexgordon>
like uh, say a switch statement
<alexgordon>
you write a function: fn parseSwitchStmt(lines, toks) { ... }
<alexgordon>
then you register it (through some mechanism I haven't decided)
<alexgordon>
then everything that has loaded that component can now access the switch statement
<alexgordon>
when the parser encounters "switch", it's a syntax error, so it looks at the registered parser extensions, and evaluates that function
eligrey has quit [Quit: Leaving]
<ec>
… so much missing there
<alexgordon>
?
<ec>
1. how does it know *which* registered host-functions correspond to which bits of ‘failed‘ syntax,
<ec>
2. what about wanting to extend things that *don't* throw a syntax error,
<alexgordon>
each failure point has an identifier
<alexgordon>
[extpoint] decl.0
<ec>
3. so give me an example of implementing, say, my versioned-callsite syntax above
<alexgordon>
so you register for "decl.0"
<alexgordon>
to add a new decl
<alexgordon>
2. you can't register for things that don't throw a syntax error, because they're already valid code
<alexgordon>
it might be a semantic error though
<alexgordon>
3. what's the syntax?
<alexgordon>
not all failures are extendable, because it would be too weird in some cases
<alexgordon>
use foo %
<alexgordon>
% is invalid there
<alexgordon>
and you can't register an extension for that
<alexgordon>
because I said so :P
<alexgordon>
so far I have extpoints for: new meta declarations, new declarations, new statements, and new "jobs", a job being a context in the parser (so far, root context and body context). I haven't started on expressions yet
Hrorek has quit [Ping timeout: 244 seconds]
Hrorek has joined #elliottcable
alexgordon has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pikajude- has joined #elliottcable
pikajude- has quit [Remote host closed the connection]
Hrorek has quit [Ping timeout: 250 seconds]
Hrorek has joined #elliottcable
Hrorek has quit [Quit: Leaving]
Rurik has joined #elliottcable
Rurik has quit [Ping timeout: 265 seconds]
Rurik has joined #elliottcable
Rurik has joined #elliottcable
Rurik has quit [Ping timeout: 260 seconds]
Rurik has joined #elliottcable
Rurik has quit [Client Quit]
Rurik has joined #elliottcable
Rurik has joined #elliottcable
alexgordon has joined #elliottcable
<mkroman>
any of you want an invite for OnePlus 2?
<mkroman>
OnePlus is using a stupid invite system where you need an invitation to buy the phone
<ec>
oh, it's a device
<ec>
one of those strange non-Apple thingamajigs that I'm not entirely convinced actually exist
<ec>
mkroman: sure, hit me
<ec>
do you get something if I order one? discount or whatever?
<mkroman>
don't even think so
<ec>
haven't had an Android device in a hot minute
<ec>
oh eh not sold, it's a forked OS? meh.
<mkroman>
you can also install AOSP or CyanogenMod if that's your thing
<Aria>
I do love my oneplus two.
<Aria>
It's quite nice.
<Aria>
the invite system stinks, though I think they switched to open purchase Tuesdays.
<Aria>
(They ratelimit purchases to match what they can produce...)
alexgordon has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
amatecha_ has joined #elliottcable
glowcoil has quit [*.net *.split]
amatecha has quit [*.net *.split]
ljharb has quit [*.net *.split]
glowcoil has joined #elliottcable
amatecha_ is now known as amatecha
ljharb has joined #elliottcable
alexgordon has joined #elliottcable
<ec>
Aria: oh? what are the pros?
<Aria>
It's a well made phone with a decent OS on it.
<Aria>
Camera's good, screen is good. It's just unremakably good.
<Aria>
(and considering the norm is 'remarkably bad'...)
<Aria>
The OS is far less custom than anything Samsung or HTC ever made.
<Aria>
So dinging it for that doesn't seem remotely fair.
Rurik has quit [Quit: Leaving]
Rurik has joined #elliottcable
Hrorek has joined #elliottcable
Rurik has quit [Ping timeout: 255 seconds]
Hrorek has quit [Read error: Connection reset by peer]
alexgordon has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alexgordon has joined #elliottcable
Rurik has joined #elliottcable
Rurik has joined #elliottcable
Rurik has quit [Ping timeout: 264 seconds]
alexgordon has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alexgordon has joined #elliottcable
pikajude- has joined #elliottcable
nexxy has joined #elliottcable
<nexxy>
hm
<ec>
wait
<ec>
are there
<ec>
are there two
<ec>
oh, I have nick-changes/joins/leaves disabled in #node.js
* ec
glomps nexxy
<gkatsev>
oneplus 2 is pretty nice
<gkatsev>
though, really happy with my 6P
<ec>
gkatsev: yeah?
<gkatsev>
yeah
<ec>
idly considering ordering a 5X so I can play with newest Androids
<gkatsev>
5X is pretty nice too
<gkatsev>
had my dad get one
<ec>
couple friends are trying sooooo hard to convince me it's improved since I tried it for a while
<ec>
thing is, when I did so, it's because the same android people were saying the same thing
<ec>
and irl usage did not bear out their claims over time.
<ec>
kind a burned-once thing. *maybe* it's genuinely better, this time, but …
<gkatsev>
it gets better all the time
<gkatsev>
as does ios
* ec
nods
<ec>
it's the *ways* that it gets better that matter
<gkatsev>
ios is a bit better for "let me just do my thing and not worry about anything"
<ec>
the things making it untenable for me aren't likely to change. it's the android Mindset, not some particular features that are missing.
<gkatsev>
whereas android is much better if you want to configure it tweak it to be exactly what you want
<ec>
nah, I think that's a *very* mis-guided popular perception
<pikajude>
does anybody else think there's something incredibly satisfying about watch -n 1 cat /proc/mdstat
<gkatsev>
ec: comparing android and ios
<ec>
gkatsev: ya, I know
<gkatsev>
I'm not saying that you can't configure ios or that android can't be good out of the box
<ec>
Android users *think* it's about customizability,
<gkatsev>
just that apple makes ios more with that mindset
<ec>
Apple users *think* it's about reliability / annoyances,
<ec>
but I think they're both wrong: it's *all* about app selection; and app selection really boils down to developer-friendliness.
<gkatsev>
and app selection is mostly the same nowadays
<ec>
I don't think Android could win me (or almost any other Apple user) back over, even if Android Candy Corn introduces a literal ‘hold the lock button and a single wish comes true’ feature,
<gkatsev>
so, unless you really need a specific app you know isn't available on one platform or the other it doesn't really matter
<ec>
until google *legally locks down* the screen sizes and hardware requirements.
<ec>
… mostly the same
* ec
checks his home-screen
<gkatsev>
also, the screen size thing doesn't really matter
<ec>
- there is not a single Android calendar app of the calibre of Fantastical
<gkatsev>
the way android dev works
<ec>
- there is not a single Android twitter app of the calibre of Tweetbot
<ec>
- there is not a single Android GTD app of the calibre of Things
<ec>
- there is not a single Android mapping app of the calibre of Apple Maps
<ec>
(don't get me started.)
<gkatsev>
hahah, apple maps is shit
<ec>
(please. don't. you're wrong. don't have the energy to argue it right now, ask me later.)
<gkatsev>
things could be argued about. Tweetbot, possibly.
<ec>
(presuming you care, of which chance there is nil.)
<ec>
it *does* matter
<gkatsev>
but again, it's not like you don't have those apps (other than fanstastical)
<ec>
Apple developers know that the aspect-locking / smart-layout features are *very* iffy
<gkatsev>
you can do it correctly
<gkatsev>
and a lot of apps do
<gkatsev>
and it works great
<ec>
the idea that that can replace precisely-managed designs for a precise viewport is a *very* engineer-y view
<ec>
or, to rephrase that, a very Android-y view
<gkatsev>
so, no, it doesn't replace it
<ec>
I'm very, very worried about Split Screen, iPhone 6-plus, and friends
<mkroman>
Android lets you have background connections - iOS won't - discussion ends here.
<gkatsev>
what it does give you is that it still works even if the app wasn't optimized for a specific screensize
<gkatsev>
with apple/ios, it *doesn't* work
<ec>
it's *possible* Apple will be able to pull them off by keeping it all restricted to the half-dozen or so widths possible right now, but that's still a huge problem.
pikajude has quit [Remote host closed the connection]
<gkatsev>
from what I've heard from people that developed for both, making an app work on both the 6, 6+, and ipad is a lot more annoying than on android
pikajude- has quit [Remote host closed the connection]
<gkatsev>
but still, android *does* have a lot of really good apps
<mkroman>
^ which is ironic, considering how many more Android devices there are
pikajude has joined #elliottcable
<gkatsev>
what specifically?
<ec>
I've definitely heard that from literally nobody.
<gkatsev>
ec: you've been talking to the wrong people
<ec>
It's *annoying*, but not *more annoying* than dealing with Java, Android, and Google in general.
pikajude- has joined #elliottcable
pikajude has quit [Changing host]
pikajude has joined #elliottcable
<pikajude>
hey now
<mkroman>
the fact that it's a lot more annoying making an app work on iOS devices
<pikajude>
i have an ipv6 address...
<gkatsev>
mkroman: heh, yeah
<pikajude>
wait who's that pikajude- character
<ec>
pikajude: we've replaced you.
<pikajude>
that's my stupid linode
<pikajude>
hang on
<pikajude>
let me deactivaet it
<pikajude>
i finally activated my OVH box
<pikajude>
16GB RAM baby!!!!!
<ec>
wassat
<pikajude>
actually it's a SoYouStart box
<pikajude>
cheapo dedicated server
<glowcoil>
ec: *x for pointers is *exactly the same* as [x] for lists in haskell
<pikajude>
nuh uh [x] is a linked list
<glowcoil>
pikajude: that's not what i'm saying
<pikajude>
drop some semantics on my ass
pikajude- has quit [Client Quit]
<glowcoil>
ec was saying that it's confusing for the same syntax to be used for the type signature as for like the data/operations
<pikajude>
oh ok
<glowcoil>
c does that to a far more horrifying degree
<pikajude>
no it's not it's the opposite
<glowcoil>
considering function pointer syntax
<pikajude>
function pointer syntax is big hairy balls yes
<ec>
hm
<mkroman>
needs more monads
<gkatsev>
ec: ultimately, my point is that both are good and it doesn't *really* make that much of a difference anymore which one you choose.
<ec>
I agree.
<pikajude>
i like how fastmail.com allows me to continue getting emails no matter how fucked my server is
<gkatsev>
ec: and once you've chosen, there really is no point in switching
<gkatsev>
ec: unless the other platform releases an app you *need*
<ec>
in that I think C is just as egregiously bad.
<glowcoil>
i'd like to get my own email server so i can actually send mail from glowcoil.com
<ec>
Thing is, I didn't say that mixing of arrays was what made it hard for me to understand
<pikajude>
glowcoil: you can do that
<glowcoil>
ec: c is much worse
<ec>
it was an idle aside; and yes, C sucks in precisely the same way
<pikajude>
well, you can at least send email that seems to have been sent from glowcoil dot com
<pikajude>
do you *actually* want emails to come out of your IP address
<glowcoil>
ec: you can express a lot more things in haskell's
<ec>
glowcoil: don
<ec>
glowcoil: don't*
<ec>
boot a sendmail
<pikajude>
setting up your own email server is shit, i've done it over and over and it has never gotten any more rewarding
<pikajude>
i paid like $90 for 3 years of fastmail
<pikajude>
no downtime, it's killer
<ec>
I'm trying to find the links
<ec>
but basically all the big providers have started shoving out individual-run servers
<pikajude>
also, i'm still watching /proc/mdstat it's like having an orgasm
<pikajude>
it's like having 1.9 billion ducks and they're all getting in a line
<ec>
basically, if you try and send mail to a gmail, google apps, hotmail, y!mail, @mac.com, user, from a newly-set-up mx server,
<pikajude>
nobody else enjoys it this much, i know that
<ec>
… it will get silently dropped
<ec>
like, it's super-evil and apparently nobody much noticed it happening for the last three or so years
<glowcoil>
ec: right yeah i was never going to do that
<ec>
all of the big services have these wishy-washy algorithmic requirements that require you to have built up a history of being a safe origin of mail, and then provide no way for you to build that history
<glowcoil>
both should very easily understand both things
<ec>
and a lot of the big providers are very quickly becoming very pro-container
<glowcoil>
because there is not much there
<glowcoil>
lmao
<ec>
not sure how I feel about that, but, ugh
pikajude has quit [Ping timeout: 240 seconds]
<ec>
glowcoil: I miss ur butt
<ec>
wen u gna computer agn
<mkroman>
if you want to put a webserver, reverse proxy, generally anything with short-lived connections, you can get by
<glowcoil>
o i am computer
<ec>
outside of work*
<glowcoil>
i write shitty php wednesdays thru friday
pikajude` has joined #elliottcable
<glowcoil>
currently taking a C.S. quiz
<glowcoil>
lmao
<pikajude`>
wow am i even here
<pikajude`>
wow, I am not
<pikajude`>
what the fuck
<ec>
pikajude`: wat
<pikajude`>
it's probably because OVH is cut off from the entire internet
<mkroman>
but if you want to run an application with persisent connections (e.g. an IRCd), you're SOL.
ec is now known as pikajude^
<pikajude`>
their status page says a cable has been cut in a tunnel which is just hilarious
<pikajude`>
and upsetting
<pikajude`>
those fuckers!!1
<pikajude^>
is it those san francisco vandals?
<pikajude`>
operating in france?
<pikajude`>
not likely
<glowcoil>
pikajude^: but yeah i'm really interested in doing some three.js/processing/whatever visualization shit
<pikajude`>
pikajude^: stop asshole
<glowcoil>
pikajude^: and more down the road, just like creative tools for like
<glowcoil>
pikajude^: generating 3d visuals out of processes
<glowcoil>
and audio
<pikajude^>
what is france
<pikajude^>
is that a plce
<pikajude^>
is that where pikajudes are
<pikajude^>
becaus i am not
<pikajude`>
france is a country
<pikajude`>
that i'm going to be flying over soon
<pikajude`>
please kill me
<pikajude^>
pikajude`: are you flight-anxious?
<pikajude^>
I've been horrrrrribly flight-anxious for a year and some change now
<pikajude^>
it's the fucking worst
<pikajude^>
I miss when I could fly anywhere /=
<pikajude^>
I miss travelling *period*, but roadtrips get hard on me
<glowcoil>
pikajude^: why cant u fly
pikajude has joined #elliottcable
<pikajude>
wait, am i here now?
<pikajude>
yes i am
<pikajude>
hey pikajude^, suck a wang
pikajude` has quit [Quit: Page closed]
<pikajude>
also, voice me
<pikajude>
why am i not voiced
pikajude has quit [Changing host]
pikajude has joined #elliottcable
<pikajude>
oh i am
pikajude^ is now known as ec
<ec>
pikajude: will do
<ec>
okay thanks to pikajude I just read *way* more about docker internals than I wanted to
<ec>
ew
<ec>
anyway, my point isn't that I think *docker*, the project, is great
<ec>
I think docker is great in the way I think kleenex are great: as a way of expressing that “I think containerization as a solution to the otherwise-possibly-*actually-unsolvable* problem of universal interfacing might be great.”
<ec>
whether you roll your own bullshit with lxc or some hypervisor or whatever, even.
<ec>
no no
<ec>
oh wow
<ec>
accidentally scrolled up
<ec>
“ ec was saying that it's confusing for the same syntax to be used for the type signature as for like the data/operations”
<ec>
-^ was not, tho
<ec>
it's not (same syntax in two places)
<ec>
it's (two things in same place)
<ec>
or not even, two things
<ec>
types are all super abstract and *not* specified in the signature, basically; but dismensionality *is* a specific thing about a type? if that makes sense?
<ec>
like, `ArrayOfFoo -> Foo` makes sense to me, because all we're talking about is identifiers for elsewhere-specificmade Things™, it's all super abstract
<ec>
but as soon as you express that as `[Foo] -> Foo`, you've suddenly *encoded some of those specifics* into literally the signature itself
<glowcoil>
not at all though
<ec>
like, now, the Thing™
<glowcoil>
[] is literally syntactic sugar
<ec>
on the left-hand-side of that,
<glowcoil>
for a named type with an argument i
<ec>
is now specified THERE, right there
<glowcoil>
it could be
<glowcoil>
List a -> a
<ec>
not where most type-related stuff is specified
<ec>
for a what what with what what
<nexxy>
lol
<purr>
lol
<glowcoil>
ec: please explain more
<ec>
oh holy shit
<glowcoil>
ec: left side of the ->
<glowcoil>
?
<ec>
oh holy fucking shit
<ec>
you want to know why I didn't grok Haskell sigs *this entire time*?
<glowcoil>
why omg
<ec>
because I didn't understand `a` wasn't a really lazy way to type `List` or `String`.
<ec>
I thought it was a … variable for a type-name
<ec>
not a specifier for an actual *value*
<ec>
like I thought `[a] -> a` meant “Takes list of Ayes, returns a different Aye”
<glowcoil>
...it does
<glowcoil>
mean that
<ec>
oh.
<glowcoil>
however, lowercase names in type signatures are automatically generic
<glowcoil>
it's like
<glowcoil>
forall a . [a] -> a
<ec>
yeah no epiphany fukt
<glowcoil>
takes list of ANYTHINGS, and returns the SAME ANYTHINGS
<ec>
ignore all of that
<ec>
for a moment I thought I actually understood what alexgordon meant about it *only being able to be* map
<ec>
but, nope, don't get it anymore
<glowcoil>
ok so haskell has like
<glowcoil>
the value level dimension
<glowcoil>
and the type level dimension
<ec>
(a → b) → a → b
<ec>
or whichever it was
<glowcoil>
and the kind level dimension
<glowcoil>
basically each dimension has: values, and functions
<ec>
define dimension
<glowcoil>
just, worlrd, place, land
<ec>
k not a thing, go on
* ec
lacerates his mouth with salt-and-vinegar hell while listening
<glowcoil>
yeah so like as you go upwards they get more simplistic and less capable of doing things
<glowcoil>
value-land has values such as 1, 2, 3, [1, 2, 3], "asdf"
<glowcoil>
and also values like (\a -> a + 1)
<glowcoil>
and you can apply functions
<glowcoil>
and that's all there is
<glowcoil>
if a value is a function you can apply it to a value, by juxtaposition.
<glowcoil>
ok so now let's go up to type land
<glowcoil>
it's exactly the same
<ec>
wait
<ec>
‘juxtaposition’ lol
<purr>
lol
<ec>
go on
<glowcoil>
anyway so
<glowcoil>
type land
<ec>
wait tho
<ec>
just to be clear
<ec>
because I want to be sure I wasn't suddenly almost seeing something
<ec>
if I have blah :: [a] -> a
<ec>
*something else* can happen to a *value* passed to blah, right?
<ec>
that doesn't fully define the semantics of blah
<ec>
I don't understand how it can
<glowcoil>
you're basically guaranteed that blah is going to return one of the values inside the list
<ec>
I mean, blah could multiply the value chosen by 2,
<glowcoil>
no i tcould not
<glowcoil>
it absolutely could not
<ec>
wait why
<glowcoil>
that is guaranteed by the type system
<ec>
see that's what I don't get
<ec>
confused af
<glowcoil>
because [a] -> a
<ec>
it's still the same *type*
<glowcoil>
is like, universally quantified
<glowcoil>
over a
<glowcoil>
so blah has to work, as the SAME function, for
<glowcoil>
[Int] -> Int, [String] -> String
<ec>
[1, 2, 3] is [Number]; and if I return 6, it's still Number
<glowcoil>
yes but if blah does something number-specific such as *2
<ec>
so blah([1, 2, 3]) #=> 6 is still blah :: [a] -> a
<ec>
no?
<glowcoil>
then it can't be [a] -> a
<glowcoil>
it has to be [Number] -> Number
<glowcoil>
no it's not
<ec>
okay so then an operation that *any* type can take
<glowcoil>
right and the opreations that any type can take are like
<glowcoil>
identity
<ec>
like, say, checking-if-nullary, I guess, or something
<ec>
hm
<glowcoil>
now you see
<ec>
so Haskell basically defines that “There are types which can't do anything”
<glowcoil>
well the thing is
<glowcoil>
a type is like, a set of things you can do to the value
<ec>
and then also defines that “something generic has to be FULLY generic”
<glowcoil>
typeclasses let you specify in a granular way
<glowcoil>
like,
<ec>
sounds like the Rust thing alex was complaining about :P
<glowcoil>
Num a => [a] => a
<glowcoil>
fuck
<glowcoil>
(Num a) => [a] -> a
<ec>
I like this btw keep talking
<glowcoil>
means that a has 1 constraint on it
<glowcoil>
that it's a Num
<glowcoil>
the => looks like it's making a function
<ec>
if I'm confrontational it's because that's how I've learned to come at things recently
<glowcoil>
mhm
<glowcoil>
but it's just like
<glowcoil>
could be a colon or a dot or whatever
<ec>
everybody everywhere is trying to sell you on their viewpoint, and usually can, if you're not 100% an asshole 100% of the time
* glowcoil
nods
<glowcoil>
so yeah the Num typeclass is actually kind of a mess but like
<ec>
syntax
<glowcoil>
it has a particular set of Num operations
<glowcoil>
such as * + / - etc
<ec>
can you do the micah-elliott thing and just invent a freaking random syntax for this plz
<glowcoil>
i'm going to use the haskell one
<glowcoil>
lol
<purr>
lol
<ec>
I have Baggage around haskell type signatures at this point, I think, and it's retarding the conversation
<glowcoil>
here's what i'll do
<ec>
what's systeme f's syntax, anyway
<glowcoil>
lol
<ec>
how do you syntax-ify typing on top of λ a . b
<glowcoil>
basically haskell but like less bound to ascii
<glowcoil>
can we go back to type land
* ec
nods
<ec>
I need to back up
<ec>
you lost me
<ec>
start over at “typeclasses let you specify in a granular way”
<glowcoil>
ok well i'm going the type land route
<ec>
everything up until that was straight-forward, if annoying
<glowcoil>
which will take us there
<glowcoil>
actually ok
<glowcoil>
so if you have a function a -> a
<glowcoil>
you know it's the identity function
<ec>
I know a *little* cat-theory stuff that this sounds eerily similar to?
<ec>
“a type is like, a set of things you can do to the value”
<ec>
so, an algebra, iirc?
<glowcoil>
something like that
<glowcoil>
i never understood what an algebra is
<glowcoil>
in categeory theory
<glowcoil>
but
<ec>
oooo
<ec>
OO OOO HOLD ON
<ec>
can I explain can I explain? explaining something I know a little about will refill my Haskell spoons :P
<glowcoil>
ok
<ec>
algebra is like a Java, err, whassit, protocol
<ec>
an algebra *is* the entire set of things that satisfy a given rule, or set of rules,
<ec>
well fuck nope I guess I've forgotten it all
<glowcoil>
(*mumbles* or a typeclass)
<ec>
yes, maybe, like I said, this is triggering old bells somehow
<ec>
like, the magma is the simplest algebra (I think?)
<glowcoil>
ok i know magmas etc
<ec>
oh okay
<ec>
it goes, errr, magma, semigroup, group?
<ec>
or I forget one
<glowcoil>
but yes haskell is very explicitly patterned after this stuff
<glowcoil>
you can have a Group typeclass
<ec>
that's where I know the *word* monoid from
<ec>
but I don't get what it's got to do with my burrito-understanding of monads >,>
<glowcoil>
ok back to type land?
<ec>
mmhmm go ahead
<glowcoil>
ok so type land
<ec>
thinking about category theory got me excited for type theory again >,>
<glowcoil>
also has values in it, and some of those values are functions, which you can apply via syntactic juxtaposition
<glowcoil>
an example value in type land
<ec>
wait.
<glowcoil>
is Int
<ec>
no stop wait.
<ec>
just checking, because I grew up in Ruby, where a type *is* a value,
<ec>
you are defining ‘value’ here as ‘atomic element,’ right?
<ec>
not equivalent to *a value* from value-land
<glowcoil>
type-land values cannot cross the border into value-land
<ec>
data-land
<ec>
okay, gotcha
<glowcoil>
in Agda they can
<glowcoil>
but in Haskell they cannot
<ec>
overloading, but I understand
<glowcoil>
ok so in type land you have some values
<glowcoil>
such as:
<glowcoil>
Int
<glowcoil>
String
<glowcoil>
you have functions like
<glowcoil>
List
<glowcoil>
List Int
<glowcoil>
is another value, the result of that application
<ec>
wh
<ec>
List() is a function?
<ec>
a type-function, but, still
<ec>
how does one *implement* a type-function
<ec>
does that even make sense
<glowcoil>
yes
<glowcoil>
you can write one like this:
<glowcoil>
well you can define an alias like this
<glowcoil>
data String = List Char
<glowcoil>
and those can take arguments
<ec>
so String is still a function
<glowcoil>
data Fuck a = Tuple a a
<glowcoil>
no
<ec>
a composition, but
<glowcoil>
non nonono
<ec>
oh.
<mkroman>
def does_this_make_sense_in_haskell(x); :yes end
<glowcoil>
ok so basically the way you define things in type land is the same as in value land
<ec>
can I mention how stupid-cool YAML is btw
<glowcoil>
except you put the keyword "data" before it
<glowcoil>
data A = B
<ec>
hm
<ec>
fuck that word, really?
<glowcoil>
data TypeFunction argument = TypeFunctionWithTwoArgments a a
<ec>
ignore that, sorry
<ec>
wh
<glowcoil>
make sense?
<ec>
no not at all that last example specifically
<glowcoil>
ok
<ec>
where did `argument` go,
<glowcoil>
fuck me
<ec>
and where did `a` come from
<ec>
typo?
<glowcoil>
data TypeFunction argument = TypeFunctionWithTwoArgments argument argument
<glowcoil>
yes
<ec>
okay yep yep
<glowcoil>
cool
<ec>
so that's a function
<ec>
and because it's haskell, a nullary function is a value
<ec>
even in types
<ec>
because I *cannot* get over it, can you explain *some* justification for the keyword `data`
<glowcoil>
because data is the way you define a datatype
<ec>
what's that supposed to be implying, because this is literally the opposite of data :x
<glowcoil>
FUCK EM
<ec>
ah
<glowcoil>
fUCK ME
<glowcoil>
i'm wrong
<ec>
abbreviation of datatype?
<glowcoil>
it's actually
<glowcoil>
type
<glowcoil>
lmamo
<ec>
oh
<glowcoil>
type A = B
<glowcoil>
data is different
<ec>
lol thank fucking god
<purr>
lol
<ec>
go on
<glowcoil>
yeah type A a = B a a
<glowcoil>
etc
<glowcoil>
ok so now we have two lands, which are very similar
<glowcoil>
there are values, and some values are functions,a nd the functions can be applied to values to give you new values
<ec>
I'm losing my shit because I just found my notes from my seminar on category theory
<glowcoil>
the interesting thing is how the two lands are *linked*
<ec>
in both dimensions ‘values’ are nullary functions, yes?
<ec>
or do I mis-remember that
<glowcoil>
that's like, a lie
<glowcoil>
or an unhelpful non truth
<ec>
hm
<ec>
k
<glowcoil>
that's basically because people wanted to say "in haskell everything is a function" a la ruby "everything is an object" but the fact is some things AREN'T functions so then you make up the non-helpful "values are nullary functions"
<glowcoil>
which they plain arent
<ec>
ugh what is the epsilon in monoids again
<ec>
I got too involved and left a chunk out of my notes and I can't make heads nor tails of anything *after* that missing chunk
<ec>
alexgordon: help
<glowcoil>
it's like "empty"
<glowcoil>
it's the null in a linked list
<ec>
ah k
<glowcoil>
or if you look at numbers and addition as a monoid
<glowcoil>
it's 0
<ec>
so what are left-identity vs right-identity
<glowcoil>
numbers and mulitplication as a monoid, it's 1
<ec>
trying to figure out the definition of what i was encoding as (+) in my notes
<ec>
s (+) ε = e, yes, that's left-identity, but what does that *express*
<ec>
sorry ugh I got sidetracked from your actually-useful explanations
* ec
closes notes
* ec
sits up attentively and stares at glowcoil
<glowcoil>
sorry was doing a quiz due at 1pm lol
<purr>
lol
<glowcoil>
done
<glowcoil>
ec: ok so
<glowcoil>
the links between value land and type land
<glowcoil>
one link is the operator ::
<glowcoil>
another link is the "data" keyword
<glowcoil>
so "data" creates new values in both data land and type land, which are bound to each other
<glowcoil>
like spawning particle antiparticle pairs or whatever
<glowcoil>
data TypeName = Constructor1 | Constructor2 Int String
eligrey has joined #elliottcable
<glowcoil>
ec: wait i'm going to bactrack a little
<ec>
hold on
<ec>
data creates *both*?
<glowcoil>
yeah
<ec>
in `data TypeName = Constructor1 | Constructor2 Int String`, what is *new*, in each land
<ec>
TypeName is a *new type*?
<ec>
after that?
<glowcoil>
TypeName is a new type
<glowcoil>
yes
<ec>
what's the new data?
<glowcoil>
Constructor1 is now a value
<ec>
o_o
<glowcoil>
just like True and False and 1
<glowcoil>
are values
<ec>
OH
<ec>
got you
<ec>
so it's a tuple
<glowcoil>
you can make boolls urself
<glowcoil>
not tuple
<glowcoil>
but you can also make those urself
<ec>
like, a,
<ec>
Symbol, sort of
<glowcoil>
data Bool = True | False
<glowcoil>
yea
<glowcoil>
symbol
<ec>
idk words what i'm thinking, hold on
<ec>
yeah, struct
<ec>
is more what I'm thinking
<glowcoil>
enum
<ec>
or whatever those are called god it's been years since I wrote C
<ec>
that.
<glowcoil>
haha
<glowcoil>
yea
<ec>
so …
<glowcoil>
but the constructors can take arguments
<glowcoil>
which makes them like tuples
<ec>
it seems like `data` is sort of hijacking the type system just to *name* things.
<ec>
is that a dumb statement?
<glowcoil>
i mean yeah but in haskell everything is names
<glowcoil>
so
<glowcoil>
not really hijacking
<ec>
mmhmm
<ec>
and fits those names into the type system, kinda
<glowcoil>
yeah
<ec>
I *kinda* see but not really.
<ec>
do go on.
<glowcoil>
ok so
<glowcoil>
back to type system
<glowcoil>
type land
<glowcoil>
do you nkow how binary operator syntax works in haskell
<glowcoil>
3 + 3 and (+) 3 3 being equilvaent
<ec>
try not to ask questions so I don't have to type; I think a lot better when I just sit here and let things wash over me until I have an argument/epiphany to spurt
<ec>
er, very barely
<glowcoil>
ok
<ec>
like, I *know* polish/reverse-polish notation
<ec>
but I can *not* read it natively
<glowcoil>
so in haskell there are no "operators", there are litearlly just values, and some of those values ar efunctions
<ec>
have to think very intensely to decode, every time
<ec>
exact same problem as I have with type-sigs
<ec>
>,>
<ec>
go go
<glowcoil>
ok so i'm just going to teach you without infixes and show how it translates
<ec>
SHIT
<glowcoil>
so you have a type-land function
<glowcoil>
called
<glowcoil>
Func
<ec>
I need to leave, person I was waiting on just left
<glowcoil>
aw ok
<glowcoil>
i'll type some shit
<glowcoil>
i have to leave soon too
<ec>
keep going I will dangerously IRC while I drive
<glowcoil>
and we'll regroup later
<ec>
no wait am not driving
<ec>
am training!
<ec>
so can interact
<ec>
will just be silent for periods hwen signal goes in and out
<glowcoil>
ok so we have this type-land function called Func, and it takes two arguments
<ec>
yeah brb
<glowcoil>
ok
<glowcoil>
cool
<glowcoil>
so you can write
<glowcoil>
Func Int String
<glowcoil>
Func String Bool
<glowcoil>
etc
<glowcoil>
and, by the :: relationship with value-land
<glowcoil>
value :: type
<glowcoil>
a function that takes Strings and returns bools
<glowcoil>
is of the type Func STring Bool
<glowcoil>
so
<glowcoil>
(\ s -> length s > 0) :: Func String Bool
<glowcoil>
is true
<glowcoil>
(i might be glossing over some stuff but hopefully this is clear)
<glowcoil>
so Func and (->) are the same thing
<glowcoil>
Func doesn't actually exist but you could define it like type Func = (->)
<glowcoil>
so (->) String Bool
<glowcoil>
(->) Int Int
<glowcoil>
(x -> x + 1) :: (->) Int Int
<glowcoil>
(x -> x + 1) :: Int -> Int
<ec>
hm k
<ec>
seems pretty trivial
<ec>
typeclass, go
<ec>
and the types of types, whatever that was called
<ec>
‘next-level-land-place’
nexxy is now known as emilyrose
<glowcoil>
those are "kinds"
<glowcoil>
and there's like two of them
<glowcoil>
there's *
<glowcoil>
and there's ->
<glowcoil>
so you can have
<glowcoil>
* -> *
<glowcoil>
* -> * -> *
<glowcoil>
* is just the "kind" of a type
<glowcoil>
like a concrete type that can have values of it
<glowcoil>
so for instance
<glowcoil>
(->) :: * -> * -> *
<glowcoil>
we're overloading -> a bit here bweteen the two worlds
<glowcoil>
anyway they're not very important
alexgordon has quit [Read error: Connection reset by peer]
alexgordon has joined #elliottcable
<alexgordon>
oh damn I missed ec's tuition
alexgordon has quit [Read error: Connection reset by peer]
<pikajude>
how dumb would it be to run a seedbox on an s3fs volume
alexgordon has joined #elliottcable
<alexgordon>
pikajude: dumb
<alexgordon>
pikajude: wait, actually I'm not sure what you're asking about
<alexgordon>
you mean have a seedbox, and then use s3 as auxilliary storage?
<pikajude>
i mean
<pikajude>
the seedbox seeds from s3
<pikajude>
and /var/torrents or whatever is mounted via s3fs
alexgordon has quit [Read error: Connection reset by peer]
<mkroman>
any x86_64 gurus in here?
<ec>
I just spent an hour in the Apple Store with my girlfriend's mom, advising her on their first computer purchase in eight years.
<ec>
alexgordon: I'm still here
<ec>
glowcoil: I'm so confused by kinds
<ec>
explain `(->) ::` first
<ec>
then the `* -> * -> *` part later
<ec>
so is (::) another haskelley operator; or is it *actual syntax* this time around, hard-coded
<ec>
wait
<ec>
oh
<ec>
so kinds == arity?
<glowcoil>
ec: kinds are the "types" of Types
<glowcoil>
ec: of Type-land values
<glowcoil>
ec: so like, value-land values have a lot of different concrete types they can be like Int and Char and Bool, whereas all concrete Types have only one Kind, *
<glowcoil>
ec: there are type *constructors* which take arguments, and the Kinds of those contain -> in them
<glowcoil>
ec: so :: is haskell syntax
<glowcoil>
ec: 3 :: Int is like, not something you'd type, because you're usually using it as a declaration
<glowcoil>
ec: so like x :: Int and then x = 3
<glowcoil>
ec: but 3 :: Int is like, a true statement you can make or whatever
<glowcoil>
of fact
<ec>
lily just peed everywhere in front of me
<glowcoil>
nice job
<ec>
4:58 PM <glowcoil> ec: there are type *constructors* which take arguments, and the Kinds of those contain -> in them
<ec>
wat
<ec>
I get most of it
<ec>
, but, still: kind seriously sounds like arity
<ec>
like, all you can express with it seems to be the “arguments-shape” of the types
<glowcoil>
right
<glowcoil>
what i mean is
<glowcoil>
types express arity, as well as a lot of other stuff, about Value-Values
<ec>
God my dog is gross
<glowcoil>
and kinds express basically ONLY arity about Types
<ec>
yah makes sense
<ec>
is there any use/purpose to kinds having a syntax?
<glowcoil>
ok so yeah that's like, kind of a distraction except
* glowcoil
it does
<glowcoil>
whoops
<glowcoil>
didn't mean to send that message
<glowcoil>
oh you barely use it
<glowcoil>
it's useful to like
<glowcoil>
notate things about type land
<glowcoil>
in ghci
<glowcoil>
you can go
<ec>
lol irccloud ⌘ ↩
<purr>
lol
<glowcoil>
:k ____
<glowcoil>
to see the kind of something
* glowcoil
asdf
<glowcoil>
and like in a discussion it's a way to express something precisely and succinctly
<glowcoil>
when you're doing heavy duty type land things
<ec>
wait
<ec>
did I
<ec>
is kind *just* literally type, with every word replaced with *?
<glowcoil>
also i explained it because it like, makes clear the way type land is like, a fully privileged land with values in it, with a specific relationship to value land
<glowcoil>
basically
<ec>
okay so now let's talk types and values:
<ec>
you said something about Func / ->
<ec>
can you iterate that
<glowcoil>
yeah so
<glowcoil>
-> is a normal old function in type land
<glowcoil>
which takes two arguments
<glowcoil>
so if you go
<glowcoil>
type Func = (->)
<glowcoil>
now you can say
<glowcoil>
Func Int Int
<glowcoil>
you could also write
<glowcoil>
type Func a b = a -> b
<glowcoil>
equivalently
<pikajude>
node.js 5.0.0?
<ec>
"normal old function"
<glowcoil>
it's a function that takes types and returns types
<ec>
what *is* a function in type-land then, I'm still puzzled by that; that's what I wanted to know
<ec>
and, are there any type-functions (is there a word for that) other than (->)
<glowcoil>
yes plenty
<glowcoil>
for instance
<glowcoil>
List
<glowcoil>
List takes a type, and gives you the type of lists of that type