MrScout has quit [Remote host closed the connection]
Hannibal_Smith has quit [Quit: Leaving]
nojb has joined #ocaml
MrScout has joined #ocaml
myyst has quit [Ping timeout: 265 seconds]
myyst has joined #ocaml
jonludlam has quit [Quit: Coyote finally caught me]
kdef has joined #ocaml
kdef has quit [Client Quit]
kdef has joined #ocaml
hellome has joined #ocaml
hellome has quit [Read error: Connection reset by peer]
travisbrady has joined #ocaml
hellome has joined #ocaml
kdef has quit [Remote host closed the connection]
<struk>
vbmithr: based on my trials and tribulations, I am favoring plplot (until I decide to run a http server at least and do some sort of js solution)
lordkryss has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
keen__________31 has quit [Read error: Connection reset by peer]
keen__________31 has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
thomasga has quit [Quit: Leaving.]
thegameg has quit [Quit: Bye :D]
thegameg has joined #ocaml
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
nojb has quit [Quit: nojb]
shinnya_ has quit [Ping timeout: 252 seconds]
hellome has quit [Remote host closed the connection]
hellome has joined #ocaml
uris77 has quit [Quit: leaving]
Simn has quit [Quit: Leaving]
mahem1 has joined #ocaml
asakim has joined #ocaml
asakim has quit [Remote host closed the connection]
asakim has joined #ocaml
burgobianco has quit [Excess Flood]
rgrinberg has joined #ocaml
burgobianco has joined #ocaml
asakim has quit [Remote host closed the connection]
<mahem1>
Hey all, so I am thinking of converting a game project I've written in Javascript (using processing.js) to OCaml. (Just for fun really.)
<mahem1>
My current plan of attack we to put all of the logic in the OCaml side and just display stuff using javascript is processing.
<mahem1>
Just wanted to know if anyone knew of a better way to do this.
chinglish has joined #ocaml
endiruna has quit [Ping timeout: 244 seconds]
jao has joined #ocaml
jao has quit [Ping timeout: 264 seconds]
q66 has quit [Quit: Leaving]
lordkryss has quit [Quit: Connection closed for inactivity]
struk has quit [Ping timeout: 244 seconds]
travisbrady has quit [Quit: travisbrady]
manizzle has quit [Ping timeout: 245 seconds]
* chinglish
ame
AlexRussia has quit [Ping timeout: 252 seconds]
kapil__ has joined #ocaml
travisbrady has joined #ocaml
samrat has joined #ocaml
BitPuffin has quit [Ping timeout: 244 seconds]
_5kg has quit [Ping timeout: 240 seconds]
WraithM_ has quit [Ping timeout: 264 seconds]
bytbox has quit [Remote host closed the connection]
darkf has joined #ocaml
travisbrady has quit [Quit: travisbrady]
badkins has quit []
funtik_ has quit [Remote host closed the connection]
marynate has joined #ocaml
Intensity has joined #ocaml
badon has quit [Ping timeout: 250 seconds]
badon has joined #ocaml
_5kg has joined #ocaml
AlexRussia has joined #ocaml
taostein has joined #ocaml
taostein has quit [Quit: taostein]
travisbrady has joined #ocaml
mcc has joined #ocaml
travisbrady has quit [Client Quit]
<mcc>
Hey whitequark, what is that document you showed me once with the Unicode body's recommendations for handling identifiers in a programming language?
JuggleTux has quit [Read error: Connection reset by peer]
<mcc>
whitequark: UAX #31?
ygrek_ has joined #ocaml
govg has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
dsheets has quit [Ping timeout: 240 seconds]
vanila has joined #ocaml
ygrek_ has quit [Remote host closed the connection]
ygrek has joined #ocaml
darkf has quit [Quit: Leaving]
darkf has joined #ocaml
bjorkintosh has joined #ocaml
ggole has joined #ocaml
enitiz has quit [Ping timeout: 264 seconds]
samrat has joined #ocaml
samrat has quit [Client Quit]
asakim has joined #ocaml
samrat has joined #ocaml
badon_ has joined #ocaml
badon has quit [Disconnected by services]
badon_ is now known as badon
tnguyen has joined #ocaml
AlexRussia has quit [Ping timeout: 264 seconds]
bytbox has joined #ocaml
bytbox has quit [Remote host closed the connection]
manizzle has joined #ocaml
manizzle has quit [Max SendQ exceeded]
manizzle has joined #ocaml
asakim has quit [Remote host closed the connection]
demonimin has quit [Ping timeout: 246 seconds]
xiaolin has quit [Ping timeout: 264 seconds]
MercurialAlchemi has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
MrScout_ has joined #ocaml
MrScout has quit [Ping timeout: 244 seconds]
mcc has quit [Ping timeout: 255 seconds]
MrScout_ has quit [Ping timeout: 265 seconds]
acieroid has quit [Ping timeout: 244 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
badon has quit [Quit: Leaving]
mengu has joined #ocaml
kakadu has joined #ocaml
MisaMisa has joined #ocaml
zwer_g has joined #ocaml
zwer has quit [Ping timeout: 250 seconds]
badon has joined #ocaml
kakadu has quit []
kakadu_ has joined #ocaml
kakadu_ is now known as Kakadu
mbac has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 264 seconds]
Averell- is now known as Averell
Averell has quit [Changing host]
Averell has joined #ocaml
samrat has joined #ocaml
ygrek has joined #ocaml
MercurialAlchemi has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
mengu has quit [Remote host closed the connection]
larhat has joined #ocaml
mengu__ has joined #ocaml
<whitequark>
I think so
<whitequark>
eh, she quit...
_5kg has quit [Ping timeout: 252 seconds]
MercurialAlchemi has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
rock_neurotiko has quit [Ping timeout: 245 seconds]
ivan\ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
ivan\ has joined #ocaml
MisaMisa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
divyansh_ has joined #ocaml
matason has joined #ocaml
rock_neurotiko has joined #ocaml
matason has quit [Ping timeout: 240 seconds]
AltGr has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
ollehar has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
samrat has joined #ocaml
manizzle has quit [Ping timeout: 255 seconds]
thomasga has joined #ocaml
_5kg has joined #ocaml
myyst has quit [Ping timeout: 244 seconds]
myyst has joined #ocaml
dsheets has joined #ocaml
ia0 has quit [Quit: leaving]
ia0 has joined #ocaml
matason has joined #ocaml
Haudegen has quit [Ping timeout: 265 seconds]
demonimin has joined #ocaml
demonimin has quit [Changing host]
demonimin has joined #ocaml
<vbmithr>
struk|work: ok, interesting.
<vbmithr>
struk|work: I had a look at it but prefered to go for something more standard
rock_neurotiko has quit [Quit: No Ping reply in 180 seconds.]
rock_neurotiko has joined #ocaml
ebzzry has quit [Remote host closed the connection]
ebzzry has joined #ocaml
taostein has joined #ocaml
AltGr has left #ocaml [#ocaml]
acieroid has joined #ocaml
badon has quit [Ping timeout: 250 seconds]
Simn has joined #ocaml
mort___ has joined #ocaml
psy_ has quit [Read error: No route to host]
_andre has joined #ocaml
mengu__ has quit [Remote host closed the connection]
badon has joined #ocaml
psy_ has joined #ocaml
_5kg has joined #ocaml
vanila has quit [Remote host closed the connection]
endiruna1 has joined #ocaml
<gasche>
whitequark: I don't understand your time-frame for PR#6642 (the $CAMLORIGIN stuff)
<gasche>
what good would it do to have the patch merged in trunk/4.02 if LLVM branches tomorrow, given that OCaml probably wouldn't have an actual release in time?
<whitequark>
gasche: 3.6 is branched tomorrow, but the actual release is at least a few weeks after now
<whitequark>
and as I understand 4.02.2 has a similar timeframe
<Leonidas>
oh, that's good to know
<whitequark>
gasche: I've merged the changes to use $CAMLORIGIN into LLVM just now.
<whitequark>
for now, they do nothing (and also will do nothing on pre-4.02 anyway)
<Drup>
(11:14:59) whitequark: 3.6 is branched tomorrow, <- aaah, the whole C export to OCaml is not merged T__T
<whitequark>
yeeeep
<Drup>
hit people, merge it plz :(
<whitequark>
I've told you to do it earlier
<whitequark>
hm? what do you mean?
<Drup>
your stuff.
<whitequark>
there is no ready patch to merge
<whitequark>
if there was one, I'd just commit it
<Drup>
you have a big patch in review since forever
<whitequark>
it's not "in review", it needs to be reworked and split
<whitequark>
this is literally what `make all` does
<gasche>
So when we write about “likable” or “relatable” characters on TV engaging in that casual, everyday racism we all struggle with/against, people fall all over themselves to justify the behavior and claim it isn’t racist. Because if it was racist, then the character is officially A BAD PERSON and if you like that character then you are A BAD PERSON because only BAD PEOPLE participate in racism. And instead of interrogating why that is (why does rac
<adrien>
gasche: too long
<gasche>
hm
<gasche>
that was a random internet quote :D
<adrien>
err wat
<adrien>
yeah, was going to say ECHAN :D
<gasche>
my middle-click button playing tricks
<adrien>
was trying to find context in the backlog though
<gasche>
whitequark: I don't know why you think there would be a minor release in a few weeks, I haven't heard about this -- but then I am quite busy with other things
<gasche>
(there's an implicit question: did anyone announce something of that effect?)
<whitequark>
gasche: it doesn't matter if it's in a few weeks or not, I just want it earlier than 4.03
<whitequark>
whenever 4.02 is released is fine.
<whitequark>
*4.02.2
<whitequark>
distros will take ages to pick up everything anyway, so it should be done by then
endiruna1 has quit [Remote host closed the connection]
endiruna1 has joined #ocaml
<whitequark>
... actually, given the clusterfuck with ctypes integration, it looks likely that one more llvm/ocaml release cycle will have to pass until packages are usable at all
<gasche>
how does your code check to behave reasonably if the patch isn't applied?
<companion_cube>
a minor release of ocaml? why so?
<adrien>
4.02.2 is unlikely to end up in distros anyway
<adrien>
4.03 will probably be the one in use
<gasche>
companion_cube: Damien mentioned he might do this, but I don't have much information
<companion_cube>
gasche: no opinion about exporting the type of Buffer.t explicitely somewhere, btw? :)
<companion_cube>
(happy new year)
<gasche>
thanks
<whitequark>
gasche: it simply passes -L$CAMLORIGIN/.. if OCaml is too old
<adrien>
except if upstream clearly says that 4.03.0 might be a rough release and that distros seeking stability are better off with 4.02.2
<gasche>
it is my moral duty not to have any opinion about OCaml-related matter until the LICS deadline passes
<def`>
;')
<whitequark>
gasche: I don't anticipate that being a problem. it's just one more (nonexistent) directory to search in
* adrien
shows his memory-erasing device to gasche
marynate has quit [Quit: Leaving]
* companion_cube
looks away
<whitequark>
... I'd add a version check, but LLVM has a particularly hostile autoconf version policy, and I'm not spending a whole working day just adding that check, so, I didn't
<Drup>
gasche: LICS ?
<gasche>
I might still commit whitequark's patch if it is urgent
<whitequark>
gasche: oh, some more context. $CAMLORIGIN is only necessary for OPAM
<whitequark>
since a system installation is already present in the default library search path
<whitequark>
so actually it doesn't matter when or if distros pick 4.02.2 up, I just realized.
<gasche>
but you still would need this patch applied before tomorrow
<whitequark>
you have about two weeks to decide if it goes in with this exact public interface or not
<whitequark>
if it turns out that the interface must be changed, I will revert it in 3.6 branch
<whitequark>
if the interface will not be changed, it is not important when exactly it is applied
<Drup>
gasche: what is LICS ?
<gasche>
a computer science conference
<gasche>
fairly theoretical
<gasche>
(it's for stuff that is not-applicable-enough for POPL)
<gasche>
I'm trying to get a paper on time on a collaboration with Guillaume Munch-Maccagnoni
<Drup>
Yeah, I guessed it was a conference and that It was fairly theoretical, given that you are doing a paper for it :D
<ia0>
BTW gasche + companion_cube, I will be at place d'italie this friday morning. I have a meeting from 10am to 1pm
ebzzry has quit [Remote host closed the connection]
<companion_cube>
\o/ ia0
<ia0>
:-)
mengu has joined #ocaml
jonludlam has joined #ocaml
<jpdeplaix>
whitequark: I did that because « make » also complies the documentation
<whitequark>
jpdeplaix: yes, but make all doesn't
<jpdeplaix>
ok, then it's unnecessary. I'll remove it
endiruna1 has quit [Ping timeout: 244 seconds]
ingsoc has joined #ocaml
<whitequark>
don't bother, I've already updated the script
<whitequark>
also did some other fixes, I'll upload it soon
samrat has quit [Quit: Computer has gone to sleep.]
<ingsoc>
is js_of_ocaml applicable to use for general purpose single page web applications. Anyone know of whether it plays well with angularjs or react ?
<jpdeplaix>
cool, thanks ! :)
Haudegen has quit [Ping timeout: 265 seconds]
divyansh_ has quit [Quit: Computer has gone to sleep.]
marynate has joined #ocaml
axiles has quit [Quit: Quitte]
Haudegen has joined #ocaml
marynate has quit [Max SendQ exceeded]
marynate has joined #ocaml
marynate has quit [Max SendQ exceeded]
marynate has joined #ocaml
marynate has quit [Read error: Connection reset by peer]
marynate has joined #ocaml
<Kakadu>
ingsoc: I don't know but if you try I will be interesting in results
<Kakadu>
ingsoc: AFAIR many javascript libraries use a lot of templates to generate HTML and I don't think that it suits js_of_ocaml well enought. (because templates are poor's man high order functions, IMHO)
rock_neurotiko has quit [Ping timeout: 255 seconds]
<ingsoc>
Kakadu: It was just the libs on the OCSIGEN website seem quite ambitious in their claims but there doesn't seem to be much info out in the wild. I am wondering if js_of_ocaml is intending to be competing in the same realm as clojurescript is with regards to being a feature complete alternative to raw JS
axiles has joined #ocaml
divyansh_ has joined #ocaml
samrat has joined #ocaml
<Kakadu>
Info is low because ocsigen project have some problems with documentation.
endiruna1 has joined #ocaml
govg has quit [Ping timeout: 256 seconds]
endiruna1 has quit [Remote host closed the connection]
<gasche>
ingsoc: some people prefer to bind JS libraries and call them from their js_of_ocaml compiled OCaml programs
endiruna1 has joined #ocaml
<gasche>
some people prefer to bind the interesting OCaml functions they wrote and write a pure-JS (or Typescript of whatever) frontend
<gasche>
I suspect the latter is the easiest way in if you're trying to interact with a large existing JS library that has many JS examples lying around
Thooms has joined #ocaml
<ingsoc>
gasche: so top level structure and skeleton is in traditional JS (for compatibility and ease of integration ?) and then they write the more guts of business logic in ocaml ?
<gasche>
(just as we sometime advise people that want to develop a GUI to do it in another language, interacting with the core application through a socket layer)
<gasche>
yes
<ingsoc>
what does js_of_ocaml specifically bring. will type inference and safety and all that goodness still be available/useful ?
<ingsoc>
and also what do you mean by "bind" to make them available
<flux>
I haven't really use js_of_ocaml, but I believe the idea is pretty much the same how you 'bind' c libraries to ocaml
<ingsoc>
gasche: the LWT lib sounds interesting for making async operations less of a headache too
<flux>
if you make mistakes in this the results are much less severe than when making mistakes when writing c bindings :)
<flux>
but yes, if you use js_of_ocaml you have type inference and type safety etc. but that doesn't help with pure javascript code. you need to carefully write something that tells what the types in the javascript core are. then it works with the rest of the type system.
<flux>
I understand there is some unsafe mechanism for doing javascript calls in js_of_ocaml.. but I don't really know more about that :)
<gasche>
one example I know about is the Mezzo web front-end
<gasche>
(Mezzo is a research programming language that one can try from the browser; the prototype is implemented in OCaml and eg. the type-checking is performed client-side thanks to js_of_ocaml)
<gasche>
the backend logic is many lines of OCaml code, and the frontend is actually a mix of pure-JS calling functions compiled from OCaml ( ui.js ) and OCaml code interacting with JS libraries ( mezzoweb.ml )
<whitequark>
now any usage of ocamlc/ocamlc -custom/ocamlopt works without any additional ccopts or env variable changes
divyansh_ has quit [Quit: Computer has gone to sleep.]
<Leonidas>
compiling merlin fails if you have $OCAMLC set. I kinda wonder whether I should adjust the OPAM repo to specifically unset it. Any thoughts?
<whitequark>
this sounds like a merlin bug.
<Leonidas>
I kinda dislike that the build might fail due to random variables being set
Simn has quit [Read error: Network is unreachable]
endiruna1 has quit [Remote host closed the connection]
endiruna1 has joined #ocaml
marynate has quit [Read error: Connection reset by peer]
marynate has joined #ocaml
marynate has quit [Max SendQ exceeded]
<Drup>
the mezzo front end is a very poor base to reproduce
marynate has joined #ocaml
<gasche>
feel free to provide better role models
<Drup>
Jonathan did it that way because he has his own very strong ideas on how to code the front end and consider that ocsigen did not fit them (whatever this is true or not is left to further debate)
<Leonidas>
actually, I am kinda surprised it fails, since it usually sets OCAMLC to 'ocamlc' and setting it to 'ocamlfind c' instead should be compatible.
axiles has quit [Remote host closed the connection]
AlexRussia has joined #ocaml
taostein has joined #ocaml
taostein has quit [Client Quit]
<endiruna1>
how can I specify a function in a match case? i have tried to do things like | pattern -> function = if x then something else somethingElse but does not work
<MercurialAlchemi>
match foo with | bar -> fun x -> ...
<MercurialAlchemi>
fun arg1 arg2 ... -> (* body *)
<MercurialAlchemi>
is the syntax for anonymous functions
rand000 has quit [Ping timeout: 245 seconds]
rand000 has joined #ocaml
travisbrady has joined #ocaml
thomasga has quit [Quit: Leaving.]
<ggole>
function is fine too, just parenthesize
tane has joined #ocaml
vanila has joined #ocaml
<endiruna1>
thanks MercurialAlchemi !
Thooms has quit [Quit: WeeChat 1.0.1]
<MercurialAlchemi>
ggole: parentheses or not, 'function =' is not going to cut it...
endiruna1 has quit [Ping timeout: 244 seconds]
<ggole>
It's no different to fun, except you have to use parens.
<MercurialAlchemi>
ggole: well, yes, which means you need parameters and '->' instead of '=' :)
<def`>
out of curiosity, did any of you ever felt the need for less verbose anonymous function syntax? especially for delaying effects, like when one write fun () -> …
dario_ has joined #ocaml
<MercurialAlchemi>
I have a Java background, I don't know what 'less verbose' means in this context
bytbox has joined #ocaml
<MercurialAlchemi>
(more seriously, it's not more verbose than Python)
zwer has quit [Read error: Connection reset by peer]
<MercurialAlchemi>
(or Perl)
<thizanne>
def`: I did, but I wasn't sure about what syntax I'd like
JuggleTux has joined #ocaml
<def`>
(well, I am not asking relatively to the atrocious state of computing :')
<def`>
(I am well aware of the disaster)
<MercurialAlchemi>
I guess we could have 'x -> foo' but it would look damn weird with multiple parameters
zwer has joined #ocaml
<def`>
MercurialAlchemi: it would quickly become ambiguous
nicoo has joined #ocaml
<def`>
(I have a patch with these syntaxes)
<MercurialAlchemi>
I can live with typing three letters and a space
<MercurialAlchemi>
and it's fun
<MercurialAlchemi>
(I can make terrible puns too)
thomasga has joined #ocaml
<Leonidas>
def`: yes, I often find myself missing \ from haskell at least
<MercurialAlchemi>
I don't like \
<MercurialAlchemi>
death to ASCII
<def`>
"fun ident -> body" ~ "ident -> body", "fun () -> body" ~ (-> body), and "(| a -> b | c -> d)" ~ "function a -> b | c -> d"
<thizanne>
I would like to have something like `myfun _ otherparameter`, expanded to fun x -> myfun x otherparameter
<def`>
with _, it's unclear where one wants to put the lambda
<Leonidas>
clojusre does #(expr) and has % for the value
<Leonidas>
#(% + 1) e.g.
<vanila>
whats the point in only savinglike 3 characters?
<def`>
gasch'e suggested using (\ _ + 1) also
<Leonidas>
that looks good to me
<def`>
vanila: especially in monadic code, there is often more noise than actual code
<MercurialAlchemi>
I'd rather save on parentheses
<vanila>
what about adding do notation with a macro then?
<thizanne>
I like (\ _ + 1)
<Leonidas>
that too, but I don't see how to get rid of the parentheses.
<thizanne>
Most often I have these parentheses anyway
zwer_s has joined #ocaml
<def`>
but I was just curious of other opinions on the matter, I don't think it's a good idea to change ocaml syntax (do notation with ppx is better than nothing)
<vanila>
well my view is that this sort of thing is not an improvement
<vanila>
look at arc vs scheme
<ggole>
def`: occasionally I wouldn't mind sections
<ggole>
I don't think it's that big a deal though
zwer has quit []
<def`>
ggole: héhé, I had those too in a branch (as well as a never finished one with haskell-like custom precedences… That's a really bad idea :D)
<ggole>
Some easy cases are already possible with simple partial application anyway
<ggole>
((+) 1)
<def`>
yep
<ggole>
But not ((<) 1)
<ggole>
(That "works" but is confusing.)
<def`>
(Yep)
<def`>
But I am a bit mixed about partial applications
<vanila>
maybe just define less y x = x < y
<vanila>
then you can og less 1
<thizanne>
it also doesn't work with stuff like Map.add where your parameter is not the last one
NoNNaN has joined #ocaml
<def`>
(that is having non-generalized type variables in the middle of code can bite you)
<def`>
yep, I agree with vanila. Just naming small functions makes code much clearer
<def`>
altough I would like a "where" construct for these :')
<ggole>
I'm happy enough with let, I think
<MercurialAlchemi>
def`: ugh, no (to your where suggestion)
<ggole>
I'd rather have some fancier stuff like abstraction over constructors
<def`>
MercurialAlchemi: my main concern is that with let alone, you have to polute code with auxiliary definitions
<MercurialAlchemi>
def`: bof
<ggole>
Whereas with where you "enhance" code with auxiliary definitions? :)
<MercurialAlchemi>
def`: you just write auxiliary functions in the scope of a larger function with 'let'
ollehar has quit [Ping timeout: 244 seconds]
<def`>
I would like to add a where construct restricted to syntactic values (that is side-effect free), to first 1. isolate those auxiliary definition 2. make it easier to read by enforcing pure code
<MercurialAlchemi>
def`: uh
<ggole>
I think you can get most of the benefit with a bit of thoughtfully applied whitespace
<MercurialAlchemi>
having to read up and down to figure out what the hell is going on because people think using both let and where in Haskell most definitely doesn't help _me_ read code
<MercurialAlchemi>
(think using both let and where is a good idea, that is)
<def`>
MercurialAlchemi: of course, features can be abused and misused
<MercurialAlchemi>
well, it's like feet and guns
<vanila>
i kinda of like the strict structure that only have let makes you do :D
<def`>
but when appropriate, I much prefer having the choice
<vanila>
ocaml is cool
<MercurialAlchemi>
the less guns you make available in your language, the less mangled feet you will get
<def`>
that's true
zwer_s has quit [Remote host closed the connection]
zwer_s has joined #ocaml
<MercurialAlchemi>
I'm not against do-syntax, though I would like it to make clear what monad is applied
<def`>
it's time for me to do some scala. Give me 2 hours, and I'll come back crying that they managed to fuck up everything and will be happy having nothing but lets
<MercurialAlchemi>
hahaha
<MercurialAlchemi>
you'll still be compiling in two hours
<def`>
:D
<vanila>
what if its polymorphic in the monad or is that not possible in ocaml?
<vanila>
I guess it coudl be done with modules
<def`>
vanila: possible, a bit verbose
<def`>
might get easier with implicits
<vanila>
im scared of anything implicit
<def`>
(the problem is that you need higher kinded types to be polymorphic in the monad without too much hack)
<Leonidas>
you can get your 'where' if you like camlp4, there's an pa_ for that
<MercurialAlchemi>
in this case it's more a case of 'implicits are better than no implicits' rather than 'explicit is better than implicit'
<def`>
I hate camlp4… I am just thinking out loud :)
<MercurialAlchemi>
Leonidas: does anybody like camlp4?
<vanila>
hey I was wondering about the ocaml bytecode
<Leonidas>
MercurialAlchemi: ;-)
<vanila>
is it the 'best' bytecode for ocaml? And what is it only used by ocaml?
<vanila>
there's other bytecodes too like JVM and scheme48
<def`>
vanila: implicits are verbose enough that we should be able to avoid most misuses and limit them to useful case :D
<vanila>
I see :)
<Leonidas>
isn't the bytecode going to change, if flambda gets merged?
<Leonidas>
I remember there was some discussion on it
<def`>
Leonidas: not that this doesn't imply changing the bytecode
<MercurialAlchemi>
Leonidas: I was thinking remote debugger working with native code
<def`>
MercurialAlchemi: gdb, one day
<Leonidas>
MercurialAlchemi: I'd wish the debugger would even work with bytecode. today it just crashed on me printing some value.
thomasga has quit [Quit: Leaving.]
<def`>
(about merlin, there is a lot of things going on, but if you have suggestions, wishes are welcome)
<def`>
(also, I hope you reported the crash on value printing, otherwise you'll never get a fix :D)
<Leonidas>
def`: oh, it doesn't? So it just does modifications on the instructions and does not add new ones? Must've misunderstood.
<MercurialAlchemi>
I need to try ocaml-debug one day, just for laughs
<def`>
Leonidas: yep, it's more about generating smarter code than changing the format
shinnya_ has joined #ocaml
<Leonidas>
def`: ehh, no. The codebase to reproduce it is kinda huge :< But I'm reporting things all the time as I go along :)
<MercurialAlchemi>
def`: well, apart from releasing ppx compatibility... I don't know, it's just good
<Leonidas>
:TypeOf changed my life, especially after I mapped it to ,t
<Leonidas>
MercurialAlchemi: it is not that bad actually
<MercurialAlchemi>
maybe an automatic rename function
<Leonidas>
MercurialAlchemi: there is a rename function :p
<MercurialAlchemi>
well, move and rename
<MercurialAlchemi>
crap
<Leonidas>
in 2.1.0
<MercurialAlchemi>
well, I guess it shows how often I use this kind of thing in practice :D
<def`>
MercurialAlchemi: it has been released yesterday… We are preparing the announce. I guess
<MercurialAlchemi>
oh
<MercurialAlchemi>
I see 'opam update' in my near future
<Leonidas>
def`: I'd love if it was able to infer B&S lines from ocamlbuild
<def`>
Leonidas: … could be done by adding a "meta" .merlin rule to ocamlbuild
<Leonidas>
sounds good
travisbrady has quit [Quit: travisbrady]
<def`>
we don't want to deal with all build systems around… There is a jenga rule for .merlin, the same could be nice for ocamlbuild (… and maybe should have been done :))
<def`>
ok, got to go. see ya
<Leonidas>
sure, I understand.
govg has quit [Ping timeout: 264 seconds]
zwer has quit [Remote host closed the connection]
zwer_x has joined #ocaml
rgrinberg has joined #ocaml
zwer_x_b has joined #ocaml
zwer_x has quit [Remote host closed the connection]
zwer_x_b has quit [Remote host closed the connection]
zwer_x_b has joined #ocaml
taostein has joined #ocaml
govg has joined #ocaml
larhat has quit [Quit: Leaving.]
arj has joined #ocaml
jave has quit [Ping timeout: 264 seconds]
taostein has quit [Quit: taostein]
pyon has quit [Ping timeout: 264 seconds]
zwer_x_b is now known as zwer
pyon has joined #ocaml
arj has quit [Quit: Leaving.]
darkf has quit [Quit: Leaving]
kapil__ has quit [Quit: Connection closed for inactivity]
ingsoc has quit [Ping timeout: 264 seconds]
contempt has quit [Remote host closed the connection]
<pippijn>
it would probably make the automaton slower
taostein has quit [Client Quit]
<pippijn>
because the automaton currently trades memory for speed
<Drup>
I see
<pippijn>
by allocating arrays of size 256
<pippijn>
for the transitions
<Drup>
ocaml-re does that
<pippijn>
that would no longer work when you have a large alphabet
<Drup>
too
<Drup>
indeed
<pippijn>
with code generation, you can simply have a match input_sym with | 0x263a -> transition or return | ...
<pippijn>
with an interpreter, you need a map
<Drup>
yes, that's what I was thinking.
<pippijn>
so I actually don't want to do it that way
<Drup>
I'm only interested in the code gen way =)
<pippijn>
maybe it's feasible then
<pippijn>
but still far less efficient than my way, I think
<pippijn>
because you'd be iterating over int arrays
<pippijn>
so you first need to convert your utf-8 input to unicode codepoints (int array)
<Drup>
We already do that in sedlex anyway
<pippijn>
I think it's better to just generate utf-8 automata
<pippijn>
or utf-16 automata (operating on byte arrays containing utf-16)
<pippijn>
or utf-32
<pippijn>
still byte arrays
<pippijn>
my ucslib module operates on byte arrays containing any encoding
<Drup>
in sedlex, the codegen is encoding-independent
<pippijn>
there is something to be said for that, yes
govg has quit [Ping timeout: 264 seconds]
<Drup>
you just recieve the series of codepoints
<pippijn>
yeah, but
<pippijn>
most of your input will be utf-8
<Drup>
yeah
<pippijn>
if it's not, you can convert it (expensive)
<pippijn>
if you convert it always, you always have an expensive step preceding the lexing
<Drup>
(except that if you compile to javascript, utf16 is going to be the native)
<pippijn>
ah
<Drup>
(and then, everything is going to suck.)
<pippijn>
you're doing javascript
<Drup>
I'm not doing javascript
<pippijn>
if you're doing javascript, everything is going to suck anyway
AlexRussia has joined #ocaml
<Drup>
I'm keeping my code multi-plateform :D
orbitz has quit [Ping timeout: 244 seconds]
<Drup>
(on the OCaml sens of it :D)
<pippijn>
it's going to suck with code points, too
<pippijn>
if you're not operating on the target's native string format, things are going to suck
<Drup>
anyway, I'm not sure it's something I want to change. allowing the user to change the underlying primitives and using weird encoding if it pleases him is a feature in sedlex
<Drup>
(I know whitequark did weird stuff with that)
orbitz has joined #ocaml
<pippijn>
yeah
<Drup>
(I don't know the details, and I'm not sure I want :D)
<pippijn>
makes sense
<Drup>
anyway
<whitequark>
Drup: I didn't change the *encoding*
<whitequark>
rather I wanted counting bytes, because the ocaml toplevel deals in byte offsets
<Drup>
but you changed the underlying primitives :p
dsheets has quit [Ping timeout: 264 seconds]
<pippijn>
if you're counting bytes, then the utf-8 lexer will do exactly the right thing
<pippijn>
without you changing primitives
<Drup>
right ok, the automaton could have been encoding-aware, it wouldn't have changed anything for you.
<Drup>
fair enough.
<whitequark>
pippijn: not in case of sedlex, it only returns codepoints
<pippijn>
whitequark: I'm not talking about sedlex (in its current form)
myyst has quit [Read error: Connection reset by peer]
myyst has joined #ocaml
thomasga has joined #ocaml
govg has joined #ocaml
AlexRussia has joined #ocaml
Muzer has joined #ocaml
tnguyen has quit [Quit: tnguyen]
rgrinberg has joined #ocaml
taostein has quit [Ping timeout: 245 seconds]
myyst has quit [Quit: Leaving]
MrScout_ has quit [Remote host closed the connection]
MrScout has joined #ocaml
NSA360 has joined #ocaml
myyst has joined #ocaml
<vfoley>
If I compile an OCaml program using ocamlopt (4.00.0) on a Linux 2.6.x machine, can I expect it to run on more recent Linux machines where OCaml is not installed?
<companion_cube>
depends a lot on dynamic libs, I think
<vfoley>
The program in question is a simple compiler: uses ocamllex, menhir and only the OCaml library (no Core or lwt)
<Drup>
with only static compilation, I thing so :p
thomasga has quit [Ping timeout: 265 seconds]
<Drup>
think*
<vfoley>
I'm T.A. for an intro to compilers class, and we want to distribute the executable (no source code) of a compiler that students will need to implement so that they can check their own work.
<Drup>
isn't distributing a set of file with the expected ouput of the execution a better idea ?
<Drup>
at least from a debugging point of view, it seems more helpful
_andre has quit [Quit: leaving]
BitPuffin has quit [Ping timeout: 245 seconds]
MisaMisa has joined #ocaml
matason has joined #ocaml
ygrek has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
<vfoley>
One part of the assignment is to have students write both correct and incorrect programs. Having a reference compiler, they can check if they have the same behavior.
<Drup>
incorrect programs are not rejected ?
<Drup>
oh, you are doing the Go clone thing ? right
badon has quit [Ping timeout: 245 seconds]
MercurialAlchemi has quit [Remote host closed the connection]
<Drup>
to answer, I think as long as you have not-to-old libc, you are fine. ocaml is not needed with native compilation
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
Arsenik has quit [Remote host closed the connection]
samrat has quit [Quit: Computer has gone to sleep.]
rgrinberg has quit [Quit: Leaving.]
MisaMisa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ygrek has quit [Ping timeout: 240 seconds]
olauzon has quit [Quit: olauzon]
<Leonidas>
I am trying to implement a function that takes an int and returns a list if [n; n-1; n-2; 0] etc in CPS style but I don't know how I can do the accumulation
jwatzman|work has joined #ocaml
<Leonidas>
I don't know what the 0 case would be, since I don't know where to store the accumulated values
<thizanne>
k [0]
<thizanne>
and the accumulated values are stored in the continuation in the recursive call
<Leonidas>
oh, wait, you're right
<Leonidas>
this is a toy example because what I am trying to solve is slightly more involved
olauzon has joined #ocaml
<Leonidas>
if I understand it correctly, k does not always have to have the same type, right?
<thizanne>
in your exemple k will be int list -> 'a
<seliopou>
hey all, is there a way to make utop play nice with loading packed libraries during development?
<Drup>
seliopou: the thing you are going to use are 1) compiler-libs and more precisely, Parsetree and Ast_helper (in the directory parsing) 2) https://github.com/alainfrisch/ppx_tools ppx_metaquot in particular
igitoor has joined #ocaml
igitoor has quit [Changing host]
<jpdeplaix>
whitequark: mmh this version seems outdated :/
<whitequark>
jpdeplaix: huh?
<whitequark>
i took the latest from opam-repository.
<companion_cube>
I wonder, is writing a ppx in the same file it's used going to be a viable use of ppx