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
aturley has joined #ponylang
droman has quit [Quit: WeeChat 2.1]
pzel has joined #ponylang
PrsPrsBK has joined #ponylang
pzel has quit [Ping timeout: 240 seconds]
pzel has joined #ponylang
Shorttail has joined #ponylang
<Shorttail> I'm trying to link to sqlite3.dll on Windows. Is there a special import syntax for that? The linker fails when it can't find sqlite3.lib, which is not the name of the file
<Shorttail> I'm linking it using `use "sqlite3"` and also tried using `use "sqlite3.dll`, but the latter just tries to link to qulite3.dll.lib
<SeanTAllen> Shorttail: im not sure on windows. i have zero windows experience. i'll drop a note to gordon to see if he can answer your question. an email on the mailing list i can point him at would be good.
<Shorttail> Let me join it, one moment
<Shorttail> SeanTAllen: should I just post on the mailing list myself?
<SeanTAllen> ya. please do.
<SeanTAllen> and i'll send gordon a link to make sure he knows that i think he is the best person to answer.
<SeanTAllen> thanks.
<Shorttail> Thank you
<Shorttail> SeanTAllen: I'm new to mailing lists, so just to be sure, the email goes to user@pony.groups.io, right?
<SeanTAllen> yup
<SeanTAllen> or you can use the web ui
<SeanTAllen> Shorttail: i sent gordon an email calling out that specific email
<Shorttail> Thank you
<Shorttail> It's always fun being the Windows test dummy on young languages
<SeanTAllen> im sure its straightforward
<SeanTAllen> i just dont know windows at all
<SeanTAllen> i am the least helpful of all people when it comes to windows
pzel has quit [Ping timeout: 248 seconds]
<SeanTAllen> ive used some variation of unix or beos for the last 25 years
<SeanTAllen> except for a computer that i had custom built with windows that only ever ran cubase and a couple other music apps like waveform
<Shorttail> I'm developing on windows and deploying on linux for twice the fun
endformationage has quit [Quit: WeeChat 1.9.1]
<doublec> Shorttail: to link dll's on windows you need a corresponding .lib file for the dll
<doublec> Shorttail: usually you get it as a result of building the dll
<doublec> Shorttail: you might be able to do this https://adrianhenke.wordpress.com/2008/12/05/create-lib-file-from-dll/
_whitelogger has joined #ponylang
aturley has quit [Ping timeout: 248 seconds]
jaro has joined #ponylang
Shorttail has quit [Ping timeout: 260 seconds]
_whitelogger has joined #ponylang
_rck has joined #ponylang
<_rck> looking at the current hashmap implementation, I'm wondering at the different use cases for HashMap.insert vs HashMap.update
<_rck> update inserts a key and a value, and retuns the old value or None
<_rck> insert returns the new value, or errors, but I'm not sure what might trigger the error in that case
<_rck> SeanTAllen: I remember you mentioning that the comment here https://github.com/ponylang/ponyc/blob/eb5efd383ddde2e7425267fe44ed51013aaa2f4b/packages/collections/map.pony#L148 was misleading, was that right?
dipin has joined #ponylang
<dipin> Pony-stable 0.1.3 has been released. This release can be skipped as it has no user facing changes. Release notes: https://www.ponylang.org/blog/2018/06/pony-stable-0.1.3-released/
dipin has quit [Client Quit]
_rck has quit [Ping timeout: 265 seconds]
zetashift has joined #ponylang
_rck has joined #ponylang
<SeanTAllen> _rck: yes it is misleading
<SeanTAllen> Right now, you can't trigger the error
<SeanTAllen> But it's possible you might somehow based on a change of logic
<SeanTAllen> That comment could be clearer
<SeanTAllen> But it's subtle
<SeanTAllen> For right now, you can say that comment is correct
<_rck> I see, thanks
<_rck> I guess it's similar to how you always get an error from Array.apply even if you know the index is within bounds
<_rck> you always have to deal with the error, I meant
<SeanTAllen> Right
<SeanTAllen> Can't prove it will succeed
<SeanTAllen> And
<SeanTAllen> Some changes could be introduced that causes a different error
<SeanTAllen> Like a bug in search
<_rck> yeah, thanks for the explanation
<_rck> btw, I think I found another bug in the compiler: https://playground.ponylang.org/?gist=2aacfccd109db912ff4c77ec734b43ae
<_rck> running that results in
<_rck> Stack dump:
<_rck> 0. Running pass 'Simplify the CFG' on function '@Main_tag__test_oo'
<SeanTAllen> _rck: can you open an issue for that?
<_rck> yes, I was trying to find a smaller example
<SeanTAllen> if you could provide a backtrace when running a debug version of compiler as well, that would be helpful
<_rck> how do I get a debug version, by building from source with make config=build ?
<SeanTAllen> make install config=debug
<SeanTAllen> and im pretty sure i know the commit your error was introduced in
<SeanTAllen> so im going to ask you to try building at two different commits
<_rck> sure, feel free to send them my way
<SeanTAllen> can you try compiling your example with the compiler as of these two commits: edfbf3eac84db1a3011966466867eaf89d896e36 and 9222f08c97f0079f0d5d7f732d246c09969daa4d
<SeanTAllen> i believe the first one should compile and the second should crash
<SeanTAllen> if yes,
<SeanTAllen> when you open your issue
<SeanTAllen> note that the problem was introduced by 9222f08c97f0079f0d5d7f732d246c09969daa4d
<SeanTAllen> and has the same underlying cause as https://github.com/ponylang/ponyc/issues/2735
<SeanTAllen> or rather probably does, given that they were introduced at the same time
<_rck> cool, let me test that and I'll get back to you
<SeanTAllen> while different, your issue and that one look very similiar
<SeanTAllen> actuall _rck
<SeanTAllen> you dont have to test
<SeanTAllen> i was already set up to test
<SeanTAllen> the issue was introduced with that commit
<_rck> oh, ok
<SeanTAllen> its the same bug
<SeanTAllen> no need to open
<SeanTAllen> what's your github username?
<_rck> ergl
<_rck> thanks for testing it yourself!
<_rck> for reference, this is a smaller sample
<_rck> changing the return value of test to U8 fails to compile with
<_rck> the left side is undefined but its value is used
<_rck> (let f, let s) = a
<SeanTAllen> i have a simpler version in the referenced ticket
<_rck> just saw it
<_rck> I guess the compiler is optimizing away the inner block?
<SeanTAllen> its related to the tuple generation and it getting optimized away, yes
_rck has quit [Ping timeout: 260 seconds]
spazzpp2 has joined #ponylang
_rck has joined #ponylang
user10032 has joined #ponylang
endformationage has joined #ponylang
<_rck> I'm hitting another compiler error, but I'm not sure how to generate an example out of it
<_rck> it's hitting a segmentation fault just after the "Functions" section of the compiling phase
<_rck> how do I get a stacktrace using a debug version of the compiler?
<SeanTAllen> you'd use lldn
<SeanTAllen> sorry
<SeanTAllen> lldb
<SeanTAllen> so
<SeanTAllen> lldb -- ponyc
<SeanTAllen> will start ponyc under lldb
<SeanTAllen> then you can type `run`
<SeanTAllen> it will hit the problem
<SeanTAllen> and you can do
<SeanTAllen> `bt`
<SeanTAllen> to get the backtrace
acarrico has joined #ponylang
pzel has joined #ponylang
<_rck> thanks, working on getting that set up
<_rck> was working on docker and lldb wasn't working correctly
pzel has quit [Ping timeout: 256 seconds]
<_rck> I will try to find exactly what is triggering this
<SeanTAllen> If you can get a minimal example, that along with the backtrack will go a long way. Perfect issue at that point.
Shorttail has joined #ponylang
<_rck> yeah, for now I can't manage to replicate a minimal example, but I spotted something that causes it to trigger
<_rck> you have a variant type where two members are aliases for the same type
<_rck> on my code, if you change one of the type aliases to a class, it compiles without issues
acarrico has quit [Ping timeout: 256 seconds]
<SeanTAllen> nice
<SeanTAllen> thats a pretty good minimal example _rck. certainly enough to open an issue.
dynamics has joined #ponylang
<SeanTAllen> if you want to keep looking, try going back through pony version to see if its been a problem for a long time or was recently introduced.
<SeanTAllen> see if you can hone in on a commit that introduced it.
<_rck> ok, I'll open an issue with what I have now
<SeanTAllen> you know...
<SeanTAllen> this might be the same bug
<SeanTAllen> yeah
<SeanTAllen> if T isnt a tuple, no problem
<SeanTAllen> let me see if its the same bug
<_rck> hmm, but T is not a tuple in this case
<SeanTAllen> not the same bug!
<SeanTAllen> ok this worked in 0.21.3
<_rck> ok, I opened an issue here https://github.com/ponylang/ponyc/issues/2736
<SeanTAllen> i have it narrowed down to about 20 commits
<_rck> ah, nice
<SeanTAllen> 10
endformationage has quit [Ping timeout: 260 seconds]
<SeanTAllen> found it
<_rck> \o/
pzel has joined #ponylang
_rck has quit [Quit: WeeChat 2.1]
spazzpp2 has quit [Quit: Konversation terminated!]
spazzpp2 has joined #ponylang
pzel has quit [Ping timeout: 265 seconds]
zetashift has quit [Ping timeout: 245 seconds]
vaninwagen has joined #ponylang
endformationage has joined #ponylang
acarrico has joined #ponylang
acarrico has quit [Ping timeout: 265 seconds]
zetashift has joined #ponylang
jemc has joined #ponylang
dynamics has quit [Ping timeout: 260 seconds]
<Shorttail> Is there an easy way in pony to for print in the same thread instead of sending it to another actor? Or a way to waste a bit of time? I'm messing with some FFI and when it crashes I don't get messages printed prior to the crash
<vaninwagen> Shorttail: how are you printing?
<Shorttail> env.out.print and debug()
<vaninwagen> btw A New *Last Week in Pony* is out: https://www.ponylang.org/blog/2018/06/last-week-in-pony---june-3-2018/
<vaninwagen> you could use some nasty ffi call like @printf[None]("%s%n".cstring(), my_string.cstring()) Shorttail
<Shorttail> I'll give it a try
<vaninwagen> btw this is also kinda what the code in the debug package does: https://stdlib.ponylang.org/src/debug/debug/#L61
<vaninwagen> No actor involved here
<vaninwagen> but you need to compile your program with --debug
<Shorttail> thanks a lot
<vaninwagen> :)
<Shorttail> It's still swallowing the prints
<vaninwagen> hmmm... everything cleaned correctly? No old binary laying around? that bites me from time to time. If not, i am afraid you need to share some example code with me
<Shorttail> I'll make a smaller example
<jemc> (just make sure you're running `ponyc` with `--debug` to produce that bianry)
<jemc> (otherwise `Debug("my string")` will do nothing)
acarrico has joined #ponylang
<Shorttail> It's using the sqlite3 library, you could probably switch with something else that crashes
<vaninwagen> Shorttail: i tried your example on my machine and it successfully prints 1
<Shorttail> Not on windows, by any chance?
<vaninwagen> Shorttail: nah, ubuntu linux
<Shorttail> Do you have a good stubstitute ffi that crashes so I can report the bug?
<vaninwagen> no, not at hand. What kind of crash is it? I think it is fine to report and describe it this as you experienced
<Shorttail> It's just that it requires sqlite3.lib to link and it's a few extra steps
<Shorttail> It crashes as in the program terminates with no error message
<vaninwagen> no windows-specific way to determine what happened?
<vaninwagen> do you maybe have a debugger? maybe even lldb?
<Shorttail> I've written a lot of crashing software in D, whenever I did anything wrong there I'd get visual studio pestering me to start the debugger. This is just a silent exit
<vaninwagen> Shorttail: on linux there is the exit(int status) function. Is there soemthing related in windows?
<vaninwagen> if you call this one instead of sqlite, will it also swallow everything?
<Shorttail> I think I got part of the problem. sqlite3.dll wasn't present in the folder. When running it in powershell there is no error. When running it in cmd an error window opens saying the dll is missing. Adding the dll makes the printout work
<vaninwagen> booyah!
<vaninwagen> good old cmd
<Shorttail> I don't like powershell hiding the error and letting it crash
<vaninwagen> old, clunky, helpful
vaninwagen has quit [Quit: WeeChat 2.1]
spazzpp2 has quit [Quit: Leaving]
user10032 has quit [Quit: Leaving]
SenasOzys has joined #ponylang
jemc has quit [Read error: Connection reset by peer]
zetashift has quit [Ping timeout: 256 seconds]
pzel has joined #ponylang
zetashift has joined #ponylang
zetashift has quit [Ping timeout: 245 seconds]