_whitelogger has joined #ponylang
jcomellas has joined #ponylang
whitequark has left #ponylang [#ponylang]
<TwoNotes> SeanTAllen most of what I have on github is all the database interfaces. But I have lots more complex stuff in the works.
juanjoc has quit [Ping timeout: 248 seconds]
juanjoc has joined #ponylang
<TwoNotes> Current project is a thing that suggests what movie to watch tonight. It uses speech recognition, and synthesis, and a DB interface to my movie collection
jemc has quit [Quit: WeeChat 1.4]
jcomellas has quit [Ping timeout: 276 seconds]
jcomellas has joined #ponylang
<TwoNotes> "Random" is just a trait. So how do I use it to get a random number?
<SeanTAllen> There's mt and dice in the package
juanjoc has quit [Ping timeout: 246 seconds]
<dos000> how do i tell ponyc to look for a lib in a special dir ?
juanjoc has joined #ponylang
<TwoNotes> -p
<dos000> its complaining about ld: cannot find -lpcre2-8
<dos000> TwoNotes: i tried thats for packages
jcomellas has quit [Ping timeout: 260 seconds]
<dos000> i already compiled pcre it just cant find it
<SeanTAllen> it uses your normal linker path. it should work if ld can find it.
<TwoNotes> -p is also for object libraries, as specified in a use "lib:foo" declaration
<dos000> is it looking for a shared object or a static link ?
<TwoNotes> Either a .a or a .so
<TwoNotes> I know it look in /usr/lib but *not* in /usr/local/lib by default
<TwoNotes> And the filename must begin with the letters "lib"
jcomellas has joined #ponylang
<dos000> great !!!!
<TwoNotes> So if you compiled pcre into a private diorectory, you need to point the -p option at its directory
<dos000> TwoNotes: yessss .. works now )
Matthias247 has joined #ponylang
juanjoc has quit [Ping timeout: 240 seconds]
<dos000> is rpath a good idea to support here ?
jemc has joined #ponylang
<dos000> embedding the path that was passed in the executable
aturley has quit [Read error: Connection reset by peer]
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
<jemc> Thanks to whitequark and his _whitelogger, we now have public IRC logs, as discussed yesterday
<SeanTAllen> sweet
<SeanTAllen> thanks whitequark
<jemc> note that freenode guidelines suggest that public logging be declared in the channel topic so that participants are aware
c355e3b has quit [Quit: Connection closed for inactivity]
<dos000> if i wanted to do ipc between thwo threads one running a pony program and the other either c/c++/java what do you do ?
<dos000> i know from the java/c part ...
<dos000> just not sure about the pony part
<dos000> i aussume in pony i dont have access to a shared memory ?
<dos000> i mean at the langage runtime level
<TwoNotes> Yes you do, but readonly
<TwoNotes> Or do you mean like a shared memory segment between processes?
<dos000> it can be between process or threads ...
<dos000> right now i am using some lock free queues between java and c++
<TwoNotes> You can share memory between Pony Actors as long as the references are cap "val"
<TwoNotes> Pony has no locks. It does have messages queues
<dos000> TwoNotes: the question is how do i make it visible from c .. for read and write
<TwoNotes> Look up the "FFI" section in the tutorial. It is about how you call C code
<TwoNotes> It is down at the bottom
<dos000> so all the mpsc queues are not exposed .. i hope the runtime allows linking with those queues ??
<dos000> meaning i can use that code as is
<dos000> behind or in front of the ffi
<TwoNotes> Pony can link with anything that has a C API.
<dos000> or use my own lockfree queues
<dos000> great !
<TwoNotes> I have written interfaces to three different database packages this way.
<dos000> ah !
<TwoNotes> Pony is trying to save you from yourself at times, so you have to write things very carefully regarding Pointers
<dos000> indeed
<dos000> it does not deal with io i imagine yet ? like tcp/udp ?
<TwoNotes> use "net". Its all there
<TwoNotes> See ponyc/packages/net/
<TwoNotes> I have done TCP comm stuff, and am working on some UDP now
<dos000> wow !
<TwoNotes> Nothing fancy; the interface to the speech recognizer I use is over a TCP link
<dos000> so i imagine underneath you are using epoll ?
<TwoNotes> I have no idea what happens underneath. Everything at the Pony level is asynchronous
<TwoNotes> Pony NEVER blocks
<dos000> no i mean the runtime is using epoll on linux ?
<TwoNotes> Dunno.
<dos000> ah!
<dos000> i would be surprised if it does not
<TwoNotes> The Pony part is in ponyc/packages/net, but there is a layer of C code below that in ponyrt, the runtime
<dos000> got it it is ponyrt/asio
<dos000> darn ...
<dos000> i could just use this runtime as is )))
<dos000> i was chikening from touching any of the epoll code
<dos000> my only concern so far is debugging
<TwoNotes> I just use gdb
<dos000> i am spoiled from java
<TwoNotes> To use Pony properly you need to unlearn some Java. :)
<dos000> lool
<dos000> i was actually working on a dsl that vaguely looked similar in terms of idea
<dos000> once you do the actor thingy you dont go back
<TwoNotes> Erlang is a good pathway into Pony
<TwoNotes> The Java garbage collector can kill big server systems. Erlang and Pony both solved that
<dos000> I did memory management in java just to get away from that
<TwoNotes> When people complained their systems would keep stalling doing garbage collection, Oracle's answer was "install more memory". Really
<dos000> heh
<dos000> someone said java is the worst language but with the best tools .. i agree whole heartedly
jcomellas has quit [Ping timeout: 252 seconds]
<dos000> tools make a big difference
<TwoNotes> Having used both, I preferred Microsoft's Visual C# over Oracle JDeveloper. Both beat Eclipse.
<dos000> eclipse is way behind nowadays ..
<dos000> intellij is cool !
<dos000> whats the killer app for pony ?
<dos000> low latency trading ?
<dos000> AAA games ?
<TwoNotes> The trading stuff does not have the public visibility to make it a real 'killer'
<dos000> ah!
<dos000> baremetal microservices then ?
<dos000> replacing the go of the world
<TwoNotes> One of the reasons that the WhatsApp developers were able to handle such huge loads at scale, with not many development engineers, is that they wrote it in Erlang.
<TwoNotes> Pony beats Erlang all over the place when it comes to CPU load, which translates into power savings
<dos000> yeah heard that .. altho from the presentation on pony the presenter said erlang runtime is riddled with locks ???
<TwoNotes> Yes, Erlang runtimes has locks under the covers. You need locks to do the message queues.
<dos000> so i am just imagining what this thing can do
<TwoNotes> At the scale of the big web service providers, power consumption and cooling in the data centers is a really big issue
<TwoNotes> When distributed Pony arrives (this summer I think) look for lots of interesting things to happen
<dos000> hmmm
<TwoNotes> Imagine rewriting Riak in Pony...
<dos000> exactly what i was thinkin !
c355e3b has joined #ponylang
<dos000> now whats stopping pony from running on bare metal ?
<TwoNotes> ponyrt makes assumptions about memory management and file I/O you would have to replicate
<dos000> ah!
<TwoNotes> Eaiser to let Linux take care of that stuff. Linux is pretty low overhead
<dos000> what about converting pony to cuda ?
<TwoNotes> CUDA is for single-instruction-multiple-data problems
<dos000> its not too far from what you have in pony
<dos000> once you map an actor to a cuda thead ..
DanC_ has quit [Ping timeout: 252 seconds]
<SeanTAllen> dos000 is uses epoll on linux
<dos000> ah!
<dos000> cool!
<dos000> is there explicit support for avx in pony ? or its left to llvm to figure ?
<SeanTAllen> dos000 very little is stopping pony from running on bare metal
<dos000> very nice ... i like
DanC_ has joined #ponylang
<SeanTAllen> dos000 you can turn avx on/off. folks with older macbooks sometimes run into issues with the homebrew version of pony not working because of avx.
<dos000> this is why i never install from my distro packages !
<dos000> SeanTAllen: any plans to replace the for loops in pony to something like the parallel for from mpi ?
<dos000> or there is no need ?
<dos000> the runtime could do some magic under the covers
<jemc> dos000: what do you mean "the for loops"? can you give an example?
<dos000> if i do a for loop the runtime could split that into multiple parallel code .
<dos000> by visiting the code path it could tell that part of that loop can be split into multiple sub "actors"
<dos000> all running in parallel
<TwoNotes> There are some compilers that can do that sort of thing.
<dos000> say a simple case if i do a 3million loop on an array .
<dos000> openmpi , cilk , all support it
<dos000> but the developper has to say it explicitly
<TwoNotes> It is easier for indexed loops, where the loop variable is just an incrementing integer, and the outputs of one iteration are not used as inputs to the next.
srenatus has quit [Quit: Connection closed for inactivity]
<dos000> yes the call graph could tell you all of that
<SeanTAllen> dos000: im not aware of any such plans at this point in time.
<TwoNotes> I don't think the target market for Pony is heavy math computation
<dos000> so again who is the target audience ?
<SeanTAllen> biggest things on roadmap are distributed pony and improving documentation/user friendliness
<SeanTAllen> there hasn't been a formal conversation about target audience at this point in time dos000, only informal ones.
<dos000> i see pony easily replacing so many things !
<TwoNotes> Any app where there are a lot of asynchronous things going on
<dos000> hmmm ...
<SeanTAllen> highly concurrent programs being one...
<TwoNotes> Web servers, GUI apps, gaming
<SeanTAllen> programs where erlang would be a good fit where it not for performance considerations
<dos000> heavy computation falls into that
<TwoNotes> orizonatlly caled out databases, like Riak
<TwoNotes> Horizontally scaled out
<SeanTAllen> we had a community survey recently that has some info on how people would like to use it
<TwoNotes> I would think some classes of artificial intelligence apps would be a good fit
<dos000> my use case would be to write a normal java program and transpile it to pony
<dos000> but its an itch i have been scratching for a while
<dos000> after doing it so many times
<TwoNotes> Java has rather looser rules on reference passing. It may not be possible
<dos000> its an itch .. will see
<SeanTAllen> the semantics of java and pony are very different. i suspect you will find that to be exceedingly difficult.
<TwoNotes> After doing it for over 10 years, I promised myself when I retired that I would never write another line of Java...
<SeanTAllen> when people say transpile, the languages in question share semantics.
<SeanTAllen> i dont think you can write java that compiles to pony. not without a mass of annotations.
<jemc> in general, one of the big benefits of pony is that it forces you to write and organize your code differently, in a way that can be more easily made concurrent
<jemc> so transpiling existing programs from another language doesn't make as much sense
<TwoNotes> Exactly.
<TwoNotes> Erlang does the same thing to how you look at problems
<dos000> well ... if you can augment java with an actor based dsl .. it starts looking like pony to a certain degree
<TwoNotes> Scala?
<dos000> as is java does not map i agree
<dos000> TwoNotes: kotlin !
<dos000> i have been researching this for a while now
<SeanTAllen> none of those have deny capabilities so the semantics are fundamentally different
<dos000> what do you mean by deny capabilities ?
Scramblejams has quit [Read error: Connection reset by peer]
Scramblejams has joined #ponylang
<SeanTAllen> its the really big feature in pony that makes everything else go
DanC_ has quit [Ping timeout: 248 seconds]
<TwoNotes> "deny capabilities" are a big thing that Pony has and Java doesn't. It is key to the lockless execution. Tricky to learn, but worth it in the end.
<SeanTAllen> there's also the blog post about then dos000 : http://jtfmumm.com/blog/2016/03/06/safely-sharing-data-pony-reference-capabilities/
<SeanTAllen> most people it takes a while to wrap their head around so... if/when you get hung up on them, IRC and mailing list are available to help.
<SeanTAllen> better documentation for easing people in with deny capabilities and reference capabilities is at the top of the to do list.
<SeanTAllen> ah yes, as also, the morning paper has an excellent summary: http://blog.acolyer.org/2016/02/17/deny-capabilities/ <-- perhaps start there
<dos000> )))
<dos000> thanks a lot !
DanC_ has joined #ponylang
dos000 has quit [Ping timeout: 252 seconds]
DanC_ has quit [Ping timeout: 260 seconds]
TwoNotes has quit [Quit: Leaving.]
trapped has quit [Read error: Connection reset by peer]
Praetonus has quit [Quit: Leaving]
DanC_ has joined #ponylang
shepheb has quit [Ping timeout: 244 seconds]
shepheb has joined #ponylang