c355e3b has quit [Quit: Connection closed for inactivity]
aturley has joined #ponylang
aturley has quit [Ping timeout: 260 seconds]
fefee has quit [Quit: Page closed]
jemc has joined #ponylang
jemc has quit [Ping timeout: 260 seconds]
copy` has quit [Quit: Connection closed for inactivity]
SirWillem has joined #ponylang
rurban has joined #ponylang
aturley has joined #ponylang
unbalancedparen has quit [Quit: WeeChat 1.5]
aturley has quit [Ping timeout: 244 seconds]
SirWillem has quit [Ping timeout: 264 seconds]
aturley has joined #ponylang
aturley has quit [Ping timeout: 264 seconds]
nyarumes has quit [Ping timeout: 244 seconds]
trapped has joined #ponylang
aturley has joined #ponylang
hibnico has joined #ponylang
aturley has quit [Ping timeout: 276 seconds]
Praetonus has joined #ponylang
aturley has joined #ponylang
aturley has quit [Ping timeout: 252 seconds]
hibnico has quit [Quit: hibnico]
hibnico has joined #ponylang
tm-exa has joined #ponylang
c355e3b has joined #ponylang
tm-exa has quit [Quit: Computer has gone to sleep]
lispmeister has joined #ponylang
_lispmeister_ has joined #ponylang
aturley has joined #ponylang
lispmeister has quit [Ping timeout: 240 seconds]
rurban1 has joined #ponylang
aturley has quit [Ping timeout: 260 seconds]
rurban has quit [Ping timeout: 258 seconds]
rurban1 has left #ponylang [#ponylang]
TwoNotes has joined #ponylang
TwoNotes has left #ponylang [#ponylang]
<shepheb>
I observe in passing that this channel is often quiet on weekends, but busy on weekdays - but most of us aren't using Pony for our day jobs >_>
<srm`>
:)
rurban has joined #ponylang
rurban has left #ponylang [#ponylang]
srenatus has joined #ponylang
aturley has joined #ponylang
aturley has quit [Ping timeout: 244 seconds]
rurban1 has joined #ponylang
tm-exa has joined #ponylang
hibnico has quit [Quit: hibnico]
hibnico has joined #ponylang
tm-exa has quit [Quit: Computer has gone to sleep]
TwoNotes has joined #ponylang
aturley has joined #ponylang
aturley has quit [Ping timeout: 264 seconds]
_lispmeister_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lispmeister has joined #ponylang
Praetonus has quit [Quit: Leaving]
copy` has joined #ponylang
SilverKey has joined #ponylang
SilverKey has quit [Quit: Halted.]
rurban1 has quit [Quit: Leaving.]
lispmeister has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SilverKey has joined #ponylang
jemc has joined #ponylang
SilverKey has quit [Client Quit]
SilverKey has joined #ponylang
aturley has joined #ponylang
aturley has quit [Ping timeout: 244 seconds]
tm-exa has joined #ponylang
unbalancedparen has joined #ponylang
SirWillem has joined #ponylang
graaff has joined #ponylang
jemc has quit [Ping timeout: 258 seconds]
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ponylang
rurban has joined #ponylang
TwoNotes has quit [Quit: Leaving.]
tm-exa has quit [Quit: Computer has gone to sleep]
SirWillem has quit [Ping timeout: 276 seconds]
<shepheb>
I'm getting really frustrated with overzealous can't-use-consumed-local errors
<shepheb>
there are lots of cases, mostly around error-checking and match branches, that it seems unhappy with.
<shepheb>
in particular, it seems I can't do try ... else f(consume x); return end
<shepheb>
without errors about the consumed x farther down
<shepheb>
I thought that used to work, but I'm not sure.
<shepheb>
it's provably impossible to get to the later use of the consumed literal, because of the return.
tm-exa has joined #ponylang
aturley has joined #ponylang
aturley has quit [Ping timeout: 260 seconds]
jemc has joined #ponylang
<shepheb>
jemc: today's gripe is that try ... else f(consume foo); return end ... g(consume foo) fails
<shepheb>
shouldn't the return prove that the use of the consumed literal can't be reached?
rurban has left #ponylang [#ponylang]
hibnico has quit [Quit: hibnico]
<shepheb>
I want to check a series of error cases, send a 400 if I hit them, and then finally the main case.
<shepheb>
rather than a Pyramid of Doom nesting into matches several layers deep
jemc has quit [Ping timeout: 244 seconds]
rurban1 has joined #ponylang
rurban1 has quit [Ping timeout: 272 seconds]
rurban has joined #ponylang
rurban has left #ponylang [#ponylang]
rurban1 has joined #ponylang
rurban1 has left #ponylang [#ponylang]
gsteed has joined #ponylang
SilverKey has quit [Quit: Halted.]
aturley has joined #ponylang
aturley has quit [Ping timeout: 258 seconds]
SilverKey has joined #ponylang
SilverKey has quit [Quit: Halted.]
jemc has joined #ponylang
Matthias247 has joined #ponylang
SilverKey has joined #ponylang
SilverKey has quit [Client Quit]
<jemc>
shepheb: so, yes, the compiler is not as smart as it could be about consume-tracking in some branched logic patterns
<jemc>
regarding avoiding nested try blocks, I've sometimes mused that an `elsetry` keyword (with semantics analogous to `elseif`) would be helpful in places like that
<shepheb>
I've managed to work around it, but it would be much nicer code if I could do that.
<shepheb>
ah, to avoid nesting. interesting.
<shepheb>
I kind of want an error monad: here's a sequence of operations that can fail, and their error messages.
<shepheb>
if they all succeed, I have these real, non-None values to work with.
<shepheb>
if they do fail, I short-circuit with the right error message
<shepheb>
in the end that's exactly what I wrote: call a helper function that returns (RealResult | String) :(
unbalancedparen has quit [Quit: WeeChat 1.5]
Applejack_ has joined #ponylang
<Applejack_>
Hi, two questions about FFI : I can't figure out how can I pass a Pony Array[F64] to a C array (double *) and what Pony type do I use for an enum return type ?
jemc has quit [Ping timeout: 276 seconds]
graaff has quit [Quit: Leaving]
<shepheb>
Applejack_: use the cstring() method on arrays to get the underlying pointer
<shepheb>
not sure about enum returns.
<shepheb>
aren't enums an int under the hood?
<shepheb>
however the C compiler represents enums, that's what you should use
jemc has joined #ponylang
<Applejack_>
shepheb: ok, will try
<Applejack_>
shepheb: Ok, it works nicely. I used I64, is that safe?
<Applejack_>
I mean for the enum
tm-exa has quit [Quit: Computer has gone to sleep]
<jemc>
Applejack_: on most (all?) platforms, `int` is an `I32`
aturley has joined #ponylang
aturley has quit [Ping timeout: 252 seconds]
tm-exa has joined #ponylang
tm-exa has quit [Client Quit]
<srm`>
why i should clone a string to get an iso ? let bouh: String iso = "Bouh".clone()
<srm`>
why i can't do : recover "Bouh" end ?
<malthe>
jemc: where would a test for shepheb's "try ... else f(consume foo); return end ... g(consume foo)" go?
<malthe>
i'm looking at test/libponyc/*.cc
<jemc>
malthe: I don't think we have an appropriate test file yet - I'd suggest copying the `recover.cc` test file as `consume.cc` and start adding some tests for consume tracking
rurban has joined #ponylang
<malthe>
k
rurban has left #ponylang [#ponylang]
srenatus has quit [Quit: Connection closed for inactivity]
aturley has joined #ponylang
aturley has quit [Ping timeout: 260 seconds]
unbalancedparen has joined #ponylang
jemc has quit [Quit: WeeChat 1.4]
jemc has joined #ponylang
jemc has quit [Quit: WeeChat 1.4]
jemc has joined #ponylang
<malthe>
this ipv4 vs ipv6 business is really cluttering the network interfaces
status402 has joined #ponylang
Applejack_ has quit [Ping timeout: 250 seconds]
gsteed has quit [Quit: Leaving]
<doublec>
srm`: because "Bouh" is a val type and you can't convert val to iso
<doublec>
srm`: the compiler probably does magic so two "Bouh" usages use the same string
SirWillem has joined #ponylang
status402 has quit [Quit: Leaving]
aturley has joined #ponylang
<SirWillem>
Does anyone know of any projects to design a GUI?
<jemc>
SirWillem: I don't know of any GUI projects in Pony yet
<jemc>
closest I can think of is that shepheb was working on a NES emulator at one point ;)
aturley has quit [Ping timeout: 240 seconds]
<SirWillem>
Cool I'll have a loot at his github.
SilverKey has joined #ponylang
Matthias247 has quit [Read error: Connection reset by peer]