<alexgordon>
glowcoil: it's already for not though
<glowcoil>
alexgordon: well take it out!
<glowcoil>
haha
<glowcoil>
just use "not" :p
<alexgordon>
it'll confuse everybody -_-
<glowcoil>
ELLIOTTCABLE: so like you know x = x + 1 is x += 1, and in ruby there's a = a.sort as well as a.sort!
<glowcoil>
ELLIOTTCABLE: alexgordon suggests a systematic way to do that
<glowcoil>
alexgordon: no, haskell does "not"
<glowcoil>
alexgordon: and lua
<glowcoil>
and plenty of other languages
<glowcoil>
it won't confuse at all
<alexgordon>
not saying you can't have "not"
<ELLIOTTCABLE>
Confus
<alexgordon>
but if you change the meaning of ! as an unary operator, people are gonna get confused
<ELLIOTTCABLE>
Why bang instead of +=
<joelteon>
your mum
<glowcoil>
alexgordon: well it'd be postfix
<alexgordon>
see ELLIOTTCABLE's already confused
<glowcoil>
alexgordon: an adverb
<glowcoil>
ELLIOTTCABLE: because += is only for +
<glowcoil>
ELLIOTTCABLE: ! is for *everything*
<ELLIOTTCABLE>
Example
<alexgordon>
ELLIOTTCABLE: see the example above, sort(&x) means x = sort(x)
<alexgordon>
dunno about micah's syntax
<alexgordon>
sort(x!) ?
<glowcoil>
hm
<glowcoil>
! seems like an adverb not a noun-modifier
<glowcoil>
& seems better
<glowcoil>
but also confusing
<alexgordon>
sort!(x) would be possible but less powerful
<glowcoil>
more precise too
<glowcoil>
yeah
<alexgordon>
because it doesn't state which variable is modified
<Willox>
It sounds better to me
<Willox>
oh yeah, that's true
<Willox>
I don't like it any more
<alexgordon>
LOL
<purr>
LOL
<alexgordon>
so like with zip it would be important
<joelteon>
use some apl chars
<alexgordon>
zip(x, &y)
<alexgordon>
would be y = zip(x, y)
<joelteon>
zip(&x,&y) = ?
<glowcoil>
i like the idea of partially applying arguments in any order with a smalltalk-like message syntax
<alexgordon>
joelteon: error
<glowcoil>
like
<joelteon>
oh
<glowcoil>
something like clojure's lambdas #(+ 1 %)
<glowcoil>
or like
<glowcoil>
f(x, )
<joelteon>
or f x
<alexgordon>
I mean you could have x = y = zip(x, y) but that's more readable than multiple &
<glowcoil>
joelteon: but that's not conducive to out of order
<joelteon>
or flip f x
<glowcoil>
and then you get to the gross things
<glowcoil>
acrobatics
<Willox>
Why not x, y
<joelteon>
f(g(&x)) = ?
<glowcoil>
alexgordon: this is kind of like a delimited contiuniation
<alexgordon>
joelteon: good question
<glowcoil>
alexgordon: you have to decide how far out it extends
<glowcoil>
the whole statement?
<alexgordon>
yeah
<alexgordon>
because assignment is a statement thing
<alexgordon>
I think?
<alexgordon>
it would be weird if it was an inner
<alexgordon>
yeah because then if you have a string
<joelteon>
x + g(&x)?
<alexgordon>
reverse(strip(&s))
<glowcoil>
i mean
<glowcoil>
x = (y = 3)
<alexgordon>
makes more sense as s = reverse(strip(x))
<alexgordon>
s
<glowcoil>
but not in python tho
<joelteon>
f(&x) + g(&x)?
<alexgordon>
joelteon: let's say only one & per statement
<glowcoil>
alexgordon: or,
<glowcoil>
&x + &y
<glowcoil>
now both are set to it
<alexgordon>
joelteon: and it has to be an expression statement
<alexgordon>
glowcoil: it's neat, but neat in the same way that PHP is neat
<alexgordon>
people would abuse it :P
<alexgordon>
reminds me of variable variables in PHP $$foo
<glowcoil>
lol yeah
<purr>
lol
<glowcoil>
or in ugly-paws, ((foo))
<alexgordon>
if you stick to one per expression statement it's fine though
<glowcoil>
$x = "x"
<alexgordon>
x = strip(&s)
<alexgordon>
would be an error
<glowcoil>
$$$$$$$$$x
<Willox>
I think the a large use of this & operator would be for multiple variables
<glowcoil>
alexgordon: $$$$$&x
<alexgordon>
xD
<alexgordon>
Willox: :|
<joelteon>
${"$x$x"}
<Willox>
Just saying
<alexgordon>
Willox: can you give a practical example?
<glowcoil>
"#{&x}"
<alexgordon>
glowcoil: oh THAT is nice
<alexgordon>
"(#{&x})"
<alexgordon>
wrap something in parens
<joelteon>
alexgordon: use double quotes for something funny
<Willox>
Addition
<Willox>
addition of chars, it's perfect
<joelteon>
yeah
<alexgordon>
I'm lost
<joelteon>
like "ab" is actually Ã
<Willox>
print("Hello, World!")
<Willox>
help it isn't working!
<joelteon>
"why is it printing ѩ?"
<Willox>
haha
<alexgordon>
glowcoil: I actually think this works better on the right
<alexgordon>
sort(x&)
<alexgordon>
reason is
<alexgordon>
say you have a member, person.name
<ELLIOTTCABLE>
OH
<ELLIOTTCABLE>
I THOUGHT --> WAS A PART OF IT
<ELLIOTTCABLE>
Loverly erdea
<alexgordon>
ELLIOTTCABLE: LOL no
<purr>
LOL
<ELLIOTTCABLE>
But I agree with Micah.
<alexgordon>
reverse(person.name&) would mean person.name = reverse(person.name)
<ELLIOTTCABLE>
There's an ordered *meaning* to where you place something
<glowcoil>
ELLIOTTCABLE: while (x --> 0) {}
<ELLIOTTCABLE>
and if you place it alone, it implicitly means, we don't use the result of this.
<alexgordon>
and reverse(person&.name) would mean person = reverse(person.name)
<ELLIOTTCABLE>
So, I wouldn't put the syntax inside.
<Willox>
that's freaky, alexgordon
<alexgordon>
ELLIOTTCABLE: but then it doesn't specify WHICH lvalue would be modified
<ELLIOTTCABLE>
yeah, I like the idea, it's truly innovative.
<ELLIOTTCABLE>
Valid point.
<alexgordon>
ELLIOTTCABLE: zip(x&, y) means x = zip(x, y)
<ELLIOTTCABLE>
Hey.
<glowcoil>
i like an outside and inside thing
<ELLIOTTCABLE>
Idea.
<glowcoil>
then you can also make it delimited more precisely
<alexgordon>
zip(x, y&) means y = zip(x, y)
<ELLIOTTCABLE>
Not EXACTLY THE SAME idea, but similar one.
<alexgordon>
zip&(x, y) is ambiguous
<ELLIOTTCABLE>
Generalize the entire thing!
<ELLIOTTCABLE>
Let's make *syntactic variables*
<alexgordon>
oh god
<ELLIOTTCABLE>
Like, er, howsyousayit,
<Willox>
what
<ELLIOTTCABLE>
A type of lexically-scoped variables, in a dynamically-scoped world
<ELLIOTTCABLE>
Oh, that's right, Willox is new here.
<Willox>
yes
<Willox>
which is why I say what
<ELLIOTTCABLE>
Hi Willox. I'm insane. Don't expect anything I say to make sense. <3
<ELLIOTTCABLE>
Alex: here's what I mean.
<ELLIOTTCABLE>
Just, random crazy idea, not seriously saying do it like this.
<alexgordon>
ok
<alexgordon>
go
<ELLIOTTCABLE>
Have a certain number of characters (two symbols? three? think $ and _, how they're used in JS and similar.) that, when used, bind *lexically* to the name they're used adjacent to. Then, anywhere in that lexical scope, they're identical.
<alexgordon>
example?
<ELLIOTTCABLE>
$=user_age$ + 1
<ELLIOTTCABLE>
bad example.
<alexgordon>
oh
<alexgordon>
I see
<ELLIOTTCABLE>
meh. Already dislike. Too generalized and far less useful than your specific usage.
<alexgordon>
:P
<glowcoil>
reminds me of haskell pattern matching:
<ELLIOTTCABLE>
The only upside is allowing for A) multiple binds instead of just one per statement, and B) more exotic things than re-assignment
<glowcoil>
f list@(x:xs) = asdfasdf
<alexgordon>
ELLIOTTCABLE: should be called "nicknames"
<glowcoil>
list is bound to the whole pattern
<glowcoil>
also Perl has those little pronouns
<ELLIOTTCABLE>
Yeah like that
<glowcoil>
$_ and shit
<ELLIOTTCABLE>
Nicknames <3
<ELLIOTTCABLE>
Exactly.
<ELLIOTTCABLE>
Problem is, wasting a ton of ASCII space, on a little-used feature.
<whitequark>
I've actually read tetris porn, it was great
<whitequark>
okay, I googled some of that, don't repeat my errors
<whitequark>
*applies bleach*
Sgeo has quit [Read error: Connection reset by peer]
Willox has joined #elliottcable
PLejeck has quit [Ping timeout: 252 seconds]
PLejeck has joined #elliottcable
alexgordon has joined #elliottcable
PragCypher has quit [Quit: Leaving]
<ELLIOTTCABLE>
lol.
<purr>
lol
<ELLIOTTCABLE>
Re: conversation last nifht , alexgordon, glowcoil, whitequark
<whitequark>
yeah
<ELLIOTTCABLE>
New character is unnecessary. Mid-expression assignment with no lvalue can easily be distinguished, and is farrrrrrrr more intuitive.
<ELLIOTTCABLE>
reduce(=a, b)
<whitequark>
let's discuss something more interesting
<whitequark>
my latest idea
<whitequark>
okay. I call it "Livetalk". it's an imperative (in the OCaml sense, not C++ sense), strongly statically typed language with type inference, declarative toplevel syntax (like C++ or Rust, not Ruby with its attr_accessor and friends)
<whitequark>
the interesting part is the "Live" part. the idea is that you may edit any of the code, at any moment, even if it means editing the function which is being executed right now
<whitequark>
moreover, unlike practically all implementations I've seen, it's statically typed, which means it has enough easily accessible information about code structure to actually *guide* you during modification
<whitequark>
of course, it means that modification is done via an interactive editor integrated with the language, and that's fine
<whitequark>
for example:
<whitequark>
x = 1; while foo(); x += 1; end
<ELLIOTTCABLE>
I'm all for innovations in developers interface, but not so much when you take the IDE approach.
<whitequark>
suppose you single-step right to the "x += 1" line.
<ELLIOTTCABLE>
As for editing the function-being-executed: how? What're your ideas, here?
<whitequark>
then you modify it to be x += "1", for example.
<whitequark>
of course, it doesn't typecheck; the earlier assignment means the x has type Integer
<whitequark>
so you modify that too
<whitequark>
but now you have a problem: you are inside a stack frame and that stack frame has x as Integer
<whitequark>
what to do? very simple, the editor asks you to write a mapping expression.
<whitequark>
then, it typechecks that expression and actually verifies that it would do the transformation you need!
<ELLIOTTCABLE>
Lots of men.
<whitequark>
so, it transforms static TS from a liability (more boilerplate to write) into an asset (an interactive theorem-proving system, available for other language services)
<whitequark>
what?
<ELLIOTTCABLE>
meh.*
<ELLIOTTCABLE>
Too specific, doesn't seem all that innovative.
<whitequark>
it was a motivating example *shrug*
<purr>
¯\(º_o)/¯
<ELLIOTTCABLE>
But also difficult for me to comment usefully on, as I have a fairly blanket revulsion to anything statically-typed/inferred. alexgordon?
<whitequark>
the idea is, you cannot do stuff like this in any statically typed language that exists
<whitequark>
you cannot make Rails autoreloading work
<whitequark>
you cannot define methods on the fly, you cannot do exploratory programming
<whitequark>
and there is no reason static type systems must prevent that.
<ELLIOTTCABLE>
I will say this, though:
<whitequark>
(innovative) sure it is, see above
<whitequark>
(too specific) I wonder. maybe true.
<ELLIOTTCABLE>
You're starting with an experience, a use-case … starting with the *editor*,
<ELLIOTTCABLE>
And then working backwards to design the language *for that*.
<whitequark>
no.
<ELLIOTTCABLE>
I want to see more ofvthat . from everyone, always ). You're on the right oath.
<ELLIOTTCABLE>
Fucking Android.
<whitequark>
I'm starting with the simple idea: "let's make a ST language which supports live coding"
<whitequark>
"let's make an ST language where Rails is possible".
<whitequark>
that is my idea.
<whitequark>
editor is but an implementation detail
<whitequark>
I want to be able to edit *anything*, *right fucking now*, without restarting entire system.
<ELLIOTTCABLE>
Just saying: live-coding is an end-user thing, not a PLT or implementational thing. And that's cool.
<whitequark>
and I want it to be statically typed, because NoMethodError: true has no method generate_authentication_token
<whitequark>
and fuck that a thousand fucking times
<whitequark>
yeah, kinda
<whitequark>
ELLIOTTCABLE: (blanket revulsion) well, I'm kinda doing it to address your concerns as well
<whitequark>
I know static typing is commonly said to be a "pain", and I know that, and I know, partly, why is that
<whitequark>
and there's no reason it must remain so.
<whitequark>
alexgordon: so, yeah, when you come I'd wanna to discuss more concrete concerns
<whitequark>
as ec would be useless with that
<ELLIOTTCABLE>
<3
<alexgordon>
hi whitequark
<alexgordon>
ELLIOTTCABLE: " I have a fairly blanket revulsion to anything statically-typed/inferred" not everybody is a maniac like you though
<ELLIOTTCABLE>
Didn't say they were.
<joelteon>
haha
<joelteon>
yeah static typing sucks
<ELLIOTTCABLE>
Explicitly said it'd probably be a better idea to talk to *you* about that. :P
<joelteon>
have to please the compiler and stuff
<joelteon>
on error resume next for life!
<alexgordon>
static typing is awesome
<alexgordon>
I don't see why static typing is a pain
<alexgordon>
it's only a pain in the absence of type inference and dynamic typing
<alexgordon>
if you have both of those, it's glorious
<whitequark>
alexgordon: it's a pain because it requires you to think about code upfront
<whitequark>
I mean, you can't open the console and then define methods one by one with your usual statically typed lang
<whitequark>
like you can with irb
<whitequark>
I want an amazing environment for exploratory programming
<joelteon>
you mean like ghci?
<joelteon>
or cling?
<alexgordon>
whitequark: tbh I don't do that with python either
<alexgordon>
maybe I'm just strange
<whitequark>
kinda like cling
<whitequark>
but cling doesn't go far enough and sucks for other reasons (C)
<whitequark>
no idea about ghci, but... if it's anyting like ocaml's console
<whitequark>
it's crap.
<alexgordon>
I've never found repls very useful because terminals are annoying to type in
<joelteon>
it's nothing like ocaml's console
<joelteon>
so it's not crap
<whitequark>
*ocaml's repl
<whitequark>
have you ever seen it
<joelteon>
sure
<joelteon>
same thing
<whitequark>
alexgordon: well I'm not making another goddamn repl
<whitequark>
that a repl is possible is a mere side effect
<whitequark>
so, will you listen to me?
<alexgordon>
whitequark: I'm just saying, repls are pretty useless IMO :P
<joelteon>
ghci is absolutely invaluable
<alexgordon>
really?
<whitequark>
well I'm using them like all the time and there are whole 60-minute talks about pry
<joelteon>
yep
<whitequark>
so I think repls are valuable both from my pov and community's
<alexgordon>
how do you like edit a line above the one you've typed in?
<joelteon>
splice dumping, type introspection, information about definitions
<whitequark>
like, pry's ls is amazing
<joelteon>
you just rebindf it
<joelteon>
rebind*
<whitequark>
alexgordon: *exactly*
<joelteon>
it'll shadow the old binding
<whitequark>
this is what I want to address
<whitequark>
so, first I'd need to say some fundamental crap
<whitequark>
you've seen the categorization of language above, right?
<alexgordon>
nope
<whitequark>
18:10 <+whitequark> okay. I call it "Livetalk". it's an imperative (in the OCaml sense, not C++ sense), strongly statically typed language with type inference, declarative toplevel syntax (like C++ or Rust, not Ruby with its attr_accessor and friends)
<whitequark>
18:11 <+whitequark> the interesting part is the "Live" part. the idea is that you may edit any of the code, at any moment, even if it means editing the function which is being executed right now
<whitequark>
so the idea is, it has structural typing for objects
<whitequark>
smalltalk-style, the only external interface of object is its methods
<alexgordon>
right
<whitequark>
and all arguments in all methods are keyword ones, optional or not
<whitequark>
so you have a subtyping relationship between any two objects, based on whether their signatures are compatible or not
<whitequark>
so you can redefine a method to include an additional optional argument and it will Just Work, for example
<whitequark>
or you can define more methods for an object
<whitequark>
"Integer" would be an abbreviation for the signatures of all methods in Integer, I think
<whitequark>
so this is how I achieve mutual recursion in wake of method redefinition
<whitequark>
makes sense?
<whitequark>
statically typed late binding
<alexgordon>
I see, I thnk
<whitequark>
also, there's only local type inference, and no ruby's define_method, for reasons which will be clear later
<whitequark>
instead there's just macros, you can implement attr_accessor with macros just as well
<whitequark>
so now there's the interesting part. you can modify any expression in code "live" as long as:
<whitequark>
1) the inferred types for all storage stays the same, or
<whitequark>
2) you explicitly provide an expression to convert old stored type to new stored type
<whitequark>
additionally, there's some restriction on live modification by control flow
<alexgordon>
heh reminds me of database migrations
<whitequark>
exactly!
<whitequark>
this is exactly what it is
<whitequark>
so. control flow. it doesn't make sense to delete currently executing function.
<whitequark>
basically, if you modify code which is currently executing (on the call stack), the language must be able to apply your modifications as a 'patch'
<whitequark>
I'm still working out the details, but it looks like it could work in most interesting cases
<alexgordon>
I really like the smalltalk/mathematica idea of having a _conversation_ with a computer. it's a pity that neither are great languages to work with
<whitequark>
tell me more
<alexgordon>
same goes for the way notch codes, with live updating
<whitequark>
I found it that mathematica is not much more than a REPL with some funky datatype
<whitequark>
*datatypes
<whitequark>
is it not?
<alexgordon>
what really makes it for me is the charts
<alexgordon>
charts are what's missing from debuggers
<whitequark>
ddd ?
<alexgordon>
"hey let's plot a graph of array"
<alexgordon>
I found myself wanting that in python the other day, had to install matplotlib, but it's not the same
<whitequark>
alexgordon: well, okay, listen further
<whitequark>
I think the absolute best application of the tech I imagine is GUIs
<whitequark>
it sucks so much to recompile something in Qt after modification
<alexgordon>
yeah
<alexgordon>
have you ever used cssedit?
<whitequark>
it would be so much cooler if you could just modify it and it Will Work
<whitequark>
cssedit? never heard
<joelteon>
i've used cssedit
<whitequark>
ah. mac
<alexgordon>
whitequark: it's dead now, but I still have it installed :P
<joelteon>
it's awesome
<joelteon>
i can't use it too much though
<alexgordon>
whitequark: when you type, it live updates your css in the browser on every keystroke
<alexgordon>
it's niche, but that for me is how programming ought to be
<whitequark>
I see. I've used some similar thing in the past
<whitequark>
alexgordon: I totally agree, I want more of that
<joelteon>
someone needs to write a replacement in LESS
<whitequark>
so basically. what do you think about my idea? statically typed, very simple object/execution model, live update
<whitequark>
that's key points
<alexgordon>
you know micah was doing something similar to that
<alexgordon>
not statically typed
<alexgordon>
whitequark: simplify as far as possible, then make a prototype!
<whitequark>
hrm. statically typed is the interesting part here. it's what really makes the whole concept work
<whitequark>
alexgordon: I think it'll be a 'research language' either way
<whitequark>
so, minimal everything by design
<whitequark>
kinda like smalltalk ois
<whitequark>
*is
<whitequark>
okay. so what do you think would be the best host
<whitequark>
javascript or hotspot
<alexgordon>
javascript for sure
<whitequark>
I kinda like hotspot, I can add ffi to java and have it access production-quality GUI
<whitequark>
hrm
<whitequark>
means I'd have to write javascript :/
<alexgordon>
:|
<alexgordon>
java GUIs suck though
<whitequark>
also with hotspot I could write it in ocamljava!
<alexgordon>
lol do what you want to
<purr>
lol
<whitequark>
eh? I wanna a good language to implement interpreter in
<whitequark>
js is not a good one for that
<whitequark>
though there's js_of_ocaml...
<whitequark>
yeah that could work
<joelteon>
every language should just run on the JVM
<whitequark>
well, writing it in ocaml nails both :p
<whitequark>
and most of language is not vm-dependent so whatever
<whitequark>
I really need to think more about control flow, it's the wackiest part so far
<joelteon>
it's like LLVM, but usable
<whitequark>
lol what
<whitequark>
you have no idea what LLVM is for
<joelteon>
yeah i do
<whitequark>
so what is it, then?
<joelteon>
it ends in "VM"
<joelteon>
it's cross-platform machine code
<whitequark>
nope and nope
<joelteon>
it fucking ends in "VM"
<whitequark>
LLVM is not a VM and LLVM IR is platform-dependent
<joelteon>
don't tell me "LLVM" doesn't end in "VM"
<whitequark>
in fact it cannot be made platform-independent
<whitequark>
still it's not a VM; that's a misnomer
<joelteon>
i didn't say it was a VM
<joelteon>
i said it ends in "VM"
<whitequark>
don't be a smartass
<joelteon>
don't be a pedant
<whitequark>
don't say shit about LLVM when you have no idea what is it for
<joelteon>
c'mon, that's what IRC is for
<whitequark>
fwiw... LLVM IR is an IR for C-like languages, and LLVM is a compiler for C-like languages. essentially.
<whitequark>
the only thing it shares with JVM is "VM" in its name
<joelteon>
ok that makes sense
<joelteon>
i've never used LLVM so i can't expect myself to know anything about it
<joelteon>
not directly anyway
<joelteon>
i've asked GHC to use LLVM as its codegen sometimes