ustunozgur has quit [Remote host closed the connection]
dotfelix has joined #ocaml
zpe has joined #ocaml
nicoo has joined #ocaml
q66 has quit [Quit: Leaving]
zpe has quit [Ping timeout: 252 seconds]
dotfelix has quit [Quit: Leaving]
thomasga has joined #ocaml
shinnya has quit [Ping timeout: 264 seconds]
thomasga has quit [Ping timeout: 245 seconds]
philtor has quit [Ping timeout: 252 seconds]
thomasga has joined #ocaml
zpe has joined #ocaml
waneck has quit [Quit: Leaving]
thomasga has quit [Ping timeout: 255 seconds]
zpe has quit [Ping timeout: 245 seconds]
WraithM has quit [Ping timeout: 272 seconds]
xiaolin has quit [Quit: leaving]
xiaolin has joined #ocaml
xiaolin has quit [Client Quit]
xiaolin has joined #ocaml
thomasga has joined #ocaml
zpe has joined #ocaml
thomasga has quit [Ping timeout: 246 seconds]
zpe has quit [Ping timeout: 240 seconds]
ZenosDance has quit [Ping timeout: 272 seconds]
athan has joined #ocaml
thomasga has joined #ocaml
zpe has joined #ocaml
<athan>
Hey everyone, I'm a new functional programmer with some experience in haskell, but new to the ocaml world and had a few questions. Firstly, in the latest ICFP, there was a video involving systems programming with Ivory, but someone there mentioned OCaml as an ARM-platform based systems programming tool - is OCaml's GC _that_ incremental, that it could do near soft-realtime applications on minimal hardware?
<athan>
Also, should I expect to see Monads, Monoids, Functors, etc. in OCaml?
zpe has quit [Ping timeout: 245 seconds]
thomasga has quit [Ping timeout: 268 seconds]
bytbox has quit [Remote host closed the connection]
ontologiae has quit [Ping timeout: 252 seconds]
<whitequark>
there is nothing soft-RT about OCaml
<whitequark>
currently Mirage runs on Xen on ARM -- it's more about small servers than embedded devices
koderok has joined #ocaml
<athan>
whitequark: Ahhh, that makes me feel better haha. Thank you!
jao` has quit [Ping timeout: 252 seconds]
<whitequark>
there is OCAPIC
<whitequark>
but as far as I know: soft-RT, memory-efficient, functional -- choose two
<athan>
whitequark: Right on. I've been looking at Haskell's REPA for a little while
<athan>
whitequark: But I think that only gives you computation facility on the GPU - no scheduling
<whitequark>
uhh REPA has nothing with realtime?
<whitequark>
nothing to do*
<athan>
from my understanding, it's just for parallel computation
<athan>
but doesn't give you any facilities for operating within time - I'm wondering if a FRP wrapper around that might be good (like conal elliot's vector-based time FRP)
ZenosDance has joined #ocaml
oscar_toro has joined #ocaml
oscar_toro has left #ocaml [#ocaml]
Sizur has quit [Ping timeout: 245 seconds]
siddharthv_away is now known as siddharthv
Sizur has joined #ocaml
WraithM has joined #ocaml
thomasga has joined #ocaml
zpe has joined #ocaml
samrat has joined #ocaml
philtom has quit [Ping timeout: 255 seconds]
samrat has quit [Client Quit]
zpe has quit [Ping timeout: 255 seconds]
thomasga has quit [Ping timeout: 264 seconds]
mcclurmc has quit [Remote host closed the connection]
dsheets has quit [Ping timeout: 268 seconds]
WraithM has quit [Ping timeout: 272 seconds]
thomasga has joined #ocaml
<adrien>
ocaml works for soft-rt
<adrien>
but you need to take care of what you do
<adrien>
but that's valid for any language
athan has quit [Ping timeout: 246 seconds]
<mrvn>
you have cooperative multithreading. Thread switches and signals only happen when the GC gets invoked.
<mrvn>
pretty much kills RT
ygrek has joined #ocaml
<orbitz>
i guess it depens on what soft-rt means for you
<mrvn>
orbitz: it means that there is an upper limit till something happens. 'while true do () done' will block forever.
<orbitz>
yeah, but people think real-time means that their twitter feed updates more than once a day as well
<mrvn>
real-time means at least once a day
<orbitz>
Somebody needs to implement BEAM as a backend for Ocaml
<mrvn>
There are some functional languages where the compiler detects loops that don't invoke the GC and insert "needless" GC calls. With that you can do soft-rt.
<orbitz>
Yeah, the BEAM already has all sorts of that stuff built in
<orbitz>
I wonder how hard taht would be to do a bytecode translation
<orbitz>
if you provided a fake process API that got turned into direct Erlang calls for communication
<mrvn>
shouldn't be too hard to add to ocamls compiler
samrat has joined #ocaml
MercurialAlchemi has joined #ocaml
WraithM has joined #ocaml
wwilly has joined #ocaml
<whitequark>
mrvn: no, that's not enough
<whitequark>
you could just have a very long non-allocating computation that starves other threads
<whitequark>
in BEAM you basically have fueled execution / timeslots
<whitequark>
hmmmm
<whitequark>
I kind of like this "BEAM as OCaml backend" thing
<adrien>
you'd limit thread switches for rt anyway
<whitequark>
adrien: limit?
zpe has joined #ocaml
<adrien>
signals, hmm, true but there are many other inputs
<adrien>
whitequark: you'd try to avoid them
<whitequark>
not necessarily
<adrien>
not necessarily avoid them at all but definitely have as few of them as possible
<whitequark>
I mean, that has nothing to do with RT itself.
<adrien>
if you define soft-rt as an answer in <10ms on atom-like, ocaml isn't an issue and even <1ms it's fine
<whitequark>
avoiding needless context switches is a good idea in general :)
<mrvn>
adrien: for RT you need to preempt threads.
<adrien>
other's* threads :P
<whitequark>
adrien: (any) rt is predictable response time
<whitequark>
could be 10ms, could be 10s
WraithM has quit [Ping timeout: 255 seconds]
<adrien>
whitequark: yeah but here you need to avoid them all of the time :P
<adrien>
or at least when you have to answer
rgrinberg has quit [Quit: Leaving.]
<mrvn>
adrien: ocaml blocks forever unless you call the GC. You never get <10ms responce time.
<mrvn>
at least for threaded apps
<adrien>
ah, if you're in that other thread for these whole 10s, yeah
<adrien>
but if you're already unable to process in the given timeframe you won't be able to process a new event anyway
<mrvn>
and for single threaded you have to code verry carefull so that nothing takes too long before you get back to your event loop.
ontologiae has joined #ocaml
<mrvn>
anyway, most people that think RT are perfectly happy with preemptive multitasking.
<mrvn>
(and ocaml isn't that :( )
<adrien>
"desktop real-time"
<whitequark>
that's mainly true for soft-RT. for hard-RT you often see stranger schemes
<mrvn>
whitequark: well, hart RT you need for rocket or nuclear reactors kind of world ending things. rare exceptions.
<whitequark>
no
<whitequark>
for example, you have a laser printer?
<whitequark>
or a phone with a baseband radio?
<mrvn>
or closed feedback loops
<mrvn>
whitequark: why would a laser printer need hard RT?
<whitequark>
synchronization to the polygon mirror
<whitequark>
(and paper feed too, but it's less of an issue)
<mrvn>
whitequark: closed feedback loop in the microprocessor that does nothing but drive the mirrors.
<whitequark>
you don't drive a mirror.
<whitequark>
the mirror is driven by a separate 3-phase motor driver IC that feeds you back a sync signal
<mrvn>
s/drive/monitors/
<whitequark>
and you gotta modulate the laser when the scan line starts
ontologiae has quit [Ping timeout: 255 seconds]
<whitequark>
well, it doesn't solve the issue, because if it's a separate chip, you need to get the data in somehow
<whitequark>
which implies multitasking. anyway, in real world you do have an RTOS in a printer
<mrvn>
whitequark: but you can fill the data buffer ahead of time and in large chunks with a wide time window.
<whitequark>
uhhh not really
<whitequark>
uncompressed pixel data at 1200x600dpi is a LOT of bits
<mrvn>
And if once in a blue moon the OS can't feed the data and you get slight printing errors that's bad but not world ending.
<whitequark>
as I've been saying, I don't know what you are talking about, but it's not the devices that actually exist
<whitequark>
what I'm saying is you almost certainly want hard-RT on anything that generates or synchronizes to precise waveforms
axiles has joined #ocaml
<mrvn>
and I'm saying that those are generaly done with a seperate micro controler so you get a bigger and softer timeframe for the OS and then soft RT will usualy do.
<whitequark>
the OS is not even in question here
<mrvn>
e.g. you could programm a laser printer in ocaml with a little care in the code.
ygrek has quit [Ping timeout: 255 seconds]
<whitequark>
what?
<whitequark>
I don't think you understand what you are talking about
ZenosDance has quit [Ping timeout: 272 seconds]
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
Simn has joined #ocaml
<whitequark>
to clarify, I'm not saying you need hard-RT on the host PC, I was talking about the laser printer firmware itself
hhugo has joined #ocaml
thomasga has quit [Quit: Leaving.]
MercurialAlchemi has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
demonimin has joined #ocaml
ggole has joined #ocaml
Hannibal_Smith has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
lbaan has quit [Quit: sleeping device]
zpe has quit [Ping timeout: 246 seconds]
WraithM has joined #ocaml
rfv has joined #ocaml
Mandus_ has quit [Ping timeout: 245 seconds]
AltGr has joined #ocaml
dsheets has joined #ocaml
WraithM has quit [Ping timeout: 264 seconds]
thomasga has joined #ocaml
thomasga has quit [Client Quit]
thomasga has joined #ocaml
WraithM has joined #ocaml
Mandus has joined #ocaml
tane has joined #ocaml
zpe has joined #ocaml
eikke__ has joined #ocaml
willy_ has joined #ocaml
wwilly has quit [Ping timeout: 268 seconds]
slash^ has joined #ocaml
rand000 has joined #ocaml
koderok has quit [Quit: koderok]
sagotch has joined #ocaml
dsheets has quit [Ping timeout: 245 seconds]
<companion_cube>
yolo/
thomasga has quit [Quit: Leaving.]
ontologiae has joined #ocaml
* adrien_oww
stares at companion_cube
* companion_cube
stares back into adrien_oww's eyes
* companion_cube
moves his eyebrows
* adrien_oww
tatoos "yolo" on companion_cube's forefront
ontologiae has quit [Ping timeout: 272 seconds]
WraithM has quit [Ping timeout: 276 seconds]
hrkso is now known as hexo
ontologiae has joined #ocaml
WraithM has joined #ocaml
koderok has joined #ocaml
avsm has joined #ocaml
Kakadu has joined #ocaml
WraithM has quit [Ping timeout: 246 seconds]
dsheets has joined #ocaml
thomasga has joined #ocaml
pyon is now known as pyon-temp
pyon has joined #ocaml
pyon-temp has quit [Quit: These skies and seas hold great possibilities for you. Stay alive. Pursue happiness. I expect much from your life.]
samrat has quit [Ping timeout: 245 seconds]
sgnb` is now known as sgnb
samrat has joined #ocaml
BitPuffin has joined #ocaml
thomasga has quit [Quit: Leaving.]
dsheets has quit [Ping timeout: 245 seconds]
eizodo has joined #ocaml
NoNNaN has joined #ocaml
mort___ has joined #ocaml
bjorkintosh has quit [Ping timeout: 260 seconds]
tani has joined #ocaml
mobajm_ has joined #ocaml
bjorkintosh has joined #ocaml
avsm has quit [Quit: Leaving.]
mobajm has quit [Ping timeout: 245 seconds]
tane has quit [Ping timeout: 255 seconds]
mobajm__ has joined #ocaml
mobajm_ has quit [Ping timeout: 272 seconds]
mobajm___ has joined #ocaml
mobajm__ has quit [Ping timeout: 264 seconds]
mort___ has quit [Quit: Leaving.]
koderok has quit [Quit: koderok]
mobajm___ has quit [Ping timeout: 272 seconds]
koderok has joined #ocaml
koderok has quit [Remote host closed the connection]
sagotch has quit [Remote host closed the connection]
ggole has quit [Ping timeout: 240 seconds]
ggole has joined #ocaml
_andre has joined #ocaml
_0xAX has joined #ocaml
mhi^ has joined #ocaml
ustunozgur has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
bezirg has joined #ocaml
_0xAX` has joined #ocaml
bezirg has quit [Client Quit]
slash^ has quit [Read error: Connection reset by peer]
_0xAX has quit [Ping timeout: 252 seconds]
zpe has quit [Ping timeout: 246 seconds]
ustunozgur has quit [Remote host closed the connection]
bezirg has joined #ocaml
bezirg has quit [Quit: Leaving.]
bezirg has joined #ocaml
Hannibal_Smith has quit [Ping timeout: 240 seconds]
vanila has joined #ocaml
darkf has quit [Quit: Leaving]
dsheets has joined #ocaml
bytbox has joined #ocaml
Hannibal_Smith has joined #ocaml
ygrek has joined #ocaml
ustunozgur has joined #ocaml
siddharthv is now known as siddharthv_away
ustunozgur has quit [Ping timeout: 252 seconds]
shinnya has joined #ocaml
zpe has joined #ocaml
ustunozgur has joined #ocaml
Leonidas_ has joined #ocaml
Leonidas has quit [Ping timeout: 240 seconds]
ygrek has quit [Ping timeout: 240 seconds]
willy_ has quit [Ping timeout: 246 seconds]
cespinoza has quit [Ping timeout: 240 seconds]
cespinoza has joined #ocaml
msaegesser has joined #ocaml
eikke__ has quit [Ping timeout: 246 seconds]
Simn has quit [Ping timeout: 268 seconds]
eikke__ has joined #ocaml
englishm has joined #ocaml
sad0ur has quit [Ping timeout: 268 seconds]
mhi^ has quit [Ping timeout: 245 seconds]
oriba has joined #ocaml
sad0ur has joined #ocaml
mhi^ has joined #ocaml
oriba has quit [Read error: Connection reset by peer]
eizodo has quit [Quit: Page closed]
Hannibal_Smith has quit [Ping timeout: 272 seconds]
Simn has joined #ocaml
rgrinberg has joined #ocaml
bytbox has quit [Remote host closed the connection]
jerith_ has joined #ocaml
Leonidas_ is now known as Leonidas
jerith has quit [Quit: leaving]
samrat has quit [Ping timeout: 258 seconds]
mcclurmc has joined #ocaml
jerith_ has quit [Client Quit]
jerith has joined #ocaml
samrat has joined #ocaml
ygrek has joined #ocaml
_0xAX` has quit [Remote host closed the connection]
mhi^ has quit [Ping timeout: 268 seconds]
mhi^ has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
ustunozgur has quit [Remote host closed the connection]
Simn has quit [Quit: Leaving]
ygrek has joined #ocaml
cago has joined #ocaml
philtom has joined #ocaml
slash^ has joined #ocaml
ollehar has joined #ocaml
cantstanya has quit [Quit: WeeChat 1.0]
ygrek has quit [Ping timeout: 255 seconds]
ustunozgur has joined #ocaml
bytbox has joined #ocaml
bytbox has quit [Remote host closed the connection]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
dsheets has quit [Ping timeout: 264 seconds]
cago has quit [Quit: cago]
shinnya has quit [Ping timeout: 268 seconds]
rand000 has quit [Ping timeout: 255 seconds]
rand000 has joined #ocaml
cago has joined #ocaml
bezirg has quit [Ping timeout: 240 seconds]
ustunozgur has quit [Remote host closed the connection]
tani has quit [Quit: Verlassend]
pminten has joined #ocaml
cago has left #ocaml [#ocaml]
zpe has quit [Remote host closed the connection]
pyon has quit [Quit: rcirc on GNU Emacs 24.3.1]
zpe has joined #ocaml
pyon has joined #ocaml
bytbox has joined #ocaml
Submarine has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 268 seconds]
cespinoza has quit [Ping timeout: 245 seconds]
cespinoza has joined #ocaml
bytbox has quit [Ping timeout: 268 seconds]
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
bytbox has joined #ocaml
bytbox has quit [Remote host closed the connection]
q66 has joined #ocaml
q66[lap] has quit [Read error: Connection reset by peer]
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
englishm has quit [Ping timeout: 246 seconds]
Kakadu has quit [Quit: Page closed]
ollehar has joined #ocaml
ustunozgur has joined #ocaml
ustunozgur has quit [Remote host closed the connection]
ustunozgur has joined #ocaml
ustunozg_ has joined #ocaml
claudiuc has joined #ocaml
claudiuc has quit [Remote host closed the connection]
claudiuc has joined #ocaml
AltGr has left #ocaml [#ocaml]
ustunozgur has quit [Ping timeout: 260 seconds]
englishm has joined #ocaml
ustunozg_ has quit [Remote host closed the connection]
ustunozgur has joined #ocaml
rand000 has quit [Quit: leaving]
claudiuc has quit [Remote host closed the connection]
claudiuc has joined #ocaml
bytbox has joined #ocaml
ollehar has quit [Ping timeout: 276 seconds]
eikke__ has quit [Remote host closed the connection]
bezirg has joined #ocaml
jao` has joined #ocaml
jao` has quit [Changing host]
jao` has joined #ocaml
bytbox has quit [Ping timeout: 245 seconds]
Kakadu has joined #ocaml
lbaan has joined #ocaml
Kakadu has quit [Client Quit]
Kakadu has joined #ocaml
ontologiae has joined #ocaml
rand000 has joined #ocaml
bezirg has quit [Ping timeout: 245 seconds]
bytbox has joined #ocaml
hhugo has quit [Quit: Leaving.]
q66 has quit [Quit: Leaving]
tane has joined #ocaml
ustunozg_ has joined #ocaml
bytbox has quit [Remote host closed the connection]
samrat has quit [Quit: Computer has gone to sleep.]
jwatzman2 is now known as jwatzman|work
ustunozgur has quit [Ping timeout: 245 seconds]
_weykent is now known as weykent
araujo has quit [Ping timeout: 245 seconds]
ollehar has joined #ocaml
q66 has joined #ocaml
ousado has joined #ocaml
<ousado>
lol.. I can't even reply to a question in the apple ios dev forum if I'm not "enrolled"
<ousado>
how do reasonable people put up with this crap?
Simn has joined #ocaml
troutwine is now known as troutwine_away
<mrvn>
i odn't
<mrvn>
don't
axiles has quit [Remote host closed the connection]
dnm has joined #ocaml
martintrojer has quit [Max SendQ exceeded]
martintrojer has joined #ocaml
MercurialAlchemi has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
<MercurialAlchemi>
out of curiosity, is there any VPS supporting ocsigen deployment? (I assume the answer is 'get a linode box and configure it yourself' but you never know)
octachron has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
ustunozg_ has quit [Remote host closed the connection]
cespinoza has quit [Ping timeout: 268 seconds]
<MercurialAlchemi>
while I'm at it, is there any SCSS compiler out there?
<MercurialAlchemi>
looks like a lot of work has been done but it's far from usable
rand000 has joined #ocaml
<MercurialAlchemi>
"Bytecode only at the moment."
<MercurialAlchemi>
duh
<Drup>
It's been only 3 month since they started
<Drup>
"they" being 1 + 2 * 1/2 persons :p
<MercurialAlchemi>
oh, I thought it was much longer
<MercurialAlchemi>
well, that's pretty neat
<orbitz>
I only got a synopsis from Leo. Shared heap made me cringe a bit though.
<MercurialAlchemi>
for concurrency, the little I've done with lwt seemed pleasant enough
<MercurialAlchemi>
at least with the syntax extension
* orbitz
prefers the (>>=) operator, but to each their own
rgrinberg has quit [Quit: Leaving.]
<MercurialAlchemi>
well, lwt foo is convenient
englishm has quit [Remote host closed the connection]
<orbitz>
i need to relearn some Lwt stuff since Async doesn't work on Mirage yet
rgrinberg has joined #ocaml
hhugo has quit [Quit: Leaving.]
elfring has quit [Quit: Konversation terminated!]
<MercurialAlchemi>
:)
hhugo has joined #ocaml
Submarine has joined #ocaml
Submarine has joined #ocaml
<MercurialAlchemi>
with all the exciting things in ocaml, I think a big thing missing is PR
Khady_ is now known as Khady
<orbitz>
Yeah partially
Khady has quit [Changing host]
Khady has joined #ocaml
<orbitz>
In general it seem stough to get people to care about the things ocaml developers care about
<orbitz>
but i think what pulls a lot of people over is they hit that one problem their favorite language can't solve and ocaml can, and hen they realize it's rather nice here :)
<MercurialAlchemi>
well, I don't know if there is a problem ocaml can solve that Haskell can't, but ocaml can solve it in a fashion I can understand and read more easily
<MercurialAlchemi>
also, well, non-laziness per default is mostly a win
<smondet>
MercurialAlchemi: is there any GHC extension with structural sub-typing? because that's very useful in ocaml
<MercurialAlchemi>
not that I know of
<MercurialAlchemi>
it's not really a thing in Haskell
<orbitz>
smondet: where aer you???
<smondet>
orbitz: you mean geographically? :)
<smondet>
NYC
<smondet>
and you?
<MercurialAlchemi>
careful, next time it's going to be "age?" and "gender?"
<MercurialAlchemi>
(Ocaml, the best language for online dating, due to advanced pattern matching :D )
<smondet>
MercurialAlchemi: good one
<orbitz>
smondet: Gothenburg, with the rest of teh FPers
<smondet>
lucky you
<orbitz>
y u no here
<smondet>
could not go this year
<orbitz>
shame
hhugo has quit [Quit: Leaving.]
<smondet>
i've seen some talks on youtube, sad to miss all that good stuff
<orbitz>
yeah
<orbitz>
what do you think is a good example of phantom types that would seem useful to a Ruby developer?
<Drup>
agree, it's quite cool to be at the workshop :)
<Drup>
orbitz: I'm not sure phantom types is really the thing to use to sell ocaml to ruby developers
<smondet>
a Ruby developer is still using dynamic typing, first would need to go from prehistory to history
<Drup>
but I'm sure whitequark will be happy to provide you with specific improvements
<orbitz>
Drup: oh i'm not trying to sell it, i'm just trying to come up with a reasonable use case
<orbitz>
that someoen would understand
<Drup>
orbitz: if it's a web developer "typing html" ? :D
<smondet>
Yaron's CMU talk had some simple phantom types
<orbitz>
so far my best use case is a Riak API
<Drup>
(ok, arguably, it's a bit more than "just" phantom types
<MercurialAlchemi>
I've used phantom types in Haskell to have validated/non validated versions of the same data structure
<orbitz>
yeah, i'm just tryign to hink of what point in a web stack having phantom types would be conveneint
<smondet>
yes, or any read-only Vs writable data-structure or database handle, etc
<Drup>
orbitz: well, if you consider ocsigen, it's basically used everywhere
<orbitz>
i haven't used ocisgen much, what's a good example in ocsigen
<Drup>
it's used to type the html, the js, the services, the client/serveur interactions ...
<smondet>
once I was thinking of encoding capabilities obtained with a given auth credential in a single 'a Auth.t (but then my brain …)
<Drup>
phantom types is such a basic technique, it's what you put in the phantom type that makes a difference
hhugo has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
<MercurialAlchemi>
If I wanted to sell Ocaml to Ruby developers I'd say "Compiling is not inherently a bad word"
rgrinberg has joined #ocaml
<MercurialAlchemi>
and then I'd reassure them that "And don't worry, the quality of the documentation is exactly what you're used to" :)
<MercurialAlchemi>
(ok, maybe it has gotten better since I stopped keeping an eye on the community)
<orbitz>
I'm not trying to sell it, I'm just trying to find common ground
<orbitz>
to have a sane discussion
<MercurialAlchemi>
smondet: phantom-type based authorization
<smondet>
Drup: maybe I'm picky but in ocsigen Html is just well-used structural typing, and the services are GADTs, not exactly "phantom", right?
<orbitz>
ohh maybe some sort of protocol is a good one actually. phantom types are great for any state machien representation
<MercurialAlchemi>
orbitz: this was mostly in jest
<orbitz>
the defintion of phantom type is when a type varies over a type variable that it doesn't use
<MercurialAlchemi>
though I'd totally use that to start a presentation
<orbitz>
the defintion in this context at least
<MercurialAlchemi>
well, the Core collections use phantom types
<MercurialAlchemi>
I don't know how intuitive it is though
<orbitz>
nah ruby devs don't care about collections
<orbitz>
Need to sleep, later!
<smondet>
see you later
<MercurialAlchemi>
yeah, I should go too
<Drup>
smondet: the type variable in html is not representative of any value
<Drup>
hence, it's a phantom type.
<Drup>
(same for the services)
<smondet>
Drup: for the services there was that big Obj.magic that was supposed to be solvable with GADTs, right? The type variable represents the value created with Eliom_parameter.
rgrinberg has quit [Quit: Leaving.]
<Drup>
and the get/post methods, and the fact that it's attached or not, and ...
<mrvn>
apropo Obj.magic vs. GADT. I often have an extractor function Foo x -> x | Bar x -> x | Baz x -> x | ... Would be nice to have some compiler magic for that (ppx module?)
nlucaron1 has quit [Quit: leaving]
<Drup>
smondet: Obj.magic or gadt, it doesn't change the fact that it's a phantom type
<Drup>
gadts are used almost exclusively for phantom types, anyway
<mrvn>
Drup: or witness types
<Drup>
indeed
<Drup>
and existential
<Drup>
hence the almost
<mrvn>
I would think that most GADT code isn't phantom. The code I cheked the output for nearly always had actual type structures at runtime for the GADTs.
<Drup>
huum, well, depends on the people I suppose
<mrvn>
and how well the compiler is at optimizing the phantoms away
MercurialAlchemi has quit [Ping timeout: 260 seconds]
testcocoon has quit [Quit: Coyote finally caught me]
<mrvn>
or maybe I just used it wrong
testcocoon has joined #ocaml
rgrinberg has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
jwatzman|work has joined #ocaml
<smondet>
Drup: ok, my understanding of "phantom" was more restrictive
ggole has quit []
<Drup>
well, a phantom parameter is just a parameter which type doesn't correspond directly to runtime values
<mrvn>
Drup: but a GADT is type _ t = Foo : int -> int t | Bla : float -> float t. That generates a Block with tag 0 or 1 and one field for the value.
<Drup>
yes, this is not a phantom type
<mrvn>
when would it be a phantom type?
<Drup>
however "type _ t = Int : int t | Float : float t" is
<mrvn>
Drup: I don't think so. That produces an int 0 or 1-
<Drup>
but if you consider of type 'a t, there is never anything of type 'a.
<mrvn>
Yeah, the _ is phantom.
<Drup>
precisely
<mrvn>
in the first example too
<Drup>
err, no, since there is a value of type 'a inside the value of type 'a t
<mrvn>
Drup: not realy. That's a value of type 'b
<Drup>
gne ?
<mrvn>
type _ t = Foo : int -> unit t | Bla : float -> string t
<Drup>
that is not your first example.
<mrvn>
The type of the stored value is not dependent on the type of _
<mrvn>
or rather not equal.
<Drup>
(and yes, that's phantom, even if weird)
<Drup>
(but your first example was "type _ t = Foo : int -> int t | Bla : float -> float t"
<mrvn>
It's even phantom when you have a recursive type. The recursive value is hidden inside the block.
enquora has joined #ocaml
oriba has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
rand000 has quit [Quit: leaving]
msaegesser has quit [Ping timeout: 245 seconds]
Submarine has quit [Remote host closed the connection]
bytbox has joined #ocaml
Kakadu has quit [Remote host closed the connection]
Simn has quit [Read error: Connection reset by peer]
enquora has quit [Quit: enquora]
ustunozgur has joined #ocaml
q66 has quit [Quit: Leaving]
mhi^ has quit [Quit: Lost terminal]
hhugo has quit [Quit: Leaving.]
q66[lap] has quit [Ping timeout: 250 seconds]
ontologiae has quit [Ping timeout: 272 seconds]
q66[lap] has joined #ocaml
tane has quit [Quit: Verlassend]
madroach has quit [Ping timeout: 250 seconds]
madroach has joined #ocaml
ollehar has quit [Ping timeout: 245 seconds]
NoNNaN has quit [Remote host closed the connection]