<companion_cube>
well, I can parse Lwt's _oasis file now
<Algebr>
nice!
dhil has quit [Quit: Quit]
Sim_n has quit [Quit: Leaving]
<gasche>
I don't really understand why you want to remove Menhir and sedlex
<Algebr>
oasis's current error messaging is, well it could use improvement
<gasche>
you can always distribute the postprocessed files if you want less dependencies
walter|r has quit [Remote host closed the connection]
walter|r has joined #ocaml
walter|r has quit [Remote host closed the connection]
doecnt has quit [Ping timeout: 276 seconds]
Reshi has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
mistermetaphor has quit [Remote host closed the connection]
walter|r has joined #ocaml
wolfcore has quit [Ping timeout: 244 seconds]
jknick has quit [Ping timeout: 260 seconds]
wolfcore has joined #ocaml
jknick has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 240 seconds]
Reshi has quit [Ping timeout: 240 seconds]
snhmib has quit [Ping timeout: 244 seconds]
jeffmo has joined #ocaml
bba has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Reshi has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
jeffmo has quit [Quit: jeffmo]
walter|r has quit [Remote host closed the connection]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 276 seconds]
struktured has joined #ocaml
scarygelatin has quit [Quit: Leaving]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 246 seconds]
ismaelga has quit [Remote host closed the connection]
pyon has quit [Remote host closed the connection]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 240 seconds]
dsheets has joined #ocaml
pyon has joined #ocaml
dsheets has quit [Ping timeout: 260 seconds]
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 240 seconds]
aantron has quit [Remote host closed the connection]
copy` has quit [Quit: Connection closed for inactivity]
noethics has joined #ocaml
Reshi has quit [Ping timeout: 252 seconds]
doecnt has joined #ocaml
mistermetaphor has joined #ocaml
nicholasf has quit [Remote host closed the connection]
Mercuria1Alchemi has joined #ocaml
ggole has joined #ocaml
ggole_ has joined #ocaml
ggole has quit [Ping timeout: 240 seconds]
ggole__ has joined #ocaml
rgrinberg has joined #ocaml
ggole_ has quit [Ping timeout: 252 seconds]
mistermetaphor has quit [Remote host closed the connection]
walter|r has joined #ocaml
nicholasf has joined #ocaml
walter|r has quit [Ping timeout: 250 seconds]
solrize has quit [Ping timeout: 276 seconds]
doecnt has quit [Ping timeout: 252 seconds]
atbagautdinov has joined #ocaml
atbagautdinov has quit [Read error: Connection reset by peer]
atbagautdinov has joined #ocaml
groovy2shoes has joined #ocaml
A1977494 has joined #ocaml
rgrinberg has quit [Ping timeout: 250 seconds]
mistermetaphor has joined #ocaml
ggole has joined #ocaml
ggole__ has quit [Ping timeout: 240 seconds]
ggole_ has joined #ocaml
ggole__ has joined #ocaml
ggole has quit [Ping timeout: 250 seconds]
ggole_ has quit [Ping timeout: 244 seconds]
yegods has quit [Remote host closed the connection]
Sorella has quit [Quit: Connection closed for inactivity]
pierpa has quit [Read error: Connection reset by peer]
pierpa has joined #ocaml
noethics has quit [Ping timeout: 260 seconds]
mistermetaphor has quit [Remote host closed the connection]
noethics has joined #ocaml
tane has joined #ocaml
rwmjones has joined #ocaml
Reshi has joined #ocaml
solrize has joined #ocaml
dwillems has joined #ocaml
pierpa` has joined #ocaml
yegods has joined #ocaml
pierpa has quit [Ping timeout: 250 seconds]
yegods has quit [Ping timeout: 276 seconds]
orbifx has joined #ocaml
slash^ has joined #ocaml
dwillems has quit [Read error: No route to host]
badon has quit [Quit: Leaving]
badon has joined #ocaml
nicholasf has quit [Remote host closed the connection]
copy` has joined #ocaml
A1977494 has quit [Quit: Leaving.]
dwillems has joined #ocaml
jbrown has quit [Quit: Leaving]
jbrown has joined #ocaml
yegods has joined #ocaml
dwillems has quit [Ping timeout: 244 seconds]
yegods has quit [Ping timeout: 240 seconds]
pierpa` is now known as pierpa
silver_ has joined #ocaml
pierpa` has joined #ocaml
pierpa has quit [Ping timeout: 260 seconds]
badon has quit [Quit: Leaving]
AltGr has joined #ocaml
AltGr has quit [Client Quit]
walter|r has joined #ocaml
nicholasf has joined #ocaml
<companion_cube>
gasche: I don't even think you can reasonable parse _oasis files with sedlex+menhir, tbh
Simn has joined #ocaml
walter|r has quit [Ping timeout: 246 seconds]
nicholasf has quit [Ping timeout: 252 seconds]
<noethics>
um
<noethics>
idk how i feel about 31 bit integers
<adrien>
(and signed)
<noethics>
yeah..
<noethics>
wtf
<noethics>
ocaml looked really nice before
<adrien>
but you can also get others
nicholasf has joined #ocaml
<adrien>
Int32, Int64, NativeInt and through Bigarray
<noethics>
are those builtins?
<_y>
yes
<noethics>
ok thx
<_y>
you also have arbitrary precision integers and fractions
<adrien>
there are also others in third-party libs
<noethics>
i still think it's really strange
<noethics>
it says it's for the gc?
<adrien>
yup
<noethics>
do any other languages use a bit from every integer for the gc?
<adrien>
Int32 and Int64 (NativeInt is simply one of these) are slightly slower since they are boxed (although the difference is quickly shrinking due to better optimizations)
<companion_cube>
I think some lisp do
<adrien>
noethics: I don't have an example for you but I'm fairly sure some others do
<noethics>
i see
<adrien>
it's more a question of implementation and runtime than language
<companion_cube>
it's only been a problem for me when implementing hash functions
<noethics>
i see it as a problem for interop
<companion_cube>
otherwise, well, 63 bits is almost as insanely large as 64
badon has joined #ocaml
<noethics>
sure you can make due with 31 bit integers, but it's sort of weird since most other people are using 32 :)
aantron has joined #ocaml
<adrien>
for interop anyway you wouldn't use just "int"
<noethics>
so you then have to take a runtime penalty for boxing Int32s?
<adrien>
because it's either 31 or 63 bits depending on your architecture
<adrien>
plus you have the endianness issue
<adrien>
so you should already have a layer between the various worlds involved
<noethics>
i'm sure i really understand what you're saying
<noethics>
say i send over a 64 bit integer over any pipe or ipc
<noethics>
in a normal language that would not need to be boxed
<noethics>
i'm not sure *
<companion_cube>
it's boxed in many, many GC'd language (most dynamic languages anyway)
<noethics>
maybe go and rust have spoiled me
<noethics>
not that rust is gc'd
<noethics>
;P
<companion_cube>
ah, interesting, I don't know how Go's GC works
<noethics>
it's mark and sweep
<companion_cube>
w.r.t knowing which fields of a struct are pointers and which ones are immediate values
<noethics>
it's explicit
<noethics>
*ptr
<companion_cube>
I mean at runtime
<adrien>
noethics: well, in your IPC, it will be unboxed
<adrien>
it's only boxed in ocaml's heap
<noethics>
adrien, i know
<noethics>
it's just bad/weird
<companion_cube>
noethics: in Go, can you point to the middle of a struct?
<noethics>
or i guess standard
<noethics>
in dynamic languages, i didn't realise
<adrien>
noethics: a performance tradeoff; also note that ...
<noethics>
companion_cube, with unsafe package you could
<pierpa`>
Go uses a conservative GC
pierpa` is now known as pierpa
<companion_cube>
ah, so it assumes anything that looks like a pointer, is a pointer?
<adrien>
# Int32.(add 1l 1l);;
<adrien>
- : int32 = 2l
<pierpa>
companion_cube: yes, exactly
<noethics>
i can't say for sure what it does. those type of specs aren't in the spec
<noethics>
they're purposely left out
<adrien>
(actually this is an old ocaml, I'm wondering if there isn't an even nicer way to do it now)
<noethics>
since they're implementation details
<noethics>
i do know that it does a shitload of auto deferring of pointers behind the scenes
<companion_cube>
noethics: really? I mean, if you have a struct within a struct, as a field, can you point to it?
<noethics>
like you can have a non pointer type, and define a method with a pointer receiver of that type
<noethics>
go will infer methods called on the non pointer to the pointer receiver method
<noethics>
companion_cube, oh yeah sure
<companion_cube>
ah, ok
<noethics>
i thought you meant arbitrary memory offsets
<companion_cube>
no, no
<companion_cube>
so I wonder how they do it, I have no idea how the parent struct stays alive if this ptr is the only one
<companion_cube>
or maybe they store ptr to struct + offset
<noethics>
oh i'm 99% sure that's all determined at compile time via escape analysis
<pierpa>
companion_cube: sorry, I was not current on Go. Go's GC was conservative in the past. Now they say it is precise. Then I don't know how it works
<noethics>
yeah snce 1.5.3 it has gotten buffed
<noethics>
the last two releases were perf related
<noethics>
any way, are there any implementations of ocaml that have normal integers?
<noethics>
with a shittier gc
amnn has joined #ocaml
<companion_cube>
no, and it wouldn't work with "normal" Ocaml anyway
<noethics>
i wouldn't mind
<ggole__>
Go does support interior pointers
<ggole__>
I don't know the exact mechanism
<noethics>
the compiler was recently automatically transpiled from C to go, so gl finding out
<companion_cube>
that's interesting
<noethics>
it's hideous :3
<noethics>
gccgo has some completely different implementation though
<ggole__>
That means there is a distinction in Go between the start of an object and the start of an allocation
<ggole>
Perhaps I should have said in the Go runtime
<mrvn>
noethics: are you running on a 32bit cpu?
<noethics>
mrvn, nope
<mrvn>
then you have 63bit ints.
<noethics>
in ocaml?
<noethics>
i want 64 m8
<mrvn>
noethics: then use int64. you rarely need that.
<noethics>
honestly i don't rarely need it
<noethics>
i need it frequently, because other languages use 64 bits. even if i wanted to use 63 bit types
<mrvn>
they don't actually use all of those 64bit.
<noethics>
and what if some data does?
<noethics>
or eventually does?
<noethics>
breaking systems etc
<noethics>
no thx
<pierpa>
if you need frequently 64bit integers than maybe ocaml is not the right language for you
<pierpa>
*then
<adrien>
I wouldn't say that
<adrien>
we have convenient syntaxes for these
<mrvn>
noethics: if the value can be full 64bit then you use int64.
<mrvn>
noethics: that rarely actually happens.
<noethics>
you keep saying that
<adrien>
even in C where noone would doubt that you can use exactly the sizes you want, you tend to make the widths explicit
<noethics>
i was really, really happy when i found ocaml :P
<noethics>
i love its syntax
<pierpa>
:O
<noethics>
i'll probably use it anyway
<noethics>
but not for anything serious
<noethics>
disappointed by the 63 bit ints
<ggole>
The *syntax* is what you like? O_o
<adrien>
you have two choices: have less safety (C route) or more safety and use a language that can track precision
<noethics>
yup
<noethics>
also metaocaml
<mrvn>
noethics: most functions in C use int, which means they would only have 32bit on a 32bit cpu. They won't be needing all 64bit on a 64bit cpu. and so on.
<ggole>
Each to their own, I suppose.
<adrien>
honestly, ocaml's syntax has quirks but it's good enough :P
<companion_cube>
^
<noethics>
it's about 500000000000x better than go
<noethics>
i fucking hate go's syntax
<adrien>
hahaha :P
<noethics>
also java etc
<noethics>
the closest thing i've used frequently is scala
<noethics>
but jvm is sort of bulky to lug around if you only need it to use a nicer language
<adrien>
the really bad things with ocaml's syntax imho: optional let and the rule about the content of of the "then" clause, and nested match/With
<mrvn>
optional let?
<adrien>
erf
<adrien>
optional else*
<adrien>
:D
<mrvn>
rule about the content of of the "then" clause? isn't that the optional else?
<adrien>
it's linked but I still see the two as slightly separate
<ggole>
I personally like to whinge about the four different application syntaxes
<noethics>
to be fair javascript only has 53 bit ints
<noethics>
so ocaml is 10 bits better in my book
<mrvn>
adrien: then what is the rule?
<adrien>
although it's true that non-optional else would solve it
<noethics>
ggole, what language do you think has the most elegant syntax?
<noethics>
that you know of
<noethics>
and define elegant however you want
<mrvn>
adrien: if you have no else there is an implicit "else ()". Therefore the return type is infered as unit and the "then" branch has to return unit too. No rule involved.
<ggole>
Joy
<mrvn>
noethics: scheme. only 5 pages for the whole language specs.
<noethics>
mrvn, what about typed languages?
<adrien>
mrvn: true
<mrvn>
noethics: types complicate things. you sacrifics elegance for security
<mrvn>
specifically your compiler errors gets unreadable to noobs
<noethics>
mrvn, i accept your answer to my first question. but i impose the constraint of types now for my second question :)
<mrvn>
noethics: then I have to say NOT c++.
<noethics>
typed racket?
<noethics>
haskell?
<noethics>
template haskell?
<noethics>
say something
<noethics>
so i can belittle it
<noethics>
jk <3
myst|fon has quit [Quit: Connection closed for inactivity]
<mrvn>
I find haskell unreadable but that's just lack of practice.
<mrvn>
python syntax is neat.
<noethics>
>_>
atbagautdinov has quit [Quit: atbagautdinov]
<noethics>
GIL of things
<mrvn>
noethics: but what you are asking is like "What color handle does the best knife have?"
<noethics>
meh
<noethics>
i don't think i'm asking that
<mrvn>
What color does the handle of the best knife have?
<noethics>
black
<mrvn>
noethics: you are asking for one small aspect of a language ignoring all others.
<noethics>
mrvn, sure
<noethics>
we could evolve the conversation to something about that language, after we define the languages with the best syntax
<noethics>
a set of possibilities!
<mrvn>
and obviously all here find ocaml the best or they wouldn't be here.
<mrvn>
8-P
<noethics>
haha
<noethics>
that's certainly why i'm here
<noethics>
but other people objected
<ggole>
Or we care about things that are not syntax?
<noethics>
what is good about ocaml
<mrvn>
ggole: I ment that in a broader sense
<mrvn>
noethics: the syntax, the type system, the freedom, FUN
<noethics>
:)
<noethics>
that's what rubyists say too
<mrvn>
other languages have functions, we have FUN
<dmbaturin>
noethics: As long as the syntax doesn't make me cringe, I care about other things first. ;)
<pierpa>
two people in the same days who like the syntax of ocaml!
<pierpa>
*day!
<noethics>
dmbaturin, like what
<mrvn>
noethics: like type safety
<dmbaturin>
Imagine ML with COBOL syntax but preserving all ML semantics. I can totally see myself using it.
<noethics>
mrvn, doesn't ocaml not have type parameters?
<mrvn>
dmbaturin: carefull, only put code in the first 60 chars of each line
<dmbaturin>
Type parameters?
<noethics>
type<T>
<noethics>
type[T]
<noethics>
etc
<mrvn>
noethics: 'a list
<mrvn>
or do you mean type classes?
<noethics>
no, type parameters or bounded types so to speak
<noethics>
in scala you can do LUB etc with type parameters
<mrvn>
noethics: (#foo as 'a) -> 'b list -> 'a list constraint 'b :> 'a
<dmbaturin>
mrvn: Well, I mean in the scala docs page, findSimilar really requires that there is implementation of the Similar type class, not that T is a subtype of anything.
<mrvn>
noethics: excat syntax may varry. types with objects can get hairy.
<noethics>
i see
<mrvn>
dmbaturin: no type classes in ocaml yet. first class modules would suffice there though.
<noethics>
go doesn't have generics either, it's painful because unlike in ocaml where you don't really care
<dmbaturin>
mrvn: I know. I'm talking about the page noethics linked only. :)
<noethics>
it matters more
<dmbaturin>
Speaking of which, I haven't checked what the modular implicits guys are doing for a while.
<mrvn>
noethics: most of the type you don't need a generic, only a polymorphic. I actually miss polymorphics in c++ a lot.
<noethics>
mrvn, yeah most
<mrvn>
s/type/time/
<noethics>
go has polymorphism through interfaces
<noethics>
but they're not type safe like they would be with generics
<noethics>
so, you can express most things you need, except for type bounds of any kind barring explicit implementation of that interface
<mrvn>
noethics: if you need them then you have to use objects, modules or functors.
<dmbaturin>
Go's requirement to downcast everything to interface{} to implement polymorphic datastructures is easily the most off-putting thing in language design I've seen lately.
<noethics>
dmbaturin, it doesn't require that
<dmbaturin>
Even the standard library does exactly that.
<noethics>
that's heavily discouraged
<noethics>
the std lib _has_ to do it
<noethics>
you don't
<dmbaturin>
noethics: Yes, which in effect means polymorphic datastructures are discouraged, and not even ones in the stdlib are type safe.
<noethics>
that's blatantly untrue
<noethics>
dmbaturin, do you know go?
<mrvn>
I know enough go to go away
<noethics>
:D
<noethics>
io.Reader is a really good example of go's polymorphism
<dmbaturin>
Well, suppose I don't. Tell me what makes the built-in polymorphic datastructures typesafe and what is the correct way to implement my own.
<noethics>
dmbaturin, the correct way to implement polymorphism in your own `application` is through concrete types and interfaces
octachron has joined #ocaml
<noethics>
to get true type safety like you would with generics, you need to use type switches in conjunction wth that pattern though
<noethics>
or forego it completely
jeffmo has joined #ocaml
<dmbaturin>
Isn't it just what I said? You can't implement polymorphic datastructures in a typesafe way.
<noethics>
that's what i said originally :) but things like "<dmbaturin> Go's requirement to downcast everything to interface{}" and "<dmbaturin> noethics: Yes, which in effect means polymorphic datastructures are discouraged,"
<noethics>
are weird statements
<dmbaturin>
Why are weird?
<noethics>
false*
aantron has quit [Remote host closed the connection]
TheLemonMan has joined #ocaml
kakadu has joined #ocaml
<dmbaturin>
noethics: Well... Suppose I need a datastructure missing from stdlib, say multiway tree. What should I do?
<noethics>
dmbaturin, write one :P
<dmbaturin>
Ok. Are there other way to allow it to hold elements of any types other than downcasting to interface{} ?
<noethics>
`any` type/
<reynir>
write it N times
<noethics>
haha
<dmbaturin>
Type switches are equivalent to write it in N times actually.
<noethics>
you can't. but that's the point. your tree is to serve a purpose
<noethics>
go is very ad hoc
<noethics>
you can use a type switch, but that would still require boxing the thing.
<dmbaturin>
But, considering these facts, what makes my statements false? :)
<noethics>
it doesn't have to be an empty interface.
<noethics>
the empty interface is something shitty go developers use because they don't understand the type system
<dmbaturin>
You are saying Go stdlib developers are shitty then.
<noethics>
yeah for certain things i believe they were lazy
<noethics>
but it makes sense, the stdlib is huge
<noethics>
you can still box it with an interface, but it is `encouraged` that the interface actually implement some functionality
<dmbaturin>
Did they have another way to emulate parametric polymorphism for built-in containers?
<dmbaturin>
Yes, I did read it. My point is that it was their only way to allow using those containers with any type.
<noethics>
the main list structure you use is slice
<noethics>
the built in primitive
FreeBirdLjj has joined #ocaml
<noethics>
they're extremely powerful and you end up just writing some adhoc data structure that ends up being optimal for what you're doing
<noethics>
that's what go is about imo
<noethics>
but the syntax is horrific and lack of generics is questionable ;D
<companion_cube>
and questioned
<dmbaturin>
Lack of parametric polymorphism is questionable, generics are not even the most appealing way to do it. :)
<dmbaturin>
If 'a list is inferred (or specified) to be "int list" (or "float option list", or...) at some point, there is no way you can accidentally stuff an element of different type into it and run into runtime errors when it's passed to a function that want something else, that's my point.
atbagautdinov has joined #ocaml
dwillems has joined #ocaml
aantron has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 276 seconds]
anoisz has joined #ocaml
anoisz has quit [Quit: Leaving]
slash^1 has joined #ocaml
slash^1 has quit [Client Quit]
FreeBird_ has quit [Remote host closed the connection]
malc_ has joined #ocaml
yegods has joined #ocaml
yegods has quit [Ping timeout: 250 seconds]
M-Illandan1 has joined #ocaml
jun__ has quit [*.net *.split]
M-Illandan has quit [*.net *.split]
chris2 has quit [*.net *.split]
chris2 has joined #ocaml
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jun__ has joined #ocaml
natimic has quit [Ping timeout: 246 seconds]
walter|r has joined #ocaml
walter|r has quit [Remote host closed the connection]
<companion_cube>
gasche: why if the _oasis "spec" was a AST + random generator + printer that exercizes as many cases as possible?
<companion_cube>
this way we could check how much the different parsers agree
<companion_cube>
(a bit like they do for commonMark)
<gasche>
how do you decide which printings are "valid"?
<gasche>
looking at Lwt's _oasis that you mentioned as an example, there seems to be a reasonably clear grammar to me
<companion_cube>
I mean the printer should only print valid content
<companion_cube>
but in all ways that are accepted bu the standard
<companion_cube>
once you have the lexer, it's dead simple, but the lexer is tricky
<gasche>
it's a hierarchical tree, nodes carry either an opaque string payload, a sub-tree, or an expression
<companion_cube>
wait, even then
<gasche>
expressions are marked with $:
<companion_cube>
or if
<gasche>
sub-trees with nothing
<gasche>
and opaque payloads with :
<gasche>
and then the payload is single-line or multi-line (in that latter case, indentation delimits it)
<companion_cube>
but you have to lex differently after :/if or after :
<companion_cube>
(into expression tokens, statement tokens, or opaque blobs)
<gasche>
what does ":/if" mean here, do you have an example?
<companion_cube>
if flag(test) && flag(foo) <-- need accurate lexing
<gasche>
so what do you mean by "context dependent" here?
<companion_cube>
(fwiw, in oasis, indentation and many quirks are handled at the line level, before a genlex/camlp4 parser runs)
<companion_cube>
after a "if", lexing is different from after a ":"
<Khady>
Leonidas: I no longer have exceptions, thanks. But on this branch and on master, I have an issue with the *_history functions. see http://paste.isomorphis.me/9KH
<companion_cube>
and what you lex depends on indentation
<companion_cube>
(after the if, there is a list of statements, then optionally dedent + "else")
<gasche>
hm
<companion_cube>
same, after a Foo:, indented lines are opaque, same-level lines are statements again
<gasche>
so a field is either a simple field or a conditional (branches of which contains field blocks)
<companion_cube>
yeah, mostly
<gasche>
I agree that the difficulty is in the lexer
<gasche>
more precisely, you need a lexer that is both accurate and readable
<companion_cube>
I think we need a spec + the kind of random testing I was taking about above
<gasche>
wouldn't "parse all _oasis files in OPAM" suffice in practice?
<companion_cube>
until someone makes a reference implem with ocamllex, but well
<companion_cube>
sure, it's a good start
<gasche>
do you prefer ocamllex to ulex/sedlex?
<Khady>
also Leonidas, there is no way to get a string version of the id for a conversation/group/user/channel on master
<gasche>
(I would suspect that handling unicode well could matter here)
<companion_cube>
I don't know ulex, and sedlex uses ppx
<gasche>
is "no ppx" a requirement?
<companion_cube>
I don't think so, the current parser doesn't handle unicode afaict
<companion_cube>
well it is, if you want to support OCaml < 4.02
<gasche>
you could easily distribute the post-processed version
<companion_cube>
bleh
<companion_cube>
this is exactly what I am trying to reduce with this work on oasis -_-
<companion_cube>
also, my parser is 230 lines, I consider this reasonable
<malc_>
gasche: nice lwn article, thanks
<gasche>
come on, there is a difference between versioning generated things and generating them at release-time
<gasche>
malc_: thanks!
<companion_cube>
it would if I had a good way of releasing without git tags :/
<adrien>
(github!)
<companion_cube>
adrien: exactly, it requires to commit things before you use a git tag
AlexRussia has joined #ocaml
<companion_cube>
anyway
<gasche>
did you decide against reusing the core of oasis' current codebase finally?
<adrien>
github is a packager's nightmare and sadly it doesn't look like anything is going to change
<companion_cube>
gasche: no, but it's useful to have an independent parser
<sgronblo>
hey is ocsigen still the "main" web framework for ocaml?
<companion_cube>
and I do want to throw the current one away, it really is too ugly
yegods has joined #ocaml
leyyin has joined #ocaml
<groovy2shoes>
say what you will about SourceForge (I don't care much for it nowadays either), but you gotta give it one thing: It made things pretty damn easy on package maintainers
<gasche>
not clear how that would be the case
<companion_cube>
?
<gasche>
it's dead easy to programmatically upload a .tar.gz generated from a git commit into github (maybe gitlab also has a similar feature)
<gasche>
it's just that the built-in "tags -> releases" mechanisms is even more convenient
yegods has quit [Ping timeout: 252 seconds]
<companion_cube>
oh, didn't know that
<gasche>
well
<companion_cube>
is there a "upload tarball" somewhere?
<gasche>
I am thinking of a Make (or ocamlbuild for that matter) rule that writes to gh-pages
<companion_cube>
back to the point, if drup can make a nice parsr for _oasis that can parse all existing _oasis files, then cool
<adrien>
as a packager I face two issues with releases on github and they're both because of github and not because of them
<companion_cube>
gasche: you mean committing the tarball itself? :/
<companion_cube>
until then, I'll consider that writing a separate lexer+parser look really hard, and stick to my solution
<companion_cube>
EOF
<adrien>
- no actual release, only git archive; it seems it mostly started when GH removed the file storage feature and noone really noticed when it got back as a limited feature
<adrien>
- no canonical tarball name for these "git archive"
<gasche>
you commit the tarball to the gh-pages branch, yes
<companion_cube>
sorry for not knowing every ocaml github repo.
<Drup>
it's not yet released I think
<gasche>
Drup: I understand you non-pleased by companion_cube's cube library, but could we tone the conversation down a little bit?
<reynir>
gasche: OK, thanks :-)
<companion_cube>
and yeah, I admit, I didn't really want a dependency without good reason, but you also seem to critize anything that is not menhir based
<companion_cube>
which leaves little room for discussion
<gasche>
but menhir is an excellent choice to describe parsers
<gasche>
I think it's superior to parser combinators in general
<gasche>
it gives you a declarative syntax that can statically warn about ambiguities (conflicts)
<gasche>
one thing is that error messages are harder to tune, and the distribution model is slightly more complex if you want to not depend on Menhir
<gasche>
(but for the latter I made sure it was easy to do so when working on the Menhir parser for OCaml)
<companion_cube>
menhir is awesome if you have a complicated grammar and simple lexer
<companion_cube>
here it's the opposite, so I'm really not convinced
<companion_cube>
seliopou: maybe we can contribute on angstrom, though
<Drup>
companion_cube: I .. actually don't. But I have yet to see a parser combinator library that has a compeling use case not better done by a parser generator. (angstorm look like it could be a decent example of that, not sure yet)
<companion_cube>
well, I claim that oasis is such a case
<companion_cube>
until proven wrong :p
<Drup>
About the if/: stuff
<Drup>
I implemented something that is very close to what gasche described
<Drup>
there is a notion of boolean expression
<companion_cube>
and how do you make the distinction between sub-statements and blobs?
<gasche>
I think a way to productively resolve the debate would be to try to have a complete lex+menhir based parser
<companion_cube>
exactly
<gasche>
I'm rather confident that it's doable
<gasche>
Drup: I think that your current lexer is a bit hard to read
<companion_cube>
I'm dubious, but would be happy to be proven wrong
<Drup>
gasche: I agree, it was a first shot
<gasche>
but I wouldn't mind helping along for clarity once you have something that is complete
<Drup>
I don't really inted to dedicate much time to it
<companion_cube>
(also, why not ocamllex? there is no unicode in oasis)
<gasche>
(right now I have OCamlbuild and Batteries release "sur le feu")
<gasche>
ocamllex is fine by me, ulex is fine as well
<Drup>
companion_cube: because having unicode-proof lexer for oasis sounded like a good idea
<companion_cube>
as long as unicode is used in blobs only, mine should work fine
<companion_cube>
utf8* only, of course.
<companion_cube>
oh wait, I already parse lwt.oasis
<companion_cube>
✔
amnn has joined #ocaml
<Drup>
Also, about the whole generator/combinator question that gasche tried to summarize
<Drup>
using a parser combinator is never going to give us a spec, it's too free-form
<companion_cube>
I didn't intend to provide a spec
<companion_cube>
I wrote a parser
<Drup>
But I did
<companion_cube>
please do then
<companion_cube>
and again, the parser is easy, the lexer is hard, and this doesn;t talk about lexer
<companion_cube>
I feel a bit I'm wasting my time, ++
mettekou_ has joined #ocaml
mettekou has quit [Ping timeout: 260 seconds]
<Leonidas>
Khady: why would you need a string of conersation/group/user/channel? I'm trying to specifically abstract away the ids :-)
<Leonidas>
Khady: can you open an issue about the _history functions? it's probably because the json is not as they documented it when I wrote the code.
ygrek has joined #ocaml
mettekou_ has quit [Ping timeout: 276 seconds]
A1977494 has joined #ocaml
walter|r has joined #ocaml
sh0t has joined #ocaml
yegods has joined #ocaml
kakadu has quit [Quit: Page closed]
yegods has quit [Ping timeout: 276 seconds]
shinnya has joined #ocaml
<Khady>
Leonidas: ok I will open an issue
jeffmo has quit [Quit: jeffmo]
<Khady>
Leonidas: there is no way to compare ids currently. I use the polymorphic comparison but I don't know what guaranties it gives me. IDs as string may be needed because they are the only unique identifier. I could for exemple have two users with the same name. And I need the id to distinguish them
tane has quit [Ping timeout: 246 seconds]
mettekou has joined #ocaml
nicholasf has quit [Remote host closed the connection]
ismaelga has joined #ocaml
dwillems has quit [Quit: Leaving]
copy` has quit [Quit: Connection closed for inactivity]
Reshi has quit [Quit: WeeChat 1.4]
tane has joined #ocaml
<Leonidas>
Khady: comparison is a good point, will think about some sensible ways to compare
<Leonidas>
Khady: thanks very much for your input, helps me a lot to see which areas need improvement :-)
<rntz>
def`: ah, ok - that'll work for my use-case, thanks!
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
rbocquet has quit [Ping timeout: 250 seconds]
rbocquet has joined #ocaml
nicholasf has quit [Ping timeout: 250 seconds]
ryanartecona has quit [Quit: ryanartecona]
mistermetaphor has joined #ocaml
<gasche>
fun fact: Batteries has BatRef.protect : 'a ref -> 'a -> (unit -> 'b) -> 'b
<gasche>
also rntz in case you care about the nitpicking details, parameters are "dynamic binding", but not dynamic point: it's pretty much the point that they are statically scoped
<gasche>
hm
<gasche>
it's not the point, but it's an important improvement over the original (flawed) dynamic binding designs
yegods has quit [Remote host closed the connection]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
yegods has joined #ocaml
<rntz>
gasche: hm, I have to admit I don't quite see your point. how is a parameter distinct from a dynamically scoped variable, other than that you can pass it around as a first-class thing?
<rntz>
do you just mean that the *name* of the parameter itself is a lexically scoped variable?
Mercuria1Alchemi has quit [Ping timeout: 240 seconds]
mistermetaphor has quit [Remote host closed the connection]
Algebr has joined #ocaml
<Algebr>
yea, maybe clojure people like func programming and want to take it to the next step, ie types
A19774941 has quit [Quit: Leaving.]
<gasche>
rntz: "dynamic" in this context means "may change during the program execution"
<gasche>
parameters are statically scoped: the extent to which you can access them is defined in the source, and may not change during program execution
<gasche>
on the other hand, *which value is bound* may change during runtime (and not in a statically-definable way): it is dynamic binding
<gasche>
by opposition, Javascript lets you add and remove variables from the environment during the program runtime: that would be "more dynamically" scoped
<gasche>
(also the historic name for this feature is "dynamic binding", by opposition to "lexical scoping")
bba has joined #ocaml
nicholasf has joined #ocaml
nicholasf has quit [Remote host closed the connection]
bba_ has quit [Ping timeout: 240 seconds]
nicholasf has joined #ocaml
kakadu has quit [Remote host closed the connection]
tristero has joined #ocaml
doecnt has quit [Ping timeout: 244 seconds]
walter|r has quit [Remote host closed the connection]
walter|r has joined #ocaml
amnn_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tane has quit [Quit: Verlassend]
pecan has quit [Quit: WeeChat 1.4]
pecan has joined #ocaml
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
twobitsprite has quit [Quit: Lost terminal]
groovy2shoes has quit [Quit: Leaving]
Listing has joined #ocaml
madroach has quit [Ping timeout: 250 seconds]
madroach has joined #ocaml
snhmib has quit [Quit: WeeChat 1.3]
silver has quit [Quit: rakede]
walter|r has quit [Remote host closed the connection]