emmanuelux has quit [Remote host closed the connection]
emmanuelux has joined #ocaml
tbrady has joined #ocaml
r126f has joined #ocaml
cdidd has quit [Remote host closed the connection]
<tbrady>
Anyone have pointers on the fastest way to format a string containing other strings and ints? I've tested printf, printing in chunks with Pervasives.print_*, String.concat and String.blit. So far concat is fastest for my use case.
emmanuelux has quit [Ping timeout: 245 seconds]
<_habnabit>
tbrady, you profiled your program and found that this was the bottleneck?
<tbrady>
_habnabit: haha, no. But this is a friendly competition sort of thing, so I'm micro-optimizing.
asmanur_ has joined #ocaml
destrius has joined #ocaml
asmanur has quit [Ping timeout: 248 seconds]
<thelema>
tbrady: Buffer.add_string?
<tbrady>
thelema: thanks, yes. I just tested that one as well and it's 2nd best to String.concat.
<thelema>
what are you doing with the string?
Transformer has joined #ocaml
Transformer has quit [Excess Flood]
<tbrady>
thelema: I've got some strings and ints and I'm space-delimiting them and writing them to stdout
<hcarty>
tbrady, _habnabit: The toploop.cmi problem should be fixed now
<hcarty>
tbrady: I think the issue was caused by a change in findlib to work with OCaml 4.00
<tbrady>
hcarty: ahhh, thank you.Trying again now.
<hcarty>
tbrady: Good luck :-) It should work properly at this point as long as you have all of the appropriate libraries available
<tbrady>
Excellent. I'm excited to try utop, but didn't want to have to install its dependencies manually.
<hcarty>
tbrady: utop is ~50% of why I created ocamlbrew
<hcarty>
It's a really nice tool but there are a lot of dependencies to get right
<tbrady>
I've been wishing for something like it for quite a while. rlwrap+ocaml is fine, but I'd love an IPython for Ocaml.
<hcarty>
utop's tab-completion + (basic) syntax highlighting has me pretty spoiled
<hcarty>
It doesn't cover everything (ex. Foo.(...) doesn't open Foo in (...)) but it's quite good
gnuvince has joined #ocaml
<tbrady>
hcarty: ok, making progress but if failed with: E: Command 'ocaml discover.ml -ocamlc /Users/tbrady/ocamlbrew/ocaml-3.12.1/bin/ocamlc.opt -ext-obj .o -exec-name a.out -use libev true -os-type Unix' terminated with error code 1Exception: Failure "Could not configure lwt"
Progster has joined #ocaml
<hcarty>
tbrady: Can you pastebin the full Lwt-portion of the log (or the full log) somewhere?
<hcarty>
tbrady: It may be a missing library
<tbrady>
Sure.
<hcarty>
Probably libev-dev or it's equivalent, depending on your distribution/OS
<hcarty>
Also, on RHEL6/CentOS6 + EPEL and/or Fedora I think some extra configuration is required - setting C_INCLUDE_PATH=/usr/include/libev/ or some similar path in the environment if I recall correctly
<hcarty>
tbrady: I should be on tomorrow and I'll look back through the IRC logs then. For now I'm off to sleep.
<hcarty>
tbrady: Good luck - feel free to leave other questions and I'll take a look tomorrow.
<tbrady>
hcarty: thank you
itegebo has quit [Remote host closed the connection]
Progster has quit [Ping timeout: 272 seconds]
ankit9 has quit [Ping timeout: 244 seconds]
tbrady has quit [Quit: tbrady]
Hussaind has joined #ocaml
Hussaind has left #ocaml []
Xizor has joined #ocaml
ankit9 has joined #ocaml
BiDOrD_ has joined #ocaml
BiDOrD has quit [Ping timeout: 264 seconds]
sgnb has joined #ocaml
ankit9 has quit [Ping timeout: 245 seconds]
`micro has quit [Ping timeout: 245 seconds]
`micro has joined #ocaml
Snark has joined #ocaml
`micro is now known as Guest45390
ankit9 has joined #ocaml
ankit9 has quit [Client Quit]
ulfdoz has quit [Ping timeout: 240 seconds]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
pango is now known as pangoafk
<orbitz>
Drakken: plenty of functions are polymorphic on thie return. For examle List.hd
Guest45390 has quit [Ping timeout: 244 seconds]
edwin has joined #ocaml
`micro has joined #ocaml
`micro is now known as Guest42173
mika1 has joined #ocaml
cago has joined #ocaml
Xizor has quit [Ping timeout: 260 seconds]
eni has joined #ocaml
ftrvxmtrx has joined #ocaml
ankit9 has joined #ocaml
Submarine has quit [Ping timeout: 240 seconds]
zmq has joined #ocaml
<Drakken>
orbitz yes, but the return type is usually based on one of the arguments.
edwin has left #ocaml []
<zmq>
i am trying to get started with zeromq using the ocaml binding, but cannot compile ocaml-uint with the make all command on my ubuntu machine
<orbitz>
Drakken: I could have replaced 'b with type init_errors or something, doesn't really matter, it iwll be given a concrete type when the functor is applied
<Drakken>
hmm. I've never heard of that. Usually the argument supplies the types.
<zmq>
is the ocaml-uint not available for ubuntu?
<orbitz>
Drakken: An init function returns errors dpeendent on what kind of work the actual function does. The sig I've defined just says that the actual struct it is applied to needs to define the return type
<orbitz>
Drakken: Which is why when the functor is applied, it will be applied to an actual struct which will return concrete types
zmq has quit [Quit: irc2go]
<Drakken>
Well, I'd like to see it if you can make it work. I don't understand how it can be correct ML without 'b being in the arguments somewhere.
<Ptival>
rwmjones: I'm having troubles checking out bitstring, know anything about that?
<Ptival>
rwmjones: nvm, it worked now...
<orbitz>
Drakken: that does work, the code compiles fine
<orbitz>
Drakken: see gen_server_test.ml
thomasga has joined #ocaml
avsm has joined #ocaml
Yoric has joined #ocaml
Yoric has quit [Ping timeout: 264 seconds]
Hodapp has quit [Ping timeout: 244 seconds]
zorun has quit [Quit: leaving]
struktured has quit [Ping timeout: 246 seconds]
avsm has quit [Quit: Leaving.]
sepp2k has joined #ocaml
zorun has joined #ocaml
ankit9 has quit [Remote host closed the connection]
struktured has joined #ocaml
Progster has joined #ocaml
Yoric has joined #ocaml
avsm has joined #ocaml
dwmw2_gone has quit [Ping timeout: 240 seconds]
dwmw2_gone has joined #ocaml
cdidd has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
Hodapp has joined #ocaml
cdidd has quit [Ping timeout: 244 seconds]
cdidd has joined #ocaml
Yoric has joined #ocaml
_andre has joined #ocaml
destrius has quit [Quit: Leaving.]
cdidd has quit [Read error: Connection reset by peer]
cdidd has joined #ocaml
<Drakken>
module type FOO = sig type t val f: t -> 'a end
<Drakken>
What does the 'a mean there?
<sgnb>
Drakken: anything
<sgnb>
(e.g. f always raises an exception)
<Drakken>
Does it mean f has to be polymorphic?
<flux>
it basically means f cannot return
<sgnb>
or never terminates
<flux>
there's no way to implement that function in any other way
<flux>
you can of course use it in polymorphic context
<flux>
all legal, because it never gets executed because it never returns
<Drakken>
specifically, the 'b in GEN_SERVER
<flux>
is that something working and complete code?
<Drakken>
Does it matter that 'b is a parameter of Result.t instead of the return type itself?
<Drakken>
orbitz said it compiles
<flux>
well, does he have an implementation for the module?
<orbitz>
Yes, and 'a becomes conrete in the impl
<orbitz>
see gen_server_test.ml
<orbitz>
Also, init does not reutrn 'a, it returns a (state, 'a) Return.t
<flux>
well, it never returns the 'other' case?
<flux>
it always returns Result.Ok
<orbitz>
No, it returns, the implementaiton of GEN_SERVER specifies teh types
<flux>
how about some code that returns Result.Error?
<Drakken>
right
<Drakken>
Test_server_impl.init never returns a Result.Error
<orbitz>
Right because it's just a test
<flux>
what if it DID returns Result.Error, can you still compile it?
<flux>
you need to put the return type (ie. 'b) into the module signature as well
<orbitz>
Nope
<orbitz>
that is easy to fix thouhg, ij ust define a type for init errors
<flux>
otherwise Result.Error remains something that cannto exist
<flux>
maybe you want to use exn in this place, though
<flux>
if you want a 'dynamically typed' error value
Submarine has quit [Quit: Leaving]
<orbitz>
Defining an init_error type fixes it
<flux>
and where do you define it?
<flux>
modify the original signature? yes.
<orbitz>
Yes
<flux>
here's a shorter example of the problem for completeness sake: module type FOO = sig val a : unit -> 'a option end module F : FOO = struct let a () = None end
<orbitz>
Drakken: thanks for finding the error
<orbitz>
flux: I assumed that in th esignature it was equivalent to saying "the implementor will define this"
<flux>
I never thought of using it that way, but now that I think of it, it's similar to using phantom modules
<flux>
uh, phanton types that is
<flux>
orbitz, 'the implementor will define is' is all the 'type xxx' in the type signature
<orbitz>
Right
<orbitz>
I didn't realize I had tobe so explicit about that
<flux>
'a etc are for the function scope
<orbitz>
Drakken: fixed and pushed. Tack
<Drakken>
Tack?
<orbitz>
"Thanks"
<flux>
at least in swedish, which others?
<Drakken>
in polish, Tak means yes
<orbitz>
I mean the Swedish defintion :)
<orbitz>
I think Takk means thanks in Icelandic
<orbitz>
Tack is probably in Norwegian too, maybe Danish
<Drakken>
orbitz thank you for an interesting puzzle :)
<gasche>
in OCaml, type variable that occur in the code (annotations, etc.) generally are just inference variables that can be unified to anything
Progster has quit [Read error: Operation timed out]
<gasche>
but not in value signatures, where they are polymorphic variables
<gasche>
(or when using the explicitly polymorphic form ('a . foo))
emmanuelux has joined #ocaml
Progster has joined #ocaml
_andre has quit [Read error: Connection reset by peer]
_andre has joined #ocaml
thomasga has quit [Ping timeout: 264 seconds]
maufred_1 has quit [Read error: Operation timed out]
maufred__ has quit [Ping timeout: 244 seconds]
maufred has joined #ocaml
maufred_ has joined #ocaml
thomasga has joined #ocaml
maufred_ has quit [Ping timeout: 246 seconds]
maufred__ has joined #ocaml
maufred_ has joined #ocaml
maufred has quit [Ping timeout: 265 seconds]
remy has joined #ocaml
remy is now known as Guest1785
Guest1785 has quit [Client Quit]
remyzorg has joined #ocaml
<fasta>
What kind of linker does ocaml use? Something completely independent of the GNU tools? Is relinking faster than linking from scratch?
<gasche>
I believe it reuses the host system toolchain: gcc tools on Linux, the weird gcc fork on MacOS, and something else on Windows depending on your install
<gasche>
(mingw or msvc, bla bla bla)
<gasche>
(I pick MacOS out specifically because, as I heard, a lot of apparently-OCaml bugs are due to the Apple folks randomly changing their linker behaviors between release)
<adrien>
ocaml links using gcc
<adrien>
which uses ld
gnuvince has quit [Ping timeout: 250 seconds]
<fasta>
If I want to call a C function in a .so, can I do that at interactive speed?
<fasta>
Or do I have to 'wait' more than 0.2 seconds for the compiler to finish?
<fasta>
I read something about having to compile my own top-level after doing that.
<orbitz>
what is itneractive speed? Is it as fast as turning ot plaid?
<orbitz>
fasta: the toplevel links against .so's, for example when you use nums
<fasta>
Interactive speed means that when I save my buffer, and then call a function, that there is no noticable delay.
<fasta>
In C++ linking alone can easily take minutes with large software.
<adrien>
fasta: ocaml does not use the linker at runtime
<adrien>
except maybe for the native toplevel iirc, and even that isn't slow, and it's a very special case
<adrien>
fasta: it takes ages because there is an awful lot of symbols visible
<fasta>
adrien: so, is there any example of actually calling some C function in a .so without writing a single line of C in an interactive session?
<orbitz>
nums
<fasta>
adrien: what takes ages?
<orbitz>
linking C++
tmaedaZ has quit [Ping timeout: 246 seconds]
<adrien>
linking C++
<adrien>
fasta: when you call a C function, you need to have C stubs
<fasta>
load "nums.cma";;
<fasta>
Error: Unbound value load
<adrien>
the C stubs convert from OCaml in-memory representation and function calling convention to C ones
<adrien>
since you have a .c file, it will have to be compiled with GCC
<fasta>
adrien: in Common Lisp via CFFI there is no need to do that.
<gasche>
cool story
<fasta>
gasche: what kind of a response is that?
<adrien>
then, depending on the configuration, the program will use .o, .so, .a files to make these stubs available
<orbitz>
fasta: We're in #ocaml not #lisp
<fasta>
orbitz: so?
<adrien>
but in any case, even without C stubs, the last step for building ocaml programs involves the system linker
<orbitz>
So how Common Lisp does it isn't hwo Ocaml does it
<adrien>
fasta: there isn't such support, and I'm happy about that actually
<fasta>
orbitz: well, the natural question would be: why do you need extra effort in OCaml?
<gasche>
well
<adrien>
fasta: imho, using libffi for bindings is just an annoyance
<adrien>
it removes even more static typing guarantees
<gasche>
in any case, if the C function you have compiled used the OCaml FFI things, I suppose it can work out of the box from the OCaml side
<adrien>
and it's not a huge pleasure to work with libffi
<fasta>
I thought the whole point of programming languages was to make it easier to express what you want.
<gasche>
not sure if "extern" declarations are available in the toplevel, but they should be
<gasche>
fasta, what kind of question is that?
<adrien>
fasta: C stubs _are_ unsafe
<gasche>
anyway: the OCaml value representation is not the same as the C value representations, and the choice of the designers where to let people implement the glue between them on the C side
<adrien>
and hard to write
<adrien>
and double unsafe because of bugs in them
<gasche>
(simply because manipulating C-like values from the OCaml land would not be safer; though I agree it would be convenient)
tmaedaZ has joined #ocaml
<fasta>
adrien: several Common Lisp libraries parse C header files to automatically make it work.
<orbitz>
Common Lisp is not statically typed
ankit9 has joined #ocaml
<adrien>
fasta: it's impossible to do that in the general case (more than 50% of the time) and provide a proper API
<adrien>
that's where being dynamically typed matters
<fasta>
orbitz: you can use a dynamically typed language to create a static object.
<adrien>
int* means several things in C
<gasche>
so I suppose if you write a C function that correctly manipulates OCaml values (using the OCaml FFI), you should be able to link it on the C side and use it from OCaml
<adrien>
only one to the machine
<adrien>
several to the programmers and APIs
<adrien>
it's ambiguous, no program can make it unambiguous
<fasta>
And what about this: start ocaml and type #load "nums.cma";;
<fasta>
When I try that, I get that load is not a command.
<adrien>
hmmm
<orbitz>
Because it isn't
<orbitz>
#use
Yoric has quit [Ping timeout: 250 seconds]
<gasche>
?
<fasta>
Never mind.
<adrien>
#use is for .ml files
<adrien>
#load should work iirc...
<orbitz>
what does #use "topfind" do then/
<adrien>
but anyway
<gasche>
you have to write the # yourself
<orbitz>
Oh
<gasche>
in addition to the prompt
<adrien>
#use "topfind";;
<orbitz>
I assumined that's what he was doign
<adrien>
#require "nums";;
<adrien>
that would be the best way
<fasta>
How can I specify a pointer to some opaque type in an external declaration?
<fasta>
So, the pointer needs to be passed to OCaml, and OCaml needs to not touch it in any way.
<samposm>
fasta: if you just want the C pointer to travel via ocaml, without ocaml doing anything with it, my guess is you could create a boxed int64 in C, put the pointer there. then ocaml would think it's a int64
<samposm>
(disclaimer: others in this channel know ocaml internals much better than I do)
<gasche>
well the link to the manual I gave specifically discuss this use case
<gasche>
are you writing a PostgreSQL binding? there already is a PostgreSQL library for OCaml
<fasta>
gasche: this is more of a small benchmark for the FFI system.
<Yoric>
My personal experience is that writing C is a task best done in C, rather than in whichever high-level language has a ffi to C.
gnuvince has joined #ocaml
<samposm>
fasta: what in the FFI you want to benchmark=
<fasta>
samposm: how easy it is to get something to work.
<samposm>
you want to bechmark programmer time, that is?
<fasta>
samposm: yes
<gasche>
fasta, you must wrap pQconnectdb in a C stub that bridges OCaml values into C values and vice-versa
<gasche>
have you done it?
<gasche>
(how to do that is explained in the manual or the various tutorials mentioned here)
<fasta>
gasche: I expected that because they are opaque types that this wasn't needed.
<gasche>
if you don't, you'll typically get an integer twice smaller, or twice bigger, than expected
<gasche>
well "string" and "int" certainly needs to
<fasta>
gasche: yes, that's exactly what I am seeing.
<fasta>
gasche: why is it a factor of two?
<gasche>
your opaque "t" might not, though please see the warning in my link about doing that
<gasche>
fasta, the integer representing N in OCaml is stored in memory as 2*N+1
<gasche>
because the language use the last bit to know if it is an integer or a pointer
<gasche>
to get precise GC
<gasche>
*uses
<samposm>
ocaml native ints are int31 or int63 :-)
ankit9 has quit [Quit: Leaving]
remyzorg has quit [Quit: Page closed]
<fasta>
Does the ocaml back in time debugger really work?
<flux>
yes, but otherwise the debugger is quite tiresome to use :)
<flux>
and of course it's mostly useless for problems that involve IO
<fasta>
One would expect someone to have taken the time to do a screencast if it was that great.
<flux>
indeed. screencasts are the measure of greatness.
struktured has quit [Remote host closed the connection]
<fasta>
flux: tell me one thing which is great outside of the OCaml world which has no screencast.
<fasta>
flux: everything of any quality has screencasts for it, in my experience.
<fasta>
(because it is worthy of being shows to the world)
<fasta>
shown*
<rwmjones>
ocamlbuild--
eni has quit [Ping timeout: 246 seconds]
<rwmjones>
gaaa how do I add a -I +compiler-libs option to every ocaml command?
<rwmjones>
it's a simple thing!
<rwmjones>
if only the tool wasn't so stupidly obscure
<flux>
fasta, well, what great things are there that have screen casts? it has been my experience that there are screencasts for random things, being a low quality indicator of greatness.
<flux>
rwmjones, indeed
<fasta>
flux: that's not what I asked.
<flux>
fasta, I don't know any great things to name from the top of my head in general
<fasta>
flux: and your logic is flawed.
<fasta>
I said great -> must have a screencast.
<fasta>
Or -screencast -> not great.
<fasta>
You said screencast -> great.
<fasta>
Which is not what I said.
<flux>
fasta, being a low quality indicator in my opinion suggests that there may well be many great things that don't have screencasts.
<Hodapp>
fasta: Your logic is flawed because you're begging the question of whether "great -> must have a screencast" has any validity whatsoever beyond the hand-waving argument you presented and yourself appended "in my experience" to.
<Hodapp>
fasta: It's rather inappropriate to say something like that - making it clear that it's not intended as any sort of basis for deductive reasoning - and then criticize what flux said as if it should be held to a far higher standard than what you said.
<fasta>
Hodapp: no, it's not, because flux responded in an incorrect way.
<flux>
fasta, did I not make my view clear?
<fasta>
flux: yes, you did, but it makes no sense.
<Hodapp>
fasta: You still are begging the question.
<Hodapp>
fasta: So, yes, it is.
<flux>
rwmjones, try this: flag ["ocaml"; "compile"] (S[A"-I"; A"+compiler-libs"]) | _ -> () end
<flux>
oops: open Ocamlbuild_plugin open Command let _ = dispatch begin function | After_rules -> flag ["ocaml"; "compile"] (S[A"-I"; A"+compiler-libs"]) | _ -> () end
<Hodapp>
fasta: If we're in the realm of formal logic here, then you've got quite a lot of ground to cover before you've any room to start calling anybody else incorrect.
<Hodapp>
fasta: If we're not in the realm of formal logic here, then quit criticizing people for minor structural flaws in their replies and focus a little more on context, relevance, and implications.
<fasta>
Hodapp: I corrected my professors in formal logic a couple of times.
<Hodapp>
fasta: I really don't care who you think you corrected or what you think it implies.
<avsm>
aha, same as flux, except i had one to "link" as well (not needed?)
<fasta>
Hodapp: and in general my formal knowledge is very high.
<fasta>
Hodapp: so, whatever.
<Hodapp>
fasta: Saying your knowledge is high is like saying you have a big penis. If you have to tell people it's true, it almost never is.
<fasta>
Hodapp: almost never; indeed.
<Qrntz>
what is «formal knowledge» measured in?
<Yoric>
inches
<Hodapp>
Qrntz: Inches.
<Qrntz>
oh, I see.
<fasta>
Hodapp: do you have any credentials whatsoever?
<Yoric>
This looks like a highly constructive discussion, though.
<Hodapp>
fasta: My credentials are not at all relevant to this discussion.
<Hodapp>
fasta: And I'd suggest you refrain from taking it further, as you're rapidly devolving into the territory of ad hominem and appeal to authority, which are not the domain of formal logic but rather of rhetoric.
<fasta>
Hodapp: of course they aren't.
<samposm>
this is the worst disc I have ever seen on this channel
<Yoric>
Ok, this has officially degenerated.
<Yoric>
Can anyone reboot them?
<Hodapp>
fasta: I'd highly suggest you move along.
<fasta>
Hodapp: I'd highly suggest you show a bit of respect for someone who actually has credentials.
<rwmjones>
avsm: thanks, incredibly obscure; however will that require me to add "compiler-libs" tags to files?
<gasche>
fasta, you may not be aware of it, but you are an annoying troll
<fasta>
gasche: I am not the one who started this mess.
<Hodapp>
fasta: Credentials are not at all relevant to this discussion, which is why I have not given even a hint at mine. Move along.
<gasche>
if you are (aware), I'm sorry for you; if you are not, you should think more about how you interact with people and why they may not like it
<fasta>
gasche: sorry, how is Hodapp different?
<fasta>
gasche: I am just returning a favour.
<avsm>
rwmjones: yes, you need to add "true: compiler-libs" to _tags
<gasche>
I mostly haven't read his replies
<gasche>
I don't care
<avsm>
rwmjones: or a glob pattern "<*.ml>: compiler-libs" to whatever files you want the -I on
<Yoric>
I personally just want both of them to shut up.
<fasta>
gasche: ok, so, then don't judge or communicate to me about it before you have done so.
<fasta>
Yoric: the only reasonable response.
<gasche>
I was trying to help, fasta: you may not be aware that you're being rude; you should think about it
<Hodapp>
fasta: The difference is that I'm not being openly condescending to the channel and bringing up 'credentials' repeatedly, while you are.
<fasta>
gasche: I am and was right. People who whine about rudeness are annoying.
<Yoric>
Please.
<Yoric>
Change of topic.
<Hodapp>
fasta: Knock it off already. This is #ocaml.
<gasche>
Yoric, do you read gagallium?
<fasta>
Hodapp: most people on IRC are stupid; I get it. Doesn't mean everyone is.
<avsm>
gasche: i'm just breaking up mirage for release into little ocamlfind libraries. its coming rsn ;-)
<avsm>
Yoric: yeah. the problem is finding the balance between static scheduling and usability. most linear typed systems are too strict to do anything useful with them (e.g. no cyclical data structures)
<avsm>
and polymorphic recursion is problematic
<Yoric>
polymorphic in terms of linearity?
<avsm>
well we're trying to combine linearity and monomorphisation, to eliminate a tagged heap and use a C-compatible memory representtion
<Yoric>
avsm: By the way, still interested in the student projects we discussed?
<gasche>
(student projects? I have a small list of student projects hidden somewhere that I need to release someday)
<avsm>
Yoric: yes, in fact, i have it on my flagged list :-) there's some stuff ongoing that'll make it much more interesting that i hope to finalise by september
<gasche>
(or, more precisely, "intersting and/or useful stuff that I would do if I had infinite time")
<Yoric>
Good.
<Yoric>
As you may recall, I have other stuff to finalize by september that will make me harder to reach, though :)
<avsm>
gasche: we very happily accept phd interns btw, if you want a break in cambridge sometime :-)
<avsm>
Yoric: yes! fingers crossed
<Yoric>
:)
<Hodapp>
avsm: I'm not too familiar with the concept, but what is the value of linear typing in parallelism? When it 'allows references but not aliases' - are said references to non-local resources, or something of the sort?
<gasche>
I just fixed the "vulgarization => popular science" bit, thanks for the feedback
<avsm>
Hodapp: you can switch between call-by-value or call-by-reference, and so have the runtime select a shared-memory model (multi-core) or a distributed one (multi-host) or a combination
<Yoric>
With linear typing, you can pretty much remove the need for concurrent garbage-collection.
<Yoric>
Ok, that, too :)
<Hodapp>
ohhh, interesting
<Yoric>
i.e. you can ensure that the data that you have passed to that other thread/process/task is not referenced in this thread anymore.
<gasche>
the general point is that if you can write code that is simple enough to be linear, you can do lot of low-level stuff to go faster
<gasche>
so, if I understood correctly the idea, avsm's group is trying to see which part they can write in this restricted language to go really fast, and which part (the "control" part in a sense) is a bit too complex, and should remain in a general language (eg. OCaml), with hopefully the critical sections all in the linear part
<avsm>
yeah. linearity seems really nice for the coordination of distributed processes, but less so for complex control flow.
<vext01>
hey guys
<avsm>
therefore, begin computation by 'routing' the data to a single process, where an ocaml (or java or...) runtime is waiting to run some local computation, and then keep flowing through the system via the linear layer again
<Hodapp>
avsm: you have any papers that are a decent read on this?
<Hodapp>
I bought a tablet, I may as well use it...
eni has joined #ocaml
<avsm>
Hodapp: not yet, it's on ice until the end of the summer, then we'll resume work on it
<Yoric>
vext01: hi
<Hodapp>
avsm: but nothing else in the way of precursor work on this? I suppose I could search myself but was wondering if you had any good papers on hand
<avsm>
dataflow programming. it's gone out of fashion and will return again! :-)
<Hodapp>
thanks
mika1 has quit [Quit: Leaving.]
gasche is now known as gasche_
<Hodapp>
Dataflow is one of those paradigms I've not done enough work with
<Hodapp>
but that I can see the value behind
cago has quit [Quit: Leaving.]
<gasche_>
playing with, say, PureData is quite fun
<Hodapp>
Someone - I think in #scala - posted what I thought was a very interesting lecture from Gerald Sussman on propagator model, which derives from dataflow and functional (IIRC) but has some other differences
<Hodapp>
I need to learn Pd better. I've done just a little