<amiller_>
hrm, how should i figure out what a Tvar corresponds to if i'm traversing the typedtree
<amiller_>
i have at my disposal an env
<amiller_>
Env.t rather
<jpdeplaix>
rks__: I don't like open. But no I didn't read that already :/ Thanks
<rks__>
jpdeplaix: well, the Std module in Core and Async is imho meant to be open
<rks__>
have you look at their definition? :)
<rks__>
looked*
travisbrady has joined #ocaml
<amiller_>
i think it makes the most sense to do Env.lookup_type (Longident.Lident v) env
<amiller_>
although that gives me a type_declaration rather than a type_expr
<amiller_>
maybe the type_declaration.type_manifest is what i'm looking for
<amiller_>
ah lookup fails anyway, I can't just use a variable name to look in the environment :/
<jpdeplaix>
rks__: Yes I know. But it also import functions and not only modules. I'll wait for namespaces instead
<rks__>
yes it does extend Pervasives a bit
chambart has joined #ocaml
<jpdeplaix>
rks__: my own coding rules don't allow me to open a module which doesn't define only operators
<rks__>
alright alright
<gasche>
Drup: I don't like the WTFPL, because of its potentially offensive name
<gasche>
naming a license with a "Fuck" in it is a brogrammer idea
<gasche>
people shouldn't use it
<mathieui>
why?
<gasche>
because it can offend others
<Drup>
Seriously ? :|
<gasche>
yeah
<mathieui>
I can understand that in a work environnment, it’s not politically correct
<gasche>
well that's part of the point
<gasche>
you want a licence that people can refer to in a work environment
<companion_cube>
jpdeplaix: I support that
<gasche>
you also want a license that everyone is comfortable with
<mathieui>
put people getting offended by “fuck” in 2013 are… rare
<gasche>
in your social circles, maybe
<adrien_oww>
gasche: I believe the WTFPL predates "brogramming"
<Drup>
gasche: it's convenient, the WTFPL is equivalent to public domain
<gasche>
Drup: CC-0 then
<gasche>
mathieui: but writing free software is precisely aimed at providing software to *anyone*, without restriction
<mathieui>
gasche: those are restrictions people impose upon themselves
<gasche>
including people living the old ways, bigots, professionals in a strict environment, feeling insecure, etc.
stomp has quit [*.net *.split]
iZsh has quit [*.net *.split]
fasta has quit [*.net *.split]
<mathieui>
it’s like saying “I can’t use software if it has a g in its name”
stomp has joined #ocaml
<mathieui>
(I understand clearly what you are saying, and I mostly agree, but it’s not against the free software ideal to put “fuck” in your licence name or wherever)
<Drup>
gasche: I will keep using it for some of my projects. I never intended to use it for everything.
caligula__ has joined #ocaml
<Drup>
gasche: and I must say that I agree with what the FAQ of the WTFPL have to say about this.
orbitz_ has joined #ocaml
gasche_ has joined #ocaml
orbitz has quit [Write error: Broken pipe]
hcarty has quit [Write error: Broken pipe]
caligula_ has quit [Write error: Broken pipe]
vpm has quit [Excess Flood]
<gasche_>
Drup: that FAQ item is childish, not an actual answer
<Drup>
gasche_: no it's not.
<Drup>
gasche_: but I think you get the point.
<gasche_>
I don't think there is a valid point in that faq item
gasche has quit [Write error: Broken pipe]
hcarty has joined #ocaml
gasche_ is now known as gasche
iZsh has joined #ocaml
Yoric has quit [Ping timeout: 245 seconds]
vpm has joined #ocaml
eikke has quit [Ping timeout: 268 seconds]
jcao219 has quit [Read error: Connection reset by peer]
ollehar has quit [Read error: Operation timed out]
mcclurmc has quit [Read error: Operation timed out]
ttamttam has quit [Read error: Operation timed out]
raichoo has quit [Quit: Lost terminal]
ontologiae has quit [Ping timeout: 264 seconds]
osnr1 has joined #ocaml
tianon has quit [Quit: "I'm a very important man. I've got a tower!"]
ttamttam has joined #ocaml
Neros has joined #ocaml
<hcarty>
adrien: I'm not sure there is a time since programming began that predates brogramming, at least the exclusive club aspect.
<hcarty>
adrien: The term, yes. But not the sentiment.
csakatoku has quit [Remote host closed the connection]
ttamttam has quit [Quit: ttamttam]
_andre has quit [Quit: leaving]
<gasche>
hcarty: would you provide patches for the Ord stuff?
<gasche>
it's not hard but my plate is full now
pootler_ has quit [Read error: Operation timed out]
travisbrady has quit [Quit: travisbrady]
_andre has joined #ocaml
pootler__ has quit [Ping timeout: 264 seconds]
mk270_ is now known as mk270
<amiller_>
still trying to figure out how to look up the type corresponding to a Tvar variable in the environment
<amiller_>
tried this, it didn't work either: Env.lookup_type (Longident.Ldot (Untypeast.lident_of_path path, v)) env
<amiller_>
maybe i should try to dump the keys in the environment to see if it's even available
osnr1 has quit [Quit: Leaving.]
Kakadu has joined #ocaml
<hnrgrgr>
amiller_: Tvar is Tvar and nothing else.
<amiller_>
hnrgrgr, yes but if the tvar is in a closed typ_expr it should have an entry in the env, right
<hnrgrgr>
nope
<adrien>
hcarty: I see no occurence of brogramming before a decade ago
<amiller_>
oh :/
<adrien>
that it's a field with many more males than females, that, yes
<adrien>
but that's not what I call brograming
<amiller_>
well then... i am not sure how else to traverse this type tree to see what the tvars are inferred to be :/
<hnrgrgr>
if the type is closed, it is probably a generalized variable.
<gasche>
amiller_: after type inference, you shouldn't find unification variables around
<hnrgrgr>
Tvar are mutated when unified.
<amiller_>
hrm.
<hnrgrgr>
though, Ttyp_var aren't.
<amiller_>
maybe i am looking at a typetree before unification has occurred or something like that?
<amiller_>
eh that doesn't seem likely either
tiripamwe has joined #ocaml
<amiller_>
i know that the information is 'there' at this point because when i try to print out the type_exp at hand, using Printtyp.type_expr, i get the following in my example
<amiller_>
tree'a authtype -> 'a'a'a(tree * int * tree) authtype'a -> 'a -> bool intint
Drup has quit [Ping timeout: 240 seconds]
ccasin has joined #ocaml
raichoo has joined #ocaml
pootler_ has joined #ocaml
pootler__ has joined #ocaml
<hnrgrgr>
amiller_: I've just reread the Printtyp.type_expr implementation, and its seems Tvar could only be printed as 'a.
<hnrgrgr>
try with Printtyp.raw_type_expr also, but you may not print and explore the same type expression.
<amiller_>
oh wow interesting i didn't see raw_type_expr but that's nicer
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
<amiller_>
it's still strangely interleaved
Kakadu has quit []
Kakadu_ has joined #ocaml
Yoric has joined #ocaml
Drup has joined #ocaml
<hcarty>
gasche: Yes, I plan on submitting patches. I wanted to enter the requests so I don't forget.
gautamc has quit [Read error: Connection reset by peer]
<hcarty>
adrien: Not the male/female balance, but the generally exclusive attitude.
gautamc has joined #ocaml
<adrien>
hmm, ok
<adrien>
I looked it up and the definition I most agree with is "fraternity culture" which I believe is fairly new
skchrko has quit [Remote host closed the connection]
osnr has quit [Quit: Leaving.]
ggole has quit []
<gasche>
amiller_: did you comment on the bugtracket items for the issues you discovered?
<amiller_>
gasche, there was already a patch posted
<amiller_>
i had nothing to add
<amiller_>
you also had commented on the ticket :p
<gasche>
it's still interesting to get information about other people that are affected by the issue
<amiller_>
okay :)
<gasche>
(it helps for bug prioritization)
pootler_ has quit [Ping timeout: 256 seconds]
<gasche>
I'm afraid I personally already have too much things to do (or I do them too slowly) to look at this in the short-term
pootler__ has quit [Ping timeout: 248 seconds]
<gasche>
amiller_: are you confident this patch is enough, that is there are no other unary-tuple issues hiding between parsetree and typedtree?
<amiller_>
i guess i'm really only aware of what i've encountered, i feel rather like i'm stumbling blindly through a corridor
<amiller_>
there was already an analogous patch made for values so i see no trouble in adopting this
<gasche>
if you have time and interest to do an exhaustive search for tuple manipulations, and make sure there are no issues of this kind remaining, that would be very useful
<gasche>
also there was a related bug reported by Jun Furuse ( #5728 ) that calls for a better printing of unary tuples
<gasche>
again, if you're interested, having a patch to print them as, say, "(t*)" could be helpful
<gasche>
(NB: that could be a controversial change and it may very well be disliked by the typesystem maintainer(s) and not be included in the end; but having a patch to move forward in the discussion would still help)
<amiller_>
i can't figure out why in the -annot dump output i see exactly the type i want, which is (tree * int * tree) authtype -> tree * int * tree
ollehar has joined #ocaml
<amiller_>
but when i try to print the actual type in the typedtree while traversing it myself everything just stops at authtype (Tvar a) effectively
yacks has joined #ocaml
Yoric has quit [Ping timeout: 264 seconds]
Yoric has joined #ocaml
rixed has quit [Remote host closed the connection]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
<amiller_>
is there a way of querying the annot file rather than traversing the typedtree
pootler_ has joined #ocaml
pootler_1 has joined #ocaml
Anarchos has joined #ocaml
skchrko has joined #ocaml
<gasche>
amiller_: it's strange because people seem to like traversing the typedtree (as saved in .cmt) better than working with .annot files
<gasche>
(I can't personally comment as I mostly don't know this part of the compiler)
<Anarchos>
gasche: i never used both
<amiller_>
are there any other blogposts or mailig list entries or somethig you can recommend
<gasche>
have you had a look at Jun's new ocamlspotter implementation, that relies on .cmt iirc? There may be interesting snippets to reuse and help you there
<amiller_>
for typetree traversing
<gasche>
well
<gasche>
I would look into the sources of people doing that: ocamlspotter and merlin
<gasche>
(merlin is not using the .cmt output, rather tweaking the type-checker directly, so that's more messay and probably less easy to read)
<amiller_>
ok
<amiller_>
the ocamlspotter blogpost is basically my only source of an inkling that this might be possible
<amiller_>
i guess i can't figure out which other of these repos is relevant
<amiller_>
studying read_cmt now
<amiller_>
ah it also just punts to Styps.dump
osnr has quit [Quit: Leaving.]
wormphlegm has quit [Ping timeout: 264 seconds]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
<amiller_>
maybe i'm looking at this wrong, and the relevant output from the annot is actually the subtypes for a "Texp_apply" rather than the Texp_ident i have assumed it was
<amiller_>
maybe the Texp_ident doesn't carry the unified type which is why i just end up with a var, but maybe the apply does
<amiller_>
no that can't be it, that also just has subexpressions one of which will be the ident
tiripamwe has joined #ocaml
<amiller_>
i think the weird interleaving i observe is related to add_delayed, and the comment "(* Make the names delayed, so that the real type is printed once when used as a proxy *)"
<amiller_>
ermf that's only for tpoly and not tvar
ollehar1 has joined #ocaml
osnr has quit [Quit: Leaving.]
tiripamwe has quit [Remote host closed the connection]
vext01 has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
tane has quit [Quit: Verlassend]
mika1 has joined #ocaml
dsheets has quit [Ping timeout: 260 seconds]
_andre has quit [Quit: leaving]
<vext01>
here's an odd an question
<vext01>
is there a way to introsepctively iterate the possible constructors of a varient type?
<amiller_>
now i'm really confused why Printtyp.names is an unbound value but Printtyp.raw_typ_exp is fine
<travisbrady>
Anyone aware of any async_parallel write-ups or example code?
nlucaroni has quit [Quit: leaving]
emmanuelux has joined #ocaml
bkpt has joined #ocaml
Snark has quit [Quit: leaving]
travisbrady has quit [Quit: travisbrady]
Kakadu_ has quit []
<Drup>
vext01: since variant are represented by number at runtime and there is no more "type" information, no. What was your goal ?
mika1 has quit [Ping timeout: 268 seconds]
travisbrady has joined #ocaml
contempt has quit [Remote host closed the connection]
<vext01>
Drup: back to the fun stack calc
<vext01>
i wanted to associate with each operator, a help message
<vext01>
each operator corresponds to one construtcor of a varient type
<Drup>
Do a list :)
<vext01>
yep
<vext01>
i instantiate one of each operator
<vext01>
and patter match upon it
<vext01>
nasty, but workd
mika1 has joined #ocaml
<amiller_>
how can i look up a type variable in the environment
<amiller_>
if i have a Tvar i have a string to represent the variable
<amiller_>
but not an ident.t
Nahra has joined #ocaml
Nahra has quit [Changing host]
Nahra has joined #ocaml
tianon has joined #ocaml
contempt has joined #ocaml
Nahra has quit [Quit: Lost terminal]
pootler_1 has quit [Ping timeout: 256 seconds]
pootler_ has quit [Ping timeout: 264 seconds]
Yoric has quit [Ping timeout: 268 seconds]
pootler_ has joined #ocaml
pootler__ has joined #ocaml
mika1 has quit [Quit: Leaving.]
UncleVasya has quit [Quit: UncleVasya]
chambart has joined #ocaml
travisbrady has quit [Quit: travisbrady]
Anarchos has quit [Quit: Page closed]
ollehar1 has quit [Ping timeout: 268 seconds]
troydm has quit [Quit: What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset]
travisbrady has joined #ocaml
troydm has joined #ocaml
xavierm02 has quit [Remote host closed the connection]
chambart has quit [Ping timeout: 256 seconds]
smondet has quit [Quit: Leaving]
tane has joined #ocaml
gnuvince has quit [Ping timeout: 245 seconds]
travisbrady has quit [Quit: travisbrady]
osnr has quit [Quit: Leaving.]
ollehar has quit [Ping timeout: 268 seconds]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
<nicoo>
gasche: Refering to it as « WTF Public Licence » usually makes it workplace-compliant.