<dmtd>
but we really should have an uninstall. That is a huge pain.
Denommus has joined #ocaml
<rntz>
suppose I want a type "type value = ... | Set of value set", where "value set" is a set of values. There's a Set functor in the standard library, but in order to invoke it I need to pass it a module with the type I'm making set out of - in this case, "value" - but to define this type, I need the type of sets of values! is there a standard way around this?
maattdd has quit [Ping timeout: 248 seconds]
silver_ has joined #ocaml
maattdd has joined #ocaml
<rntz>
perhaps recursive modules will let me do this...
silver has quit [Ping timeout: 268 seconds]
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0 is now known as Guest62475
infinity0 has joined #ocaml
shinnya has quit [Ping timeout: 248 seconds]
maattdd has quit [Ping timeout: 256 seconds]
mk9 has quit [Remote host closed the connection]
zolk3ri has quit [Remote host closed the connection]
nahra has quit [Remote host closed the connection]
Leonidas has quit [Ping timeout: 240 seconds]
Leonidas has joined #ocaml
sh0t has quit [Remote host closed the connection]
engil1 has quit [Ping timeout: 260 seconds]
govg has quit [Ping timeout: 265 seconds]
govg has joined #ocaml
engil1 has joined #ocaml
govg has quit [Ping timeout: 256 seconds]
silver_ has quit [Read error: Connection reset by peer]
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
nomicflux has joined #ocaml
tjriles has joined #ocaml
tjriles has quit [Ping timeout: 240 seconds]
letoh has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
maattdd has joined #ocaml
dhil has quit [Ping timeout: 255 seconds]
nomicflux has quit [Quit: nomicflux]
tarptaeya has joined #ocaml
spew has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 248 seconds]
Haudegen has joined #ocaml
nomicflux has joined #ocaml
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
nomicflux has quit [Quit: nomicflux]
dhil has joined #ocaml
nahra has joined #ocaml
sh0t has joined #ocaml
mjvoge02 has quit []
mjvoge02 has joined #ocaml
zpe has joined #ocaml
dhil has quit [Ping timeout: 256 seconds]
al-damiri has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
cuicui has joined #ocaml
zpe has quit [Ping timeout: 255 seconds]
cuicui has quit [Read error: Connection reset by peer]
AltGr has left #ocaml [#ocaml]
AltGr has joined #ocaml
<tizoc>
I'm getting a lot of rebuilds after an opam upgrade because of a new version of jbuilder, is this normal?
<reynir>
Yes, a lot of packages are using jbuilder these days
<companion_cube>
a lot of packages don't specify it as a build dep, too
<zozozo>
reynir: shouldn't the jbuilder deps be {build} only ?
<companion_cube>
"jbuilder" {build}
<tizoc>
yes, what I mean, it is a build dependency, right? I wasn't expecting that to require a rebuild of packages
<tizoc>
companion_cube: ahhh, that would explain it
<reynir>
zozozo: oh hm, so if it's a {build} dep it shouldn't trigger a recompile?
<zozozo>
on the other hand, jbuilder also takes care of the installation of packages now, and I think I saw some changes recently (such as .mli/.ml files alsop being installed), so it would make sense to recompile on newer versions
<zozozo>
reynir: indeed iirc
<companion_cube>
zozozo: my jbuilder packages don't use jbuilder at all for installation
<companion_cube>
only an .install file
<zozozo>
companion_cube: nice, though I think the easiness of using jbuilder for installation (or at least jbuilder-generated files) might convince people to use it
<companion_cube>
well jbuilder generates the install file
<companion_cube>
but that makes removal/installation steps independent from jbuilder
<companion_cube>
meaning the opam file doesn't even have install/remove steps
<companion_cube>
well, time2go2work
<zozozo>
yeah, absolutely right, but if (or chen) jbuilder chooses to change the way it generates that file, then it would make sens to recompile packages that depend on it
<zozozo>
*when
sapristi has quit [Remote host closed the connection]
<companion_cube>
that would mean the package was really broken, and it's not up to opam to decide that
zpe has quit [Remote host closed the connection]
andreas_ has joined #ocaml
dhil has joined #ocaml
tarptaeya has joined #ocaml
zpe has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 248 seconds]
maelkum has quit [Quit: AtomicIRC: The nuclear option.]
MercurialAlchemi has quit [Ping timeout: 265 seconds]
cuicui has joined #ocaml
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
dhil has quit [Ping timeout: 240 seconds]
moei has joined #ocaml
sapristi has quit [Remote host closed the connection]
sapristi has joined #ocaml
hakusaro has joined #ocaml
<hakusaro>
I'm pretty much brand new with functional programming and ocaml. What's the best way to debug infinite recursion?
<theblatte>
printf, or attach gdb to the running process and type "bt" to see what it's doing
<hakusaro>
Okay, different question
<hakusaro>
you can have if/else if statements
<hakusaro>
but you absolutely have to have an else condition right?
<reynir>
No, youcan leave out else
petercommand has quit [Remote host closed the connection]
<Drup>
If you leave it out, it's the same as having "else ()"
<reynir>
(but then the expression has to have type unit)
<hakusaro>
Yeah, and that's a problem lol
<hakusaro>
Sorry, I'm an undergrad and my professor assigned our first functional assignment as "just implement capture avoiding substitution based on this sample code" so I'm kinda drowning
<Drup>
ahah, that's interesting
<Drup>
does he assume you have previous experience ?
<hakusaro>
Well, a pre-req to this class is the haskell class that everyone passes out of pity
<hakusaro>
So, it's more like "first ocaml assignment, and you probably don't remember anything"
<thizanne>
what doesn't kill you makes you stronger-ly typed
sapristi has quit [Remote host closed the connection]
darktenaibre has joined #ocaml
<hakusaro>
the best part is that I'm stumped, the problem isn't even infinitely recursive at this test case, and I have no idea /what/ to ask
sapristi has joined #ocaml
<hakusaro>
other than "solve the problem" and that defeats the exercise, and is the epitome of bad question asking
<hakusaro>
Line 50 being the killer. It's not entirely "right" in that I'm not using anything to generate fresh variables -> I'm just hard coding in "z" as a test
<hakusaro>
commenting out line 69, everything executes, but the output for 68 doesn't match the test case
cuicui has quit [Quit: leaving]
ziyourenxiang has quit [Ping timeout: 256 seconds]
<Drup>
where did you got your definition of substitution ?
tarptaeya has quit [Remote host closed the connection]
<Drup>
read that again very carefuly, by paying close attentions on which expressions are used where.
dedgrant has joined #ocaml
<hakusaro>
The way I'm reading it is: if x isn't y, y is a free variable, and z is some new variable (hardcoded right now, so it is), then the end expression should be a direct replacement of x for n only after replacing the free variable with a new variable
<hakusaro>
if y is free, replace y with z, then perform the original substitution on that result
<Drup>
look at which expressions you are fetching the free variables from
<hakusaro>
Should I be getting the free variables from fv applied to Lambda(y, m1)?
<Drup>
Everything is described in the pdf :)
BitPuffin has quit [Remote host closed the connection]
<hakusaro>
Well, I get that much :P
sapristi has quit [Remote host closed the connection]
<hakusaro>
I have 0 background in the lambda calculus
<hakusaro>
this is my first introduction
sapristi has joined #ocaml
<Drup>
Look at the rules (3) inside the pdf, and where the freevars come from, and look at the implementation
sapristi has quit [Remote host closed the connection]
<hakusaro>
o-oh
sapristi has joined #ocaml
<hakusaro>
You're trying to hint that I'm getting fv of m1
<hakusaro>
when I should getting fv of n
nicoo has quit [Remote host closed the connection]
<hakusaro>
Drup: that's it, isn't it
nicoo has joined #ocaml
<Drup>
Yes
dhil has joined #ocaml
sapristi_ has joined #ocaml
sapristi has quit [Ping timeout: 268 seconds]
Haudegen has quit [Remote host closed the connection]
govg has quit [Ping timeout: 260 seconds]
sapristi_ has quit [Remote host closed the connection]
sapristi_ has joined #ocaml
tsani has joined #ocaml
maattdd has quit [Ping timeout: 256 seconds]
mengu has joined #ocaml
tjriles has joined #ocaml
e^x has quit [Ping timeout: 240 seconds]
e^x has joined #ocaml
e^x is now known as Guest81703
Guest81703 has quit [Client Quit]
Algebr has joined #ocaml
e^x has joined #ocaml
e^x has quit [Client Quit]
sapristi_ has quit [Remote host closed the connection]
hakusaro has quit [Ping timeout: 260 seconds]
sapristi_ has joined #ocaml
cbot has joined #ocaml
jnavila has joined #ocaml
dhil has quit [Ping timeout: 240 seconds]
jnavila has quit [Ping timeout: 256 seconds]
ygrek has joined #ocaml
dhil has joined #ocaml
sapristi_ has quit [Remote host closed the connection]
sapristi_ has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
sapristi_ has quit [Remote host closed the connection]
sapristi_ has joined #ocaml
mengu has quit [Quit: Leaving...]
jnavila has joined #ocaml
jnavila has quit [Ping timeout: 240 seconds]
jnavila has joined #ocaml
sapristi_ has quit [Remote host closed the connection]
sapristi_ has joined #ocaml
sapristi_ has quit [Remote host closed the connection]
sapristi_ has joined #ocaml
sapristi_ has quit [Remote host closed the connection]
sapristi_ has joined #ocaml
dhil has quit [Ping timeout: 256 seconds]
mk9 has joined #ocaml
mk9 has quit [Client Quit]
mk9 has joined #ocaml
sapristi_ has quit [Remote host closed the connection]
sapristi_ has joined #ocaml
sapristi_ has quit [Remote host closed the connection]
jnavila has quit [Ping timeout: 240 seconds]
sapristi_ has joined #ocaml
sapristi_ has quit [Remote host closed the connection]
sapristi_ has joined #ocaml
sapristi_ has quit [Remote host closed the connection]
sapristi_ has joined #ocaml
sapristi_ has quit [Remote host closed the connection]
bartholin has joined #ocaml
kakadu has joined #ocaml
john51 has quit [Remote host closed the connection]
john51 has joined #ocaml
jimmyrcom has joined #ocaml
jimmyrcom has quit [Max SendQ exceeded]
jnavila has joined #ocaml
jimmyrcom has joined #ocaml
tarptaeya has quit [Quit: Leaving]
<dmbaturin>
aantron: By the way, should the thread terminology always be converted to promise in the Lwt docs?
<Leonidas>
is there some implementation of shell style variable substitution in OCaml?
<Leonidas>
wow, I never came across this at all and it is even in the ocaml org
<aantron>
dmbaturin, Armael, Leonidas: yes, everything new should be written in terms of promises, not threads
<Leonidas>
aantron: will you rename Lwt to Lwp then? :p
<aantron>
maybe we should rename it :)
<aantron>
heavyweight promises
<dmbaturin>
aantron: I used thread in PR#547, I can reword the Lwt_main to use promise if you prefer.
<dmbaturin>
I just thought it would be strange to suddenly use promise in the middle of the paragraph when the rest of the paragraph says thread.
<aantron>
yes, it's going to look weird for a while, but i think it's better to be switching over
<dmbaturin>
Ok, let me make the change then.
<aantron>
also Lwt_main.run doesn't launch threads (or promises), it allows Lwt to become aware of blocked I/O that has completed, in other words it allows Lwt to resolve promises that stand for I/O that previously blocked
<aantron>
the actual I/O calls themselves already start the I/O, Lwt_main.run is only about finishing I/O (actually, the OS finishes I/O, Lwt_main.run is only about getting Lwt to know that it finished :p)
<aantron>
im not sure what's the best way to phrase it
<dmbaturin>
aantron: Should terminate [successfully] always read fulfill for promises? What should be the generic equivalent of "terminates"?
<aantron>
yes, fulfill is for "success". its ok to also use resolve for that, i guess thats how many people use it in the JS world. but technically in JS (and now Lwt), resolve means finish successfully or with an exception
<dmbaturin>
[run t] calls the Lwt scheduler repeatedly until [t] resolves
<aantron>
the two words dont have all the same usages so sometimes it seems hard to actually use fulfill and still have a short sentence. natural language problems :)
<aantron>
yes, and i recommend renaming all metavariables [t] that stood for threads, to [p] for promises
<dmbaturin>
(** [run p] calls the Lwt scheduler repeatedly until [p] resolves,
<dmbaturin>
Every native or bytecode program that uses Lwt should always use this function
<dmbaturin>
an exception, this exception is raised.
<dmbaturin>
and returns the value of [p] if it is fulfilled. If [p] fails with
<dmbaturin>
for evaluating promises at the top level, otherwise correct scheduling
<dmbaturin>
and completion of I/O operations is not guaranteed.
<dmbaturin>
Sorry for long(ish) paste.
mk9 has quit [Ping timeout: 248 seconds]
<aantron>
np, nits: "If [p] is rejected" instead of "If [p] fails", and we should generally recommend that only one promise be waited for at the top level, not promiseS
<dmbaturin>
"rejected with an exception"?
<aantron>
and i wouldn't say that scheduling and completion of I/O are not guaranteed.. because it is basically guaranteed not to complete :p
<aantron>
i'd just say otherwise promises that depend on I/O will never be resolved or something like that
<aantron>
sure
<aantron>
its a bit redundant i guess
<aantron>
maybe "If [p] is rejected, the exception is raised" is shorter, though it depends on the reader knowing that rejection implies there is an exception to deal with
<dmbaturin>
"is [p] is rejected, an exception is raised"?
<aantron>
i think "an" is not correct there, because it means Lwt_main.run can raise any exception at all
<dmbaturin>
I guess I'll keep it to the fully redundant version.
<aantron>
+1
<dmbaturin>
So, Lwt_main.run is not available in the JSOO version?
<dmbaturin>
On js_of_ocaml, [Lwt_main.run] is not available but neither it's necessary since the JS environment automatically takes care of the I/O considerations.
kevinqiu has joined #ocaml
<aantron>
yep, it's not available. this applies on bucklescript as well, so i wouldn't specialize it to JSOO
<dmbaturin>
aantron: "In JS targets..." then?
<aantron>
sure. or "when targeting JavaScript..."
<dmbaturin>
Fixed in the PR.
<reynir>
JaVaScRiPt
<reynir>
sorry
<dmbaturin>
jAvAsCrIpT
<dmbaturin>
A fun thing is that I decided to work on the PR to procrastinate on sanding my mouthpiece cork, but finding the words for the new terminology in this case was hardly better than cork sanding. ;)
<aantron>
lol
<reynir>
mouthpiece *cork*? :o
<dmbaturin>
reynir: Yes. The _other_ single reed horn. :)
<dmbaturin>
reynir: Ah, yes, you are lucky to have no corks anywhere.
mcspud has quit [Remote host closed the connection]
<reynir>
Usually there's cork on mutes, but they're optional of course
<aantron>
i have a bunch of stupid nits, like the code inside {[]} should be unindented, or it will look weird after it goes through ocamldoc, and that kind of stuff. i prefer to push a commit into your branch to fix them, and then squash-merge the PR. are you ok with that? it's more efficient than going back and forth on every little thing. the text itself is a definite improvement already, im happy with it :)
mcspud has joined #ocaml
justin_smith has quit [Remote host closed the connection]
<dmbaturin>
aantron: Sure, I remember that squash-merge is your normal approach so I made no effort to keep the history inside the PR tidy. ;)
<dmbaturin>
Let me fix the indentation.
<aantron>
yes, it is liberating :p
<aantron>
ok, basically any indentation you put inside {[ ... ]} will be kept verbatim by ocamldoc, and we don't want that, so we have to flush the code to the left
<aantron>
so the code should start in column 1 (or 0, if 0-based) in the source
<dmbaturin>
aantron: All the way to the left?
justin_smith has joined #ocaml
<dmbaturin>
Ok, let me do it.
<aantron>
also i suspect some lines became more than 80 chars
<reynir>
dmbaturin: I'm curious why the moutpiece cork is necessary (or maybe rather why it's not on brass)
<reynir>
(sorry to interrupt)
<aantron>
yep, so the first let should start at the beginning of its line, more lines after that can of course be indented relative to that first line
<aantron>
its pretty ugly... but thats how it is :/
<dmbaturin>
aantron: Done.
<aantron>
there are still long lines (> 80 chars), again im happy to just fix it, but since you were doing fixes, you're welcome to if you want :)
<dmbaturin>
reynir: In wooden instruments, you can't make the tolerance too fine because the wood shrinks and swells a bit with weather changes, so a compressible buffer is necessary to ensure airtight fit. With saxophone necks, however... I guess it has more to do with the fact that they are conical and it's easier to have a cork there than to make mouthpieces to exactly the same spec.
<reynir>
Ah that makes sense
<reynir>
thanks! :)
<dmbaturin>
aantron: Done.
<dmbaturin>
reynir: Brass leadpipes are so standardized that any mouthpiece is guaranteed to fit any of them?
<reynir>
No, there are different bores... But yea, if you know the bore you can get any mouthpiece for that bore size
<aantron>
dmbaturin: merged :)
<aantron>
thanks
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 276 seconds]
<dmbaturin>
aantron: I'll look for other instances of the old terminology. Can't make promises though. ;)
<reynir>
heh
<dmbaturin>
reynir: I suppose traditional use of corks may be the reason why no one made serious effort to standardize bore sizes, lol.
<reynir>
Hmm, makes sense. The bore size makes a difference in the sound.. smaller is more often used in e.g. jazz for example. Is this not a consideration with woodwinds?
<reynir>
I guess you can always try play and see how it sounds, of course
barcabuona has quit [Ping timeout: 255 seconds]
<aantron>
lol
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
<dmbaturin>
reynir: It does, it's just that it comes in all variations. Wide bores are usually associated with jazz for "bigger" sound for less effort and ease of pitch bending, though most non-dixieland people use very classical setups.
<dmbaturin>
When you also have a reed in the equation, isolating effects of each parameter gets quite hard though.
isd has joined #ocaml
<justin_smith>
dmbaturin: it's funny how close that gets to sounding like something about fp, eg. if you said "read" as in reading a value as input rather than "reed"
<dmbaturin>
justin_smith: True.
whoman has quit [Ping timeout: 256 seconds]
keep_learning has quit [Remote host closed the connection]
barcabuona has joined #ocaml
maattdd has joined #ocaml
jnavila has quit [Remote host closed the connection]
argent_smith has quit [Quit: Leaving.]
maattdd has quit [Ping timeout: 240 seconds]
kakadu has quit [Remote host closed the connection]
ziyourenxiang has joined #ocaml
kevinqiu has quit [Ping timeout: 264 seconds]
AltGr has left #ocaml [#ocaml]
Algebr has quit [Remote host closed the connection]
ziyourenxiang has quit [Ping timeout: 248 seconds]
Algebr has joined #ocaml
Haudegen has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]