<montanonic>
"If the then and else branches of an if produce different types then the if produces a union of the two." *that* is an awesome feature, wow. In Haskell or Rust, you'd have to create an ad-hoc data structure or enum to accomplish this, I believe.
copy` has left #ponylang [#ponylang]
<montanonic>
Functions aren't first class in Pony, then, correct? Functions are objects, which are first class?
<montanonic>
Or rather, *lambdas* are just singleton objects, and objects are first-class
<doublec>
montanonic: yes
<montanonic>
What type is `lambda(x: U32): U32 => x * 2 end`? I tried to figure it out by binding it to a value with an incorrect type, but it doesn't seem like it inferred properly: `let times_two: U32 = lambda(x: U32): U32 => x * 2 end`
<doublec>
montanonic: although the tutorial is up to date now too but it might have more detail
<montanonic>
doublec: oh right, I totally forgot; yes, I saw that earlier, just slipped my mind, thank you
<montanonic>
also, thanks for the blog post, reading now
<doublec>
np
<doublec>
I wrote the lambda/closure section for the tutorial after writing that post to explore how things work so they're somewhat similar with the tutorial being more tutorial-ish.
Perelandric has quit [Ping timeout: 250 seconds]
<SeanTAllen>
and doublec is doing the community the huge favor of filling out the currently empty generics section which will be huge for new people coming in...
<montanonic>
Ah, I was literally just about to ask about the Generics section
<montanonic>
doublec: if you have your current write-up on Github I'd be happy to peer-review what you have from the perspective of someone literally just learning Pony
<montanonic>
random question about Pony: is having live interaction with a running distributed system (like that offered by the Erlang VM) a goal of Pony? obviously, not a short-term one, but one nonetheless?
<montanonic>
on the small scale, being able to locally interact with live running processes
<montanonic>
send messages to existing actors, stuff like that
<montanonic>
Lisps offer similar interactivity, albeit an entirely different kind.
<doublec>
montanonic: A repl has been talked about but I don't know about plans for that+distributed pony
<doublec>
montanonic: others here might know more about it as I haven't kept up to date with the developments
<montanonic>
Yeah, I'm primarily trying to figure out if Pony is aiming to fit into the Erlang-shaped hole that is massively distributed fault-tolerant systems. As far as I'm aware, nothing aside from languages running on the Erlang Virtual Machine can tackle this problem very well.
<montanonic>
The main language description and philosophy don't quite seem to indicate this as being the direction of the language, which is of course fine, I'm just curious to know.
<montanonic>
s/the direction/a direction
<montanonic>
I have a method with the signature `fun modify(f: {(U32): U32}): U32 => f(x)`, and a singleton object `fun times_two(x: U32): U32 => x * 2`, bit it doesn't seem like I can pass `times_two` like this: `blah.modify(times_two)` or this `blah.modify(~times_two())`. Is there a way to do this without wrapping `times_two` in a lambda?
<mankyKitty>
so many awesome languages to poke around with, not enough hours in the day
<montanonic>
mankyKitty: I concur. I've been in the crazy habit lately of learning a bunch of new languages without really knowing what problem I want to solve in the first place (I guess the hope is that seeing unique ways to solve problems will inspire me?). Still, good to bend one's mind a bit.
<mankyKitty>
montanonic: I'm lucky that i get to use Haskell at work so mostly my hunger for languages is sated.. But lately I've been messing with Prolog/Erlang and Rust... Contemplating adding the rather neat looking Pony to the list. ATS2 defeated me :<
<montanonic>
mankyKitty: I knew I recognized you from somewhere, you're on Haskell IRCs. Congrats on having a Haskell job; sounds nice.
<mankyKitty>
hehe ty ty ^.^
<mankyKitty>
lot of scala though *cries*
<montanonic>
I've been messing with Erlang/Elixir and Rust as well. Cool stuff. I'm particularly drawn to Erlang.
<montanonic>
ouch, Scala is a total mess, unfortunately (as you are probably keenly aware)
<mankyKitty>
yis
<montanonic>
mankyKitty: where do you work, if I may ask?
<mankyKitty>
iseek Communications
<montanonic>
cool! thank you
<mankyKitty>
I'm trying to use Erlang as my scripting language, to sneak in some practice
<mankyKitty>
although I like my types a bit too much so I might swap that for pony...maybe
<montanonic>
it seemed to me that Erlang (Elixir in particular) are surprisingly well-equip scripting languages, since they can basically act as a supervisor for starting and stopping other programs (ports and such)
<mankyKitty>
very true
<montanonic>
I find the the lack of types in those languages are fine, but only if you're adhering strictly to OTP, and even then I wish basic (golang level) static typing was in the compiler instead of dialyzer
<montanonic>
which is why I'd be super stoked if something like Pony could eventually take on the types of problems that Erlang was built to solve :)
<mankyKitty>
that sounds like the plan, from the teeeeeeeeeeny tiny bit I've read of Pony. At least in it's own verifiable fashion
jemc has quit [Ping timeout: 276 seconds]
SilverKey has joined #ponylang
<montanonic>
one other major plus for Pony so far: great job with the syntax. I can actually envision other people using it. Poor, poor Erlang.
<montanonic>
not that people *should* be so scared or pedantic about syntax, but, it certainly makes a difference with adoption rates
<montanonic>
case study: Elixir
<mankyKitty>
heh
<mankyKitty>
building from source is just `make && make install` ?
<mankyKitty>
nvm...rtfm *ahem*
tm-exa has joined #ponylang
SilverKey has quit [Quit: Halted.]
tm-exa has quit [Quit: Computer has gone to sleep]
jemc has joined #ponylang
k0nsl has quit [Ping timeout: 244 seconds]
k0nsl has joined #ponylang
rurban has joined #ponylang
rurban has left #ponylang [#ponylang]
tm-exa has joined #ponylang
rurban1 has joined #ponylang
k0nsl has quit [Ping timeout: 240 seconds]
jemc has quit [Ping timeout: 272 seconds]
k0nsl has joined #ponylang
rurban1 has left #ponylang [#ponylang]
amclain has quit [Quit: Leaving]
k0nsl has quit [Ping timeout: 240 seconds]
k0nsl has joined #ponylang
<doublec>
mankyKitty: ATS got easier for me once I viewed as C in ML syntax plus depedent types
<doublec>
montanonic: did you solve your lambda problem/
<doublec>
montanonic: in all likelyhood you want this~times_two()
<montanonic>
doublec: I wasn't able to figure it out, so I went back to binge-studying Go so that I can be hirable if I can't find interesting work in other languages
<montanonic>
doublec: in the case of the function I'm using, it's defined outside of another class
<doublec>
(That's the equivalent of a top level function)
<montanonic>
No, literally just `fun times_two(x: U32): U32 => x * 2` in the top-level of the file
<montanonic>
no nesting
<montanonic>
even under a primative
<doublec>
montanonic: that doesn't work for me
<montanonic>
Wait....
<montanonic>
yeah, I think I'm forgetting Pony doesn't have actual white-space significance
<montanonic>
It's actually a member of my Main actor
<doublec>
Ah right, it's going to the class/actor which is why this~ worked
<montanonic>
right, interesting
<montanonic>
so, in Pony, you can't actually nest classes/actors then, right? as it seems that those are the declarations that separate code
<doublec>
right
<montanonic>
that would apply to: interface, trait, primitive, as well, yes?
<doublec>
yes
<montanonic>
good
<montanonic>
doublec: thank you for helping/clarifying
<doublec>
np
<doublec>
Nothing stopping you from returning a first class object from one of those though
<doublec>
which is a type of nesting
<montanonic>
doublec: you can only return object singletons though, right?
<montanonic>
using literals?
<doublec>
Hmm, I wonder if you can call a constructor on the singleton
<montanonic>
you couldn't have a method return a class that you defined inside of it
<montanonic>
right? I might have to test
* doublec
tries
Perelandric has joined #ponylang
<montanonic>
yeah, doesn't seem to be the case that you can arbitrarily define and return a new type, given that using any of the type keywords (aside from object/lambda) breaks the nesting
<montanonic>
have not thoroughly tested though, but this is good design if it holds, completely kills ambiguity
<montanonic>
definitely a fan of not being able to nest; unnecessary complexity
<doublec>
Fails to compile with an internal failure
<doublec>
I was curious if you could call a constructor defined in an object literal
<montanonic>
doublec: which types have constructors? I didn't realize that Trait had that
<montanonic>
So far I know that Class and Actor do
<doublec>
Oh, updating the compiler gives a better error
<doublec>
"can't call a constructor on a trait: Maker ref"
<doublec>
montanonic: it doesn't - I was seeing if it could :)
<montanonic>
doublec: ahhh, okay :)
* doublec
likes poking random edges of language implementations
k0nsl has quit [Ping timeout: 244 seconds]
k0nsl has joined #ponylang
k0nsl has quit [Ping timeout: 240 seconds]
k0nsl has joined #ponylang
rurban has joined #ponylang
rurban1 has joined #ponylang
rurban2 has joined #ponylang
Perelandric has quit [Ping timeout: 250 seconds]
rurban has quit [Ping timeout: 240 seconds]
rurban1 has quit [Ping timeout: 264 seconds]
rurban2 has quit [Ping timeout: 250 seconds]
rurban has joined #ponylang
rurban has left #ponylang [#ponylang]
<montanonic>
Why do Primitives even allow constructors?
<montanonic>
I guess, technically, you can use Primitive constructors to take in values that you then cause side-effects to.... which seems..... weird
rurban has joined #ponylang
<montanonic>
You can do something funky like this: `primitive AmazingDoublingFunction; new create(env: Env) => env.out.print("Wow, Amazing!"); fun double(x: U32): U32 => x * 2`
<montanonic>
to make it so that anyone who uses your doubling algorithm understands just how amazing it is every time they call it
<montanonic>
This is actually, oddly, (potentially uselessly?) interesting: you could make a constructor that requires some resource, and which consumes some of that resource (semaphores?) every time one of the primitives associated functions are used
<montanonic>
which you could also do in just the same way with a class, but then again, you can do a lot more with a class
rurban has quit [Ping timeout: 276 seconds]
montanonic has quit [Ping timeout: 258 seconds]
_andre has joined #ponylang
trapped has joined #ponylang
mrkishi has quit [Ping timeout: 240 seconds]
TwoNotes has joined #ponylang
<TwoNotes>
Is there a master list of all Actor structs?
SilverKey has joined #ponylang
<TwoNotes>
Either something is writing all over the Actor data, or the pointers to where Actors are supposed to be are themselves wrong
TwoNotes has left #ponylang [#ponylang]
TwoNotes has joined #ponylang
SilverKey has quit [Quit: Halted.]
k0nsl has quit [Ping timeout: 240 seconds]
SilverKey has joined #ponylang
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ponylang
jemc has joined #ponylang
nyarumes has joined #ponylang
nyarum has quit [Ping timeout: 244 seconds]
Perelandric has joined #ponylang
rurban has joined #ponylang
rurban has left #ponylang [#ponylang]
k0nsl has joined #ponylang
k0nsl has quit [Excess Flood]
k0nsl has joined #ponylang
k0nsl has quit [Ping timeout: 272 seconds]
k0nsl has joined #ponylang
k0nsl has quit [Excess Flood]
k0nsl has joined #ponylang
amclain has joined #ponylang
runehog has quit [Remote host closed the connection]
k0nsl has quit [Ping timeout: 272 seconds]
TwoNotes has quit [Quit: Leaving.]
tm-exa has quit [Quit: Computer has gone to sleep]
runehog has joined #ponylang
SilverKey has quit [Quit: Halted.]
tm-exa has joined #ponylang
srm` has quit [Ping timeout: 240 seconds]
SilverKey has joined #ponylang
theodus has joined #ponylang
k0nsl has joined #ponylang
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ponylang
Matthias247 has joined #ponylang
tm-exa has quit [Quit: Computer has gone to sleep]
theodus has quit [Remote host closed the connection]
SilverKey has quit [Quit: Halted.]
rurban has joined #ponylang
tm-exa has joined #ponylang
rurban1 has joined #ponylang
rurban has quit [Ping timeout: 240 seconds]
rurban1 has left #ponylang [#ponylang]
montanonic has joined #ponylang
_andre has quit [Quit: leaving]
srm` has joined #ponylang
SilverKey has joined #ponylang
montanonic has quit [Ping timeout: 246 seconds]
SilverKey has quit [Quit: Halted.]
montanonic has joined #ponylang
runehog has quit [Remote host closed the connection]
tm-exa has quit [Quit: Computer has gone to sleep]
tm-exa has joined #ponylang
tm-exa has quit [Client Quit]
rurban has joined #ponylang
rurban has quit [Client Quit]
montanonic has quit [Ping timeout: 240 seconds]
montanonic has joined #ponylang
runehog has joined #ponylang
SilverKey has joined #ponylang
SilverKey has quit [Quit: Halted.]
jemc has quit [Ping timeout: 250 seconds]
aturley has quit [Ping timeout: 276 seconds]
Matthias247 has quit [Read error: Connection reset by peer]