<lucasem>
is there a function that takes any number of arguments and just returns unit?
ryanartecona has joined #ocaml
jmiven has quit [Quit: co'o]
jmiven has joined #ocaml
<lucasem>
welp, I'll just Printf.fprintf to /dev/null
wtetzner has joined #ocaml
_snhmib has quit [Ping timeout: 260 seconds]
shinnya has quit [Ping timeout: 260 seconds]
jamesst20 has joined #ocaml
FreeBirdLjj has joined #ocaml
larhat has quit [Read error: Connection reset by peer]
larhat has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
FreeBirdLjj has quit [Ping timeout: 255 seconds]
silver has quit [Read error: Connection reset by peer]
jabroney has quit [Quit: Leaving.]
jamesst2_ has joined #ocaml
jamesst20 has quit [Read error: Connection reset by peer]
jamesst2_ has quit [Client Quit]
aerioux has joined #ocaml
<aerioux>
does anyone know of an implementation of a List Interface backed by a Tree?
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
moei has quit [Read error: Connection reset by peer]
moei has joined #ocaml
wtetzner has quit [Remote host closed the connection]
inr has quit [Ping timeout: 245 seconds]
mfp has quit [Ping timeout: 260 seconds]
d0nn1e has quit [Ping timeout: 255 seconds]
d0nn1e has joined #ocaml
yomimono has quit [Ping timeout: 260 seconds]
inr has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
wtetzner has joined #ocaml
wtetzner has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
____________ has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
cbot has quit [Quit: This computer has gone to sleep]
mengu has quit [Remote host closed the connection]
wtetzner has joined #ocaml
mengu has joined #ocaml
wtetzner has quit [Remote host closed the connection]
mengu has quit [Ping timeout: 260 seconds]
<clockish>
Is there any type annotation I can add to (fun x -> x) that makes let myprintf : 'a. ('a, out_channel, unit) format -> 'a = (fun x -> x) Printf.printf;; work? And whether or not it's possible, what's the technical term for that feature?
govg has joined #ocaml
wtetzner has joined #ocaml
vramana has joined #ocaml
wtetzner has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
FreeBirdLjj has joined #ocaml
AlexDenisov has joined #ocaml
malina has quit [Ping timeout: 260 seconds]
jao has quit [Ping timeout: 260 seconds]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FreeBirdLjj has quit [Remote host closed the connection]
<companion_cube>
but clearly the time is eaten by minikanren :p
<kakadu>
on this stack trace, yes
<kakadu>
I'm just very sad that my OCaml implementaion is twice slower than racket
<kakadu>
I want to know why
<companion_cube>
probably depends on how you represent the variables, substitutions, unification, etc.?
<kakadu>
and lazy lists!
<companion_cube>
hum, where do you need lazy lists?
<kakadu>
Interleaving search
<companion_cube>
ah
mengu has quit [Remote host closed the connection]
<companion_cube>
let (!!!) = Obj.magic;;
<companion_cube>
oh my.
<kakadu>
We have polymorphic unification under the hood in the same manner as polymorphic comparison and equality are implemented
<kakadu>
I already have some crazy ideas about implementing it for some concrete types in C using some SIMD instructions.
<companion_cube>
this looks extremely dirty :/
<companion_cube>
good luck not segfaulting
<kakadu>
yeah, we thought about it a lot
<companion_cube>
also, you use objects quite a lot, it seems; they have some runtime penalty if used in inner loops
<kakadu>
objects?
<kakadu>
Obj module?
<kakadu>
Yeah, we use Obj module a lot. We can I read more about this runtime penalty?
<Drup>
which function in Obj ?
<kakadu>
Drup: Is it a question for me?
<Drup>
yes
<flux>
I remember there was some ocaml PR? about adding inline assembler as externals to ocaml
<flux>
I think SIMD was one of the use cases
<flux>
ah, it was a presentation at ICFP 2015
<flux>
I guess that's the end of it.. :)
<Drup>
flux: and dismissed, because considered highly fugly
<kakadu>
we use many of them: repr because it is obvious, is_block/is_int in occurs_check and traversal, `tag` for unification and occurs_check, and also field for traversal
<Drup>
kakadu: well, there it is
<Drup>
tag is slow, and most of the others are implemented with tag
<Drup>
(I don't even understand why you implement things like that, it's insane)
FreeBird_ has quit [Remote host closed the connection]
<kakadu>
How to make it faster?
<kakadu>
When I find myself in times of trouble Mother Mary comes to me Speaking words of wisdom ... write in C?
<Drup>
or just use a reasonable implementation ? Why are you using Obj.tag ?
<Drup>
(and all the others Obj stuff)
<kakadu>
How _you_ will implement _polymorphic_ unification?
<Drup>
.... with an explicit representation of terms ?
<Drup>
(I still don't know what you are actually doing, you never really explained)
<kakadu>
well, okay
<kakadu>
Ever heard about miniKanren? Something like Prolog but with interleaving search and shallow embedding?
<kakadu>
It is something from the world of relational programming: represent program as formula and get an ability to run it in any direction. Typechecker is also an inhabitance checker
<kakadu>
and evaluator of pattern matching is also exhaustivness checker (everything is based on symbolic interpretation)
<kakadu>
So, we have an unification there and we need to implement it
<kakadu>
MiniKanrens usually implemented in LISPs, so they put logical variables and symbols and lists and other stuf together without any order and run polymorphic unification and it kind of works
FreeBirdLjj has joined #ocaml
<kakadu>
In OCaml we need some stuff for actual values and some stuff for logical variables (which will be substituted into other values or variables, some occurs_check, some constraints on variables, etc.)
<kakadu>
So, the programmer in OCaml has two ways to define some types
<kakadu>
Straightforward approach is type lam = V of string | App of t*t | MetaVarLam of logic | Abs string * t | MetaAbs logic * lam
<kakadu>
so, he kind of need to think ahead where some logical variables can be and prepare types. And if some logical variables suddenly appear in a bad place (for example the one forgot to support a case when logical variable can be under lambda-abstraction) it will not compile and it is needed to adjust types
<kakadu>
There is another approach
<kakadu>
type 'a logic where 'a is withness of the type which is represented by logical variable
<kakadu>
basically 'a logic can be either a logical variable (with some index for simplicity) or a Value which holds type 'a
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<kakadu>
now we get generic lambda: type ('a,'b) glam = Var of 'a | Abs of 'a * 'b | App of 'b * 'b
<kakadu>
and from this we can get original type lam : type lam = (string, lam)glam
<kakadu>
Also we can specify type parameter to be logic values and get logic lambda term where some parts can be substituted we logic variables
<kakadu>
and on this we run out conjunctions, disjunctions, unification and stuff. And in the end we apply gotten substitution for requested logical variables and get some value with (maybe) free logical variables in it. It will have type of `logical lambda`.
<kakadu>
This approach doesn't force programmer to write his own unification for every type. We can use polymorphic unification in the same manner is LISPs do this
eimpec has joined #ocaml
<kakadu>
val (===): 'a -> 'a -> Env.t * Subst.t as state -> state Stream.t
<kakadu>
So, we need to implement polymorphic unification (===) in the same manner as LISP does
<kakadu>
And OCaml has poly compare and (=) and we want to reuse it. Because without this it can be implemnted enven in Haskell :)
kolko has joined #ocaml
<kakadu>
So, the idea is that if under the hood we use a lot of Obj module but doesn't expose it out of library -- we are fine
<zozozo>
as a general rule, I tend to avoid polymorphic equality when performance is a concern
AlexDenisov has joined #ocaml
<kakadu>
Yeah, it can be easy to write equality but unification of trees can be more complex
<kakadu>
but anyway, even with polymorphic equality OCaml should not be slower than Racket. Because there are two types of programmers: the ones who write in OCaml, and other who are dreaming to write in OCaml
<companion_cube>
but scheme has reflection built in, in a way
<companion_cube>
whereas in OCaml you're not supposed to manipulate values in such unsafe ways
dxtr_ has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
dxtr has quit [Ping timeout: 255 seconds]
dxtr_ is now known as dxtr
<kakadu>
Yeah, I read that OCaml's mutable records are slower than immutable ones. But I want to know what is happening in this case. And I don't want to beleive that reflection is faster that is_int p & 0x1 and tag p = (p>>1) & 0x10
<kakadu>
no, 0x100
<kakadu>
because tag is byte
<kakadu>
no, it is not
<kakadu>
I'm screwed
<kakadu>
we can have only 255 different constructors for adt, right?
<zozozo>
not really
<kakadu>
btw, Drup, Have I explained what I'm doing?
<zozozo>
you can have as many constructors without argument as native integers, and constructors with arguments are limited to about 250 iirc (since no_scan_tag is 251)
<kakadu>
Yeah, because constructors all without arguments have tag 0
<kakadu>
I meant 255 is upper bound, probably unreachable
<zozozo>
constructor without arguments are represented as integers, whils constructors with arguments are blocks with a tag indeed
<kakadu>
Yeah, you are right
<kakadu>
I sometimes have a crazy idea to declare my logic type to have tag very high, like 240, to save up some time by checking only by tag that this block is a logical variable
<zozozo>
I still don't understand why you need all this crazy Obj manipulations
kolko has joined #ocaml
<kakadu>
to have _single_, _polymorphic_ unification function
<zozozo>
well, I also don't really understand why you need to make you type polymorphic, but in any case, why not have an unification function which takes unification function for you type parameters ?
<kakadu>
1) How you propose to distinguish logical varible from normal value? 2) Do you expcet this approach to be faster?
mfp has joined #ocaml
<companion_cube>
what's a unification variable in OCaml anyway?
<zozozo>
so do I understand right, thazt you have both logical variables, *and* normal variables ? and the unification should only unify logical variables ?
<kakadu>
zozozo: Logical variables and normal OCaml values, yes
francoisbabeuf has joined #ocaml
<kakadu>
at the moment logical variable is InnerVar of _*_*_*_ and we check the first two elements of tuple to be sure that it is a logical variable
<zozozo>
then would something like : typr var = Normal of stirng | Logic of (..) type term = Var of var | Abs of var * term | App of term * term not be enough ?
<kakadu>
companion_cube: Have I answered your question?
<francoisbabeuf>
When attempting to build something using oasis, I get an error that it could not find dllctypes_stubs.so which I have installed using opam. How do I inform oasis about its location?
kolko has joined #ocaml
<companion_cube>
francoisbabeuf: no idea, really, but for ctypes you probably need to use myocamlbuild.ml
<companion_cube>
look at existing github projects t o see how
<francoisbabeuf>
Ok, thanks
<companion_cube>
kakadu: yeah, I guess
<companion_cube>
I'm not sure minikanren is well suited to OCaml…
<francoisbabeuf>
I wrote a language very like minikanren in sml years ago
<kakadu>
zozozo: This is a default approach used by everybody except us (I think). There you need to predefine types that you will use during execution (which is not very good). Also in the current type you writterm you lose type information about what type is logical variable can hold. So you are albe to unify two local variable where one is string and another is int, which is not really typesafe
ygrek has quit [Ping timeout: 240 seconds]
<kakadu>
companion_cube: Why do you think so?
<zozozo>
kakadu: ah well, of course, in conrete use you wrap everything in records
<flux>
kakadu, something completely off-topic, does lablqt work with QQuickView?
<kakadu>
flux: It should
<kakadu>
companion_cube: Do you know how to deal with https://paste.in.ua/2459/raw/ ? I read somewhere that some CPU models can forbit using some counters like cycles... It scaries me very much
<flux>
kakadu, cool. I guess I finally have a use case for it then :)
bobbypriambodo has quit [Remote host closed the connection]
bobbypriambodo has joined #ocaml
al-damiri has joined #ocaml
neo_ has joined #ocaml
larhat has joined #ocaml
bobbypriambodo has quit [Ping timeout: 260 seconds]
yomimono has quit [Ping timeout: 255 seconds]
dhil has joined #ocaml
yomimono has joined #ocaml
eimpec has quit [Quit: WeeChat 1.4]
neo_ has quit [Remote host closed the connection]
<Drup>
kakadu: Obj.tag is also really slow
<Drup>
I personally think that doing what you are doing in a polymorphic way by inspect objects at runtime is extremly dodgy at best, and you should .... just not do things polymorphically (use an extensible sum types, or modular implicits, or anything like that)
<kakadu>
Drup: very slow because it is a C call?
<Drup>
just because of how tag are represented
minn has quit [Quit: Leaving]
wtetzner has joined #ocaml
wtetzner has quit [Remote host closed the connection]
<kakadu>
Folks, should I report cases when semantically equivalent code is being generated to different assembly? addq/decq vs lea. https://paste.in.ua/2460/
<kakadu>
Intuition says that we can't say a priori which is better
jao has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yomimono has quit [Ping timeout: 260 seconds]
yomimono has joined #ocaml
AlexDenisov has joined #ocaml
malina has joined #ocaml
Denommus has joined #ocaml
jlongster has joined #ocaml
yomimono has quit [Ping timeout: 268 seconds]
zpe has quit [Remote host closed the connection]
dhil has quit [Ping timeout: 260 seconds]
yomimono has joined #ocaml
francoisbabeuf has quit [Ping timeout: 260 seconds]
Armael has quit [Quit: WeeChat 1.4]
dch_ has quit [Quit: ZZ]
noddy has quit [Ping timeout: 268 seconds]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
shinnya has joined #ocaml
yomimono has quit [Ping timeout: 240 seconds]
sh0t has joined #ocaml
jabroney has joined #ocaml
dhil has joined #ocaml
mfp has quit [Ping timeout: 260 seconds]
noddy has joined #ocaml
francoisbabeuf has joined #ocaml
rgrinberg has joined #ocaml
noddy has quit [Ping timeout: 260 seconds]
yomimono has joined #ocaml
Xadnem has quit [Ping timeout: 240 seconds]
Xadnem has joined #ocaml
noddy has joined #ocaml
flux has quit [Ping timeout: 255 seconds]
yomimono_ has joined #ocaml
yomimono has quit [Read error: Connection reset by peer]
<companion_cube>
it's a bit weird, I'm starting to consider even `==` as unsafe -_-
th5 has joined #ocaml
<Drup>
companion_cube: well, it breaks parametricity, so ...
<companion_cube>
heh, I don't really care for that
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
flux has joined #ocaml
francoisbabeuf_ has joined #ocaml
francoisbabeuf__ has joined #ocaml
flux has quit [Ping timeout: 240 seconds]
francoisbabeuf has quit [Ping timeout: 260 seconds]
francoisbabeuf_ has quit [Ping timeout: 260 seconds]
francoisbabeuf__ has quit [Ping timeout: 260 seconds]
ryanartecona has joined #ocaml
Xadnem has quit [Read error: Connection reset by peer]
<orbifx>
ow can oasis be told to build debug or not? can there be an optional make target?
dhil has joined #ocaml
dch_ has quit [Remote host closed the connection]
ryanartecona has quit [Read error: Connection reset by peer]
ryanartecona has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
slash^ has joined #ocaml
<orbifx>
anyone?
<kakadu>
I don't know
<kakadu>
Do you really need non-debug build? executable's size matter?
malina has quit [Remote host closed the connection]
<orbifx>
I'd say so
<kakadu>
Is it okay to disable debug information in _tags manually?
* kakadu
is kind of curious is it possible at all
<Drup>
orbifx: if you mean -g, oasis adds it by default
<Drup>
(and it's a good thing)
d0nn1e has quit [Ping timeout: 240 seconds]
<kakadu>
I think that he wants to disable it
<orbifx>
Drup: yes I'd like to know if I can disable it. Also I would like to be able to turn on-off debug messages in my application
jnavila has joined #ocaml
<orbifx>
besides, it's one thing providing debug symbols and another disabling debug messages
<orbifx>
is there a way to achieve the latter?
<Drup>
I would tend to say that debug messages should not be decided at compile time
<Drup>
so, provide an internal switch in your library
<Drup>
(and expose it as a command line flag, for executables)
francoisbabeuf__ has joined #ocaml
<Drup>
(as for debug symbols ... just don't remove them, you'll make everyone's life easier)
<orbifx>
this are development debug messages, they shouldn't exist really
<orbifx>
there are debug messages which help troubleshoot the configuration or instance of an application and there are debug messages which exist until a function is proven right
<orbifx>
almost like assertions, but for the programmer to see
<orbifx>
they exists because of initial low trust towards the code and removed as trust is achieved
<orbifx>
does OASIS provide for that?
<Drup>
oasis doesn't provide anything pre-made for this use case. You can add things using either ocamlbuild or file AB
<orbifx>
file AB?
d0nn1e has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
ryanartecona has joined #ocaml
jnavila has quit [Ping timeout: 255 seconds]
ygrek has joined #ocaml
octachron has joined #ocaml
tane has quit [Quit: Leaving]
dch_ has joined #ocaml
freusque has quit [Quit: WeeChat 1.7]
fds_ is now known as fds
TheLemonMan has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
slash^ has joined #ocaml
infinity0 has quit [Ping timeout: 260 seconds]
jnavila has joined #ocaml
infinity0 has joined #ocaml
freechips has quit [Ping timeout: 240 seconds]
infinity0 has quit [Remote host closed the connection]
jao has quit [Remote host closed the connection]
yomimono_ has quit [Ping timeout: 260 seconds]
jao has joined #ocaml
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Changing host]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
octachron has quit [Quit: Leaving]
<orbifx>
in Toml, parsing returns a polymorphic variant instead of a variant or an option. What are the advantages and rationale behind this?
<orbifx>
I can see that option would not allow for an error message
<orbifx>
but why polymorphic variants of just variants?
freechips has joined #ocaml
bacam has quit [Quit: reboot]
bacam has joined #ocaml
rgrinberg has quit [Remote host closed the connection]
ohama has quit [Remote host closed the connection]
ohama has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
dhil has quit [Ping timeout: 268 seconds]
freusque has joined #ocaml
<flux>
I don't recall the interface, but would there be then a number of variant types?
francoisbabeuf__ has quit [Ping timeout: 260 seconds]
<orbifx>
`Ok .. | `Error ..
<companion_cube>
it was common before `result` became standard
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
ryanartecona has joined #ocaml
<reynir>
`Ok vs `OK /o\
<flux>
`oK if you want to emphasize the K
mengu has joined #ocaml
<reynir>
haha
<reynir>
D:
_whitelogger_ has joined #ocaml
_whitelogger has quit [Remote host closed the connection]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
francoisbabeuf__ has joined #ocaml
th5 has quit [Remote host closed the connection]
jnavila has quit [Remote host closed the connection]
_andre has quit [Quit: leaving]
noddy has joined #ocaml
<orbifx>
hahah
<orbifx>
laters folk
orbifx has quit [Ping timeout: 240 seconds]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
kolko has quit [Ping timeout: 268 seconds]
Madars has quit [Quit: Leaving.]
Madars has joined #ocaml
dch_ has quit [Remote host closed the connection]
dch_ has joined #ocaml
Simn has quit [Read error: Connection reset by peer]
kakadu has quit [Remote host closed the connection]
kolko has joined #ocaml
Denommus has quit [Ping timeout: 255 seconds]
mengu has quit [Remote host closed the connection]
Ptival has joined #ocaml
Ptival has quit [Client Quit]
Ptival has joined #ocaml
jamesst20 has joined #ocaml
<jamesst20>
Hi
<jamesst20>
I am having an error at line 17 and I can't understand why it's happening. The arrow points the parameter n. "Error: This expression has type arbre but an expression was expected of type 'a list -> arbre * char list" http://pastebin.com/YUaWHHD7
<jamesst20>
Would anyone be able to help me ?
ryanartecona has quit [Quit: ryanartecona]
yomimono_ has joined #ocaml
octachron has joined #ocaml
ryanartecona has joined #ocaml
tg has quit [Quit: Leaving]
<octachron>
jamesst20, you are missing a comma at line 12 "match a lc with"
espinoza has joined #ocaml
<jamesst20>
octachron: I don't see where ?
<octachron>
(a, lc) instead of (a lc)
<espinoza>
hey -- longshot question. has anybody used the curses package with unicode strings? filling my screen with gibberish and wondering if anybody has tips. thx!
<jamesst20>
octachron: Omg you are right !
<jamesst20>
octachron: I don't understand why, I kept reading and it didn't look wrong in my mind. Thank you so much, sometimes a second eye can save a life haha
<octachron>
jamesst20, a useful step in that kind of situation is to annotate the type of the function when you have strange error like that
tg has joined #ocaml
<jamesst20>
octachron: What does annotate mean ? (Sorry my english is still not perfect :( )
<octachron>
like this the type error are caught sooner, and the type checker does not goes on a tangent imagining types that you would not dream off
<Drup>
espinoza: don't use the curses package, it's crap
<jamesst20>
I see, but how do you annotate ?
<Drup>
(because curses is crap)
<octachron>
jamesst20, (annoter en français), i.e transform let f x ⇒ let f (x:int) : result_type = …
<jamesst20>
octachron: Oh yeah ! Got it ! Like forcing a type :)
<Drup>
If you want to make Terminal UIs, use either lambda-term (for UIs with buttons and stuff) or notty (for "full terminal" visualisations)
<espinoza>
Drup: yeah i hate it... is there an alternative though? this is something that i've done w python's curses bindings so i'm hoping there's a way
<espinoza>
Drup: oh whoah thanks!
<espinoza>
will check these out
<Drup>
They are both very good and support unicode very well
<espinoza>
Drup: looks like it. seems like notty is for me. thanks a ton!
<Drup>
What are you doing ?
<jamesst20>
octachron: Let's say I want the traverse function return 'a * 'b * 'c, could I have done it this way ? let rec traverse a lc : ('a, 'b, 'c) = match a, lc with
<octachron>
jamesst20, yes, this should work
<jamesst20>
octachron: I get Error: Syntax error, points to the '='
mengu has joined #ocaml
<octachron>
jamesst20, sorry: ('a * 'b * 'c) for tuples at the type level
wtetzner has joined #ocaml
<espinoza>
Drup: messing around with cellular automata. just for fun
<espinoza>
learning ml
<jamesst20>
octachron: Yep you're right :) I don't know why, even if I force the typing, the line 18 says This expression has type 'a * 'b * 'c but an expression was expected of type unit http://pastebin.com/wb4stGge
<octachron>
Drup, out of curiosity, how well supported are unicode character with exotic widths (e.g. 山 ?)
<octachron>
jamesst20, what is supposed to happen when "fl ≠ '#'" ?
<jamesst20>
octachron: ohh well it shouldn't ever happen but that's why?
mengu has quit [Ping timeout: 260 seconds]
<octachron>
jamesst20, yes, if the "else" is missing "if … then … " is assumed to have type unit
<espinoza>
seems like notty has thought this stuff thru - there's a section called Unicode vs. Text Geometry here http://pqwy.github.io/notty/Notty.html
<jamesst20>
octachron: You're right, it just fixed it. Thank you for helping me learning OCaml by the way
<Drup>
yeah, notty is a bit more recent and uses a more modern library for unicode
<Drup>
(lambda-term would deserve a bit of an update on that)
<octachron>
espinoza, "and is a matter of luck for abugidas" I forgot that hindic-like language can be even worse than ideographic ones. But it is nice to know that the issue was taken in account
<octachron>
jamesst20, you are welcome
<jamesst20>
octachron: It works, but it says "Warning 8: this pattern-matching is not exhaustive.Here is an example of a case that is not matched: (Noeud (_, _), [])" http://pastebin.com/5M8DrXBV
<jamesst20>
octachron: oh nvm
<jamesst20>
octachron: another case that should not happen haha
ryanartecona has quit [Quit: ryanartecona]
<jamesst20>
What is the difference between a match (_, _) and (a, b) ?
J has joined #ocaml
<jamesst20>
and does Match order makes any difference?
J is now known as Guest2650
<Guest2650>
Hello guys, is there someone here ?
<jamesst20>
Yes
<dinosaure>
jamesst20: yes, match x with n -> () | 21 -> (), the second case is useless
<chelfi>
using _ instead of a variable name disables unused variables warnings
<jamesst20>
dinosaure: Thank you :) and between match (_, _) and (a, b), is there any difference ?
<jamesst20>
chelfi: that's all it does ?
<dinosaure>
that's all, no diff afterwards :)
<thizanne>
jamesst20: let first x = match x with (a, b) -> a
<thizanne>
if you match against (a, b), you can use a and b
<thizanne>
first could also be written matching w with `(a, _)`, since you don't use b anyway
<Guest2650>
So, I'm basically new to OCaml, and i have some issues using it.
<thizanne>
but you couldnt use (_, _), because then you have no name for the first element to be returned
<jamesst20>
thizanne: dinosaure : I see thank you :)
<Guest2650>
I'm on windows, and whenever i type ocaml in cygwin terminal to launch it, i get the following message : Fatal error : exception Cmi_format.Error(_)
<jamesst20>
Guest2650: You should ask your question, instead of stating you have troubles ;)
<Guest2650>
Yeah ahah, this what i was doing
<jamesst20>
Guest2650: Isn't there an official release, instead of a cygwin port?
<jamesst20>
Guest2650: I don't use Windows, can't help you much, but it's also possible to do OCaml online in case it can save you some time https://try.ocamlpro.com