jemc changed the topic of #ponylang to: Welcome! Please check out our Code of Conduct => https://github.com/ponylang/ponyc/blob/master/CODE_OF_CONDUCT.md | Public IRC logs are available => http://irclog.whitequark.org/ponylang | Please consider participating in our mailing lists => https://pony.groups.io/g/pony
jemc has quit [Ping timeout: 260 seconds]
nyarum has joined #ponylang
nyarum has quit [Ping timeout: 260 seconds]
amclain has quit [Quit: Leaving]
Praetonus has quit [Quit: Leaving]
tj800x has joined #ponylang
<tj800x> Hi, I'm trying to get the most basic actor function working in Pony.
<tj800x> I'm so incredibly frustrated by this language. I've learned maybe 50 languages but none of them has been as tough to learn as this one.
<tj800x> I'm trying the exercism helloworld. I can't get my actor to return a string.
<tj800x> actor HelloWorld fun hello(): String => "Hello, World!"
<tj800x> The test that is supposed to run this is:
<tj800x> use "ponytest"
<tj800x> actor Main is TestList
<tj800x> new create(env: Env) => PonyTest(env, this)
<tj800x> fun tag tests(test: PonyTest) => test(_TestHelloWorld)
<tj800x> class iso _TestHelloWorld is UnitTest
<tj800x> fun name(): String => "hello-world/HelloWorld"
<tj800x> fun apply(h: TestHelper) =>
<tj800x> h.assert_eq[String]("Hello, World!", HelloWorld.hello())
<tj800x> Rough when you have to understand the test framework to even get a helloworld running.
<tj800x> I spent all afternoon on type capabilities and built a very nice cheatsheet. Now I think I'm dumb as a stump.
<tj800x> I did, but I'll go back in look again. Sorry so frustrated.
jemc has joined #ponylang
<doublec> tj800x: I'm not sure why you are trying to use the test framework
<doublec> tj800x: you don't need to use that to get a hello world going
<tj800x> It's how exercism.io is setup.
<tj800x> It's a pretty steep first step...or maybe I'm just thick in the head.
<doublec> tj800x: I'm not familiar with exercism.io. Do they want you to write something that passes that test?
<tj800x> I will go read up on the buishcoder. Struggling through this is what is best for me.
<tj800x> Yes.
<tj800x> They have something like 10 Pony exercises for learning the language. I couldn't get by step one.
<doublec> That seems like "Learn pony the hard way"
<tj800x> I think I'm having such trouble because I have 25+ years of experience pointing me in exactly the wrong direction.
<tj800x> Thanks...I'm going to go to bed and try again in the AM.
<jemc> tj800x: the main thing I see wrong with your code is that you can't call any synchronous methods (functions - `fun`) on another actor - you can only call asynchronous methods (behaviours - `be`)
<jemc> and an asynchronous method cannot have a return value
<tj800x> I thought so...I tried the be first and got a different error.
<jemc> so to fulfill the test that exercism gave you, `HelloWorld` cannot be an actor - it should be a `primitive` or a `class`
<jemc> (because you can call synchronous methods on those, and synchronous methods can return a value)
<tj800x> So I've been completely barking up the wrong tree.
<tj800x> Okay. I gotta go back and study some more.
<jemc> I mean, not really - change your `actor` keyword to `primitive` and you should be passing
jemc has quit [Quit: WeeChat 1.4]
jemc has joined #ponylang
nyarum has joined #ponylang
tj800x has quit [Quit: Page closed]
nyarum has quit [Ping timeout: 260 seconds]
<SeanTAllen> I took a look at the exercism.io exercises. I don't think they are a great way to learn Pony. I can see how tj800x ran into trouble.
<SeanTAllen> tj800x, if you come back and check the chat logs, my message is don't be discouraged. The problem you ran into is not remarkable. If I didn't know Pony and tried those exercises I'd probably have the same problem.
<SeanTAllen> From the exercises I looked at, they mostly require you to write a class or s primitive. Not an actor. But I suspect most folks would try to use an actor because after all, Pony is about actors right?
vaninwagen has joined #ponylang
nyarum has joined #ponylang
nyarum has quit [Ping timeout: 246 seconds]
jemc has quit [Ping timeout: 260 seconds]
papey_lap has joined #ponylang
nyarum has joined #ponylang
nyarum has quit [Ping timeout: 276 seconds]
papey_la1 has joined #ponylang
papey_lap has quit [Ping timeout: 260 seconds]
nyarum has joined #ponylang
nyarum has quit [Ping timeout: 246 seconds]
_andre has joined #ponylang
jemc has joined #ponylang
jemc has quit [Client Quit]
jemc has joined #ponylang
TheNet has joined #ponylang
nyarum has joined #ponylang
nyarum has quit [Ping timeout: 240 seconds]
papey_la1 is now known as papey_lap
TheNet has quit [Quit: Textual IRC Client: www.textualapp.com]
Praetonus has joined #ponylang
vaninwagen has quit [Ping timeout: 240 seconds]
nyarum has joined #ponylang
nyarum has quit [Remote host closed the connection]
nyarum has joined #ponylang
nyarum has quit [Remote host closed the connection]
nyarum has joined #ponylang
nyarum has quit [Remote host closed the connection]
amclain has joined #ponylang
amclain has quit [Quit: Leaving]
nyarum has joined #ponylang
nyarum has quit [Remote host closed the connection]
amclain has joined #ponylang
nyarum has joined #ponylang
nyarum has quit [Remote host closed the connection]
nyarum has joined #ponylang
nyarum has quit [Remote host closed the connection]
nyarum has joined #ponylang
nyarum has quit [Remote host closed the connection]
nyarum has joined #ponylang
Praetonus has quit [Quit: Leaving]
nyarum_ has joined #ponylang
bitcrusher has quit [Read error: Connection reset by peer]
nyarum has quit [Ping timeout: 255 seconds]
endformationage has joined #ponylang
nyarum_ has quit [Remote host closed the connection]
nyarum has joined #ponylang
papey_lap has quit [Ping timeout: 246 seconds]
Matthias247 has joined #ponylang
nyarum has quit [Remote host closed the connection]
nyarum has joined #ponylang
nyarum has quit [Remote host closed the connection]
vaninwagen has joined #ponylang
bitcrusher has joined #ponylang
_andre has quit [Quit: leaving]
bitcrusher has quit [Read error: Connection reset by peer]
vaninwagen has quit [Ping timeout: 240 seconds]
nyarum has joined #ponylang
Matthias247 has quit [Read error: Connection reset by peer]
theodus has joined #ponylang
jmiven has quit [Quit: co'o]
jmiven has joined #ponylang
bitcrusher has joined #ponylang
theodus has quit [Quit: Page closed]