trapped has quit [Read error: Connection reset by peer]
trapped has joined #ponylang
aturley has joined #ponylang
aturley has quit [Ping timeout: 244 seconds]
aturley has joined #ponylang
aturley has quit [Ping timeout: 276 seconds]
copy` has joined #ponylang
juanjoc has joined #ponylang
<shepheb>
anyway, I eventually fixed my file writing problems
<shepheb>
which was that OpenFile and the .open constructor both open read-only.
<shepheb>
which was a surprised.
<shepheb>
I have cause to open a file that should already exist, for reading and writing. that isn't possible with the current code I think
<shepheb>
the closest I can get is checking if it already exists before doing CreateFile or File.create
<shepheb>
those at least will open it for writing as well, and won't truncate.
<sylvanc>
yup, looks like that's a typo
<sylvanc>
and your use case seems totally reasonable
<sylvanc>
are you up for a PR to fix the typo and add the functionality you want?
aturley has joined #ponylang
aturley has quit [Ping timeout: 250 seconds]
aturley has joined #ponylang
mcguire has joined #ponylang
aturley has quit [Ping timeout: 246 seconds]
jemc has joined #ponylang
juanjoc has quit [Quit: Leaving]
mcguire has quit [Quit: Leaving.]
aturley has joined #ponylang
mcguire has joined #ponylang
<shepheb>
sylvanc: probably. is the intended behavior that OpenFile and File.open should be writable is the FileWrite cap is set?
mcguire has quit [Client Quit]
mcguire has joined #ponylang
<shepheb>
if*
mcguire has quit [Ping timeout: 250 seconds]
jemc has quit [Quit: WeeChat 1.4]
jemc has joined #ponylang
SilverKey has joined #ponylang
jemc has quit [Ping timeout: 276 seconds]
jemc has joined #ponylang
aturley has quit [Ping timeout: 268 seconds]
amclain has joined #ponylang
aturley has joined #ponylang
aturley has quit [Ping timeout: 260 seconds]
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ponylang
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ponylang
SilverKey has quit [Quit: Halted.]
aturley has joined #ponylang
aturley has quit [Ping timeout: 244 seconds]
_andre has quit [Ping timeout: 244 seconds]
_andre has joined #ponylang
juanjoc has joined #ponylang
SilverKey has joined #ponylang
SilverKey has quit [Quit: Halted.]
aturley has joined #ponylang
aturley has quit [Ping timeout: 268 seconds]
trapped has quit [Read error: Connection reset by peer]
SilverKey has joined #ponylang
aturley has joined #ponylang
prettyvanilla has quit [Ping timeout: 250 seconds]
prettyvanilla has joined #ponylang
juanjoc has quit [Ping timeout: 246 seconds]
<SeanTAllen>
jemc: pony-stable question. are you open to a PR that allows you to adjust the PONYPATH addition to be a subfolder of the cloned GH repo? so for example, if the source is in repo/src that it looks there? if yes, do you have a preference for a key?
TwoNotes has joined #ponylang
<TwoNotes>
Trying to pass address of a struct to a FFI to fill in but getting segfault. (localtime_r). WHat is the right way to do this?
<jemc>
SeanTAllen: yes, sounds appropriate - looking at the code again, it looks like the best bet would be to change the `BundleDep` interface to have a `root_path` method and a `packages_path` method, instead of just a `path` method.
<jemc>
then `Bundle` could use the appropriate method based on what it's doing
_andre has quit [Quit: leaving]
<jemc>
regarding the key to use in `bundle.json`, not sure... maybe `subdir`?
<jemc>
so a dep would look like `{ "type": "github", "repo": "SeanTAllen/pony-whatever", subdir: "my-src" }`
<jemc>
and the `BundleDepGitHub` would know how to use the `subdir` key (or lack thereof) to produce the correct `root_path` and `packages_path`
<jemc>
since I want to replace `stable` with a proper package manager anyway, I'm open to whatever PR you want to file if it helps you get work done, keeps the codebase relatively sane, and doesn't break existing behavior
<SeanTAllen>
sounds good. stable works for a nice stop-gap for us for right now. PR tonight or tomorrow
<jemc>
TwoNotes: with the way Pony's FFI works, passing a struct as the argument is like passing the address of it from C's perspective
<jemc>
correct - you would drop the addressof unless your C function declaration is a double-star
<jemc>
like if you had a `let m: MyStruct = MyStruct`, and the C function took a `my_struct_t**`
<jemc>
err
<jemc>
`var`, not `let`
<jemc>
then you could pass the `addressof m` to the C function, and it could potentially make your `var` point to some other instance of `my_struct_t` that was allocated in some other way
<TwoNotes>
So scalars need addresof, but structs do not
<jemc>
right
<TwoNotes>
Does a Pony class behave like a struct when passing to an FFI?
<jemc>
yes, but you can't expect C to know the right layout though, as that is Pony-implementation-specific
<TwoNotes>
ok
<jemc>
so it's sometimes a good choice for `void*` arguments where C doesn't try to access the fields of the object
SilverKey has quit [Quit: Halted.]
srenatus has quit [Quit: Connection closed for inactivity]
Matthias247 has joined #ponylang
aturley has quit [Ping timeout: 246 seconds]
trapped has joined #ponylang
aturley has joined #ponylang
aturley has quit [Ping timeout: 240 seconds]
jemc has quit [Ping timeout: 244 seconds]
<SeanTAllen>
jemc: PR issued
juanjoc has joined #ponylang
TwoNotes has quit [Quit: Leaving.]
juanjoc has quit [Ping timeout: 276 seconds]
SilverKey has joined #ponylang
aturley has joined #ponylang
aturley has quit [Ping timeout: 244 seconds]
trapped has quit [Read error: Connection reset by peer]
SilverKey has quit [Quit: Halted.]
Matthias247 has quit [Read error: Connection reset by peer]