<axiles>
flux: that was the web interface, you can do "git clone git://git.tuxfamily.org/gitroot/ocamlirr/ocamlirr.git" as described in the README
zpe has joined #ocaml
<flux>
ah of course :-)
<flux>
too used to github which convenienly provides both at the same place
<axiles>
yes, for my new projects, I also use github
zpe has quit [Ping timeout: 258 seconds]
dsheets has quit [Ping timeout: 246 seconds]
<dmbaturin>
Batteries don't work with 4.02 yet, or it's just opam packaging that needs to be updated?
fold has quit [Ping timeout: 272 seconds]
<flux>
axiles, quite a shame there's so much manual work in the bindings. I wonder if Kakadu's work on lablqt could be somehow used here..
<dmbaturin>
Speaking of labl*, do they get statically linked?
<Drup>
dmbaturin: it's fixed upstream, the release is planned "soon"
<flux>
they usually link the widget libraries dynamically
<axiles>
flux: yes, when re-writting I should use more generators (currently only the enums are binded automatically)
<dmbaturin>
That is, if I build a native binary, will it work on any machine whether it has ocaml runtime and the Gtk or Qt libs installed?
samrat has quit [Ping timeout: 260 seconds]
<flux>
dmbaturin, yes. for example, look at unison-gtk.
<Drup>
dmbaturin: you don't even need the ocaml runtime if it's native code
<axiles>
also, I wonder if I should keep using objects, and instead using just modules and phantom types
<dmbaturin>
Well, native code doesn't rule out dynamically linked runtime in general case. :)
<dmbaturin>
Also, do the gtk or qt bindings work on OS X?
<axiles>
I wonder if ocaml-efl run on OS X
<flux>
axiles, well, I don't mind the object interface, but it does introduce some additional work, doesn't it?
<axiles>
the most important problem now is that, I have not made the methods polymorphic (for example, the type of a argument is "node" instead of "#node", so this usually requires casting with ":>" )
yacks has quit [Quit: Leaving]
<flux>
I suppose I don't mind a few :>'s here and there, it's the way of OCaml OO :-)
<dmbaturin>
ggole: Got a link for the scheme paper?
<ggole>
scheme2006.cs.uchicago.edu/11-ghuloum.pdf
<vanila>
I also had a quick look at mincaml and camllight
<dmbaturin>
http://miranda.org.uk/ Miranda is proprietary, but the binaries are available and even work on linux (although I never tried complex code in it).
<vanila>
I was able to translte the miranda code into haskell
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<dmbaturin>
Yeah, I think one familiar with haskell can translate it in mind.
<bjorkintosh>
vanila, have you looked at EOPL?
<bjorkintosh>
or LISP In Small Pieces?
<vanila>
I did look over LISP it was a abit overwhelming - ill get EOPL and see how it is
<bjorkintosh>
EOPL is scheme-heavy.
<dmbaturin>
EOPL?
<ggole>
If you've read most of this stuff it's time to start implementing IMHO
<bjorkintosh>
dmbaturin, Essentials of Programming Languages.
<ggole>
If you start very small and go all the way to running assembly, you'll learn a lot in a short time and have some progress to feel good about too.
<bjorkintosh>
that's the theme of the nano compiler paper isn't it?
<ggole>
I think that's more about writing lots of small passes.
<bjorkintosh>
ah right.
pyon has joined #ocaml
<vanila>
I'vee been practicing assembly programming a little, it's really ahrd
<vanila>
I was thinking to target C to start with
<bjorkintosh>
vanila, it is? in which instruction set?
<vanila>
or maybe building some kind of low level interpreter to target that could come before assembly
<vanila>
x86
<bjorkintosh>
oh right.
<bjorkintosh>
you could target the jvm instead.
<ggole>
Then you have to figure out how to warp your language to fit in Java byte code, blurgh
<bjorkintosh>
ggole, other humans have done and it lived to blog it.
<ggole>
I don't think they made their job much easier though.
<dmbaturin>
I'd rather target a register machine such as parrot, but it could be my personal preference.
<bjorkintosh>
is parrot still alive/
<bjorkintosh>
?
<dmbaturin>
Well, still buildable for sure.
<dmbaturin>
Not sure about targeting LLVM, haven't looked into it.
<Drup>
targeting llvm is nice
<Drup>
because of several points
<bjorkintosh>
Like?
<Drup>
1) you don't have to write the code emition part, which is horrible
<ggole>
That's half the fun!
<Drup>
2) there are ocaml bidings
<ggole>
(Probably a bit more than half of the fun, to be honest.)
<Drup>
3) you can yell at the maintaners here
<bjorkintosh>
vanila, what are your constraints in your project?
<vanila>
I had a look at a LLVM tutorial yesterday, but there was no GC involved
<bjorkintosh>
must it be FP?
<Drup>
ah, yes, GC.
slash^ has quit [Read error: Connection reset by peer]
<ggole>
What's the goal?
<vanila>
bjorkintosh, well this is a personal goal - I want to write a compiler with lambda because it's my favorite thing in programming
<vanila>
it could be a good idea to do a simpler language first
<ggole>
^
<bjorkintosh>
vanila, definitely look at the 1001 scheme papers then.
<dmbaturin>
vanila: I have an idea to make a compiler that shows you how exactly it did the type inference. Perhaps I could join.
<vanila>
dmbaturin, col
<vanila>
cool!
<tac_>
vanila: You work a bit with Idris, right?
<bjorkintosh>
however, if you're comfortable with sml, chapter 9 of 'ml for the working programmer (2nd edition), is about writing interpreters for lambda.
<tac_>
You could hook into the Idris backend
<vanila>
tac_, I tried it out
<vanila>
I mostly want to do this from scratch though
<bjorkintosh>
what is scratch?
<bjorkintosh>
wiring your own board?
Hannibal_Smith has joined #ocaml
<tac_>
hehe
<bjorkintosh>
and then flipping switches?
<tac_>
vanila: I've wanted to do the same thing
<bjorkintosh>
or perhaps building it in an FPGA
<bjorkintosh>
that's pretty scratch.
<vanila>
haha
<tac_>
vanila: Do you own a raspberry pi? It might be fun to write a basic compiler for ARM assembly
<bjorkintosh>
or ... just writing it out on the ground in the dirt.
<vanila>
i dont have one but it's always option to emulate, and I've heard ARM is a nice instruction set to target
<tac_>
On a slow-ish processor like ARM, too, it becomes apparently pretty quickly when you need to work on optimizing things :)
<tac_>
it is
<bjorkintosh>
ARM is not slow.
<ggole>
There are emulators for various ISAs, don't necessarily need the hardware
<tac_>
It's low-power. It's going to be naturally slower than a modern Intel aimed at desktops
<bjorkintosh>
tac_, it's faster than your first multimedia windows box.
<tac_>
I believe that Raspberry Pis, Android devices, and Arduinos all tend to run on ARM assembly, too, so you could run your code on many different devices
<tac_>
bjorkintosh: I'm not arguing that :)
<vanila>
dmbaturin, I wanted to also make a editor that did type inference as you program but it's maybe a bit unrelated.. :)
<bjorkintosh>
arduinos do not. they have a different ISA.
<tac_>
oh really?
<bjorkintosh>
tac_, atmel
* tac_
learns
<bjorkintosh>
i think the newest ones might have ARM processors in them.
<tane>
there's one with ARM and one with an intel
<vanila>
im very open to collab on this with people if they want to join in - i've been working on it with two of my friends already
<bjorkintosh>
tane, much, much newer.
<flux>
arduinos are 8-bit, arms 32-bit, big difference :)
<tane>
well, i checked yesterday. going to get a starter kit for christmas holidays
<flux>
well, except Arduino Due? Duo?
<Drup>
bjorkintosh: I actually got that as a baschelor project
<whitequark>
arduino is a form-factor and an API, it doesn't limit you to a particular CPU or even ISA.
<Drup>
we designed the chip to load it in a FPGA, we designed the assembly to go in it and the wrote a very small file system for it.
<bjorkintosh>
Drup, how did that go?
<flux>
of course, whitequark is technically correct :)
<Drup>
(as expected, since it was only 3 month and we were only baschelor students, it didn't work at the end :D)
<whitequark>
Drup: oh cool, at least some academia keeps up to date
<flux>
drup, points for trying, though?-)
<bjorkintosh>
haha
<Drup>
indeed
<Drup>
and it was quite fun :D
<bjorkintosh>
Drup, which board did you use?
<Drup>
I don't remember X_x
<vanila>
that's amazing FPGAs are so cool, i definitely want to work with them in future if possible
pgomes has joined #ocaml
<tac_>
vanila: have it run simply typed lambda calculus directly in the hardware :)
<bjorkintosh>
vanila, perhaps you might start there. build whatever sort of lowlevel machine you want.
<bjorkintosh>
yeah. what tac_ said.
<bjorkintosh>
that sounds like its own project.
<dmbaturin>
Targer MMIX. ;)
<bjorkintosh>
oh.
<dmbaturin>
* target
<Drup>
bjorkintosh: I was in charge of doing the assembler so I didn't do the wiring part all that much :p
<bjorkintosh>
yeah.
<flux>
drup, you missed the best part ;-)
<Drup>
bah, depends on your tastes :p
<whitequark>
there really isn't much wiring in FPGAs
<ggole>
I dunno, x86 assembly isn't really that hard
<whitequark>
but!
<whitequark>
you can use the same synthesis tools to emit netlists and then implement them with discrete ICs
<Drup>
the main thing I remember about this fpga
<dmbaturin>
x86 assembly is annoying, but not quite hard.
<whitequark>
or even transistors if that's what you like.
<ggole>
And you can always write a little test program in gcc and then stare at the output
<whitequark>
the biggest computer in the world
<Drup>
is that we were using quartus as sotfware
<Drup>
and it was horrible
<dmbaturin>
Although any platform has it oddities.
<whitequark>
Drup: look at yosys.
<bjorkintosh>
whitequark, have you worked with FPGAs?
<whitequark>
dmbaturin: x86 essentially consists of oddities, that's the problem with it
<whitequark>
bjorkintosh: yes.
<bjorkintosh>
whitequark, what did you do with it? and which one was it?
<dmbaturin>
whitequark: Yeah, the point I was making was that there's no perfect assembly.
<bjorkintosh>
dmbaturin, i've heard great things about MIPS
<whitequark>
HAHAHAHAHA
<whitequark>
the words of someone who never touched MIPS, I suppose
<bjorkintosh>
what? is it funnier than X86, whitequark?
<whitequark>
bjorkintosh: you'd be hard-pressed to make something worse than x86, but it's pretty terrible
<bjorkintosh>
huh. really?
<whitequark>
yes. the good thing about MIPS is that it's mostly patent-free, so you can take it and run with it
<whitequark>
with ARM, lawyers will be on you with their shaky hands and DMCA takedown requests in no time
<dmbaturin>
bjorkintosh: Ubiquiti EdgeRouterLite is a nice $100 dev board, get one and try. :)
<whitequark>
when you download the programming manual, you have to agree to not implement the ISA from scratch, for example.
<Drup>
x)
<dmbaturin>
(It's a decent router too)
<whitequark>
dmbaturin: it has an FPGA and is hackable? huh
<dmbaturin>
whitequark: It's cavium octeon 5020, but it runs a complete linux on a 2GB flash and 512MB RAM, so you even can install binutils and gcc on it and avoid messing up with cross-toolchain.
<bjorkintosh>
dmbaturin, and the FPGA bits?
<dmbaturin>
No, no FGPA. 5020 is a SoC actually.
<whitequark>
oh
<bjorkintosh>
oh. MIPS.
<dmbaturin>
Also, it's MIPS64.
<whitequark>
MIPS seems to have some odd foothold in networking gear
<bjorkintosh>
well, the linksys routers (running dd-wrt) have MIPS processors as well.
<bjorkintosh>
i think.
<Hannibal_Smith>
whitequark, just for curiosity, how is ARM architecture manual respect the Intel one, quality wise?
<whitequark>
Hannibal_Smith: I don't remember both nearly well enough to make a sound comparison
<Hannibal_Smith>
Ok, thank you
<whitequark>
ARM ARM is very nice though
<Hannibal_Smith>
Just another question, it has an optimization manual?
<whitequark>
(it's ARM ARM ARM, in fact. Advanced RISC Machines (ARM) ARM (architecture) Architecture Reference Manual)
<Hannibal_Smith>
Uhm...maybe this question don't make sense
<Hannibal_Smith>
Sorry
<whitequark>
Hannibal_Smith: ARM CPUs weren't nearly as complex as x86 ones until very recently (AArch64)
<whitequark>
so you'd usually just have a simple pipelined core. not superscalar or something. thus, the ISA description would fill most of that
<whitequark>
AArch64 is much more complex though, but I haven't worked with it.
<dmbaturin>
PDP-10 assembly is very nice, although I wasn't doing much with it because I never found the TOPS-20 API reference.
<dmbaturin>
It is sure available somewhere, I just have no idea where can it be. :)
<whitequark>
let's not discuss necrophilia, right
yacks has joined #ocaml
<whitequark>
although I did try to write an LLVM backend for PDP-7 once
<dmbaturin>
You say necrophilia like it's a bad thing.
<whitequark>
ಠ_ಠ
<asmanur_>
that's some sexuality-shaming indeed
<Drup>
(At this point, I would like to point out that this chan is archived and that the logs are public :D)
<ggole>
Wonder how the oddballs did strings? Encoding? One char per word?
<whitequark>
there are so many horrifying ways to do strings.
<whitequark>
like stuff four 9-bit characters into 36-bit words
<whitequark>
... I think 9-bit? I'm glad I don't remember it, honestly
<dmbaturin>
whitequark: On PDP-10 char is 9-bit.
<whitequark>
it might have been something like five 7-bit characters and a continuation bit
<ggole>
Yeah, probably heaps of fun
<ggole>
(Moreso because software wasn't arrange in giant interdependent crapheaps back then.)
<bjorkintosh>
dmbaturin, what did you need Tops on a unix machine for?
<dmbaturin>
bjorkintosh: Huh? There were no UNIX-like systems for the 10, to my knowledge.
<bjorkintosh>
ever?
<dmbaturin>
Yep. People ran either TOPS-[12]0 or ITS.
<bjorkintosh>
what then did they run unix on back then?
<bjorkintosh>
pdp (something else)?
<bjorkintosh>
9?
<bjorkintosh>
11?
<dmbaturin>
I've never seen ITS myself. UNIX was on PDP-11 and later on VAX.
<bjorkintosh>
was there anything noteworthy about TOPS-20 as far as OS design?
<dmbaturin>
I didn't look deep in the internals so I can't judge here. From user point of view, it had command line completion when no one else (probably) had it.
pgomes has quit [Quit: Leaving]
<dmbaturin>
VMS _still_ does not have completion in any form.
<dmbaturin>
Even though TOPS-20 is long dead and VMS is still supported. :)
<bjorkintosh>
still? it's ... alive :-?
<dmbaturin>
If "you can buy licensed and support" counts as "alive", then yes.
<dmbaturin>
* licenses
rgrinberg has quit [Quit: Leaving.]
BitPuffin has quit [Ping timeout: 272 seconds]
Denommus has quit [Ping timeout: 245 seconds]
Denommus has joined #ocaml
jabesed has quit [Quit: Konversation terminated!]
cago has left #ocaml [#ocaml]
demonimin_ has joined #ocaml
zpe has joined #ocaml
shinnya has quit [Ping timeout: 244 seconds]
demonimin has quit [Ping timeout: 260 seconds]
rand000 has quit [Ping timeout: 245 seconds]
zpe has quit [Ping timeout: 258 seconds]
rand000 has joined #ocaml
ebzzry has quit [Ping timeout: 245 seconds]
ollehar has joined #ocaml
rgrinberg has joined #ocaml
morphles has joined #ocaml
avsm has quit [Ping timeout: 245 seconds]
ebzzry has joined #ocaml
<seangrove>
I'm having trouble with OCaml in emacs
beginner has joined #ocaml
<seangrove>
I can run a program in utop, but when saving a file in emacs (with Tuareg, merlin modes), I get an "Unbound module" problem with a line: Open Core.Std;;
<def`>
M-x merlin-use core
<beginner>
i am trying to include a module in a different folder with corebuild -I +../path test.native, but end up with unbound module
<def`>
and read merlin wiki about .merlin
<def`>
beginner: try without +
<seangrove>
def`: Yeah, I have a .merlin, will look into it more, thanks
<beginner>
def`: i tried that, but get Included or excluded directories must be implicit
ollehar has quit [Ping timeout: 258 seconds]
<seangrove>
Hrm, looks like things working in utop but not outside it is kind of common
jabesed has joined #ocaml
<beginner>
does someone here use corebuild?
<ggole>
beginner: hmm, I see the same issue (with ocamlbuild, which is essentially the same thing)
<beginner>
ggole: but isnt it a common task to include files from different folders?
Hannibal_Smith has quit [Quit: Sto andando via]
<ggole>
For some reason it expects everything to be in the directory
<ggole>
Either make a symlink, or pass the directory with -cflags
ollehar has joined #ocaml
zpe has joined #ocaml
<beginner>
ggole: thanks, with a symlink it s working
<seangrove>
Am I missing something here? I've pasted my .ocamlinit file, and the list of opam packages installed, my ~30 line script, and the 'Unbound module Core' output https://gist.github.com/sgrove/d8ac0427909774345d7b
<ggole>
beginner: I'm not able to get -cflags to work, so it seems a symlink is the way.
zpe has quit [Ping timeout: 240 seconds]
<ggole>
seangrove: start just "ocaml" and play around a bit to see what happens
<seangrove>
ggole: Good call
<seangrove>
Same problem
<ggole>
So it's the code in .ocamlinit
<ggole>
Try it line at a time and see which one falls over
<ggole>
I'm guessing it's open Core.Std, but it's nice to know.
<ggole>
(Oh, to try it line at a time, start with -noinit.)
<seangrove>
ocaml -noinit ?
<ggole>
Yep.
thetabyte has joined #ocaml
<seangrove>
Looks like this, maybe?
<seangrove>
#require "core.top";; => No such package: core.top
<seangrove>
Same with async...
<def`>
you just don't have the switch setup in your path
<def`>
PATH*
<def`>
what is your opam switch? I guess your emacs is started from finder. What is the value of, for instance, M-x getenv PATH ?
<seangrove>
def`: I'm doing this from the terminal right now, thought I'd try to fix it there first
<def`>
seangrove: indeed, that's better
<seangrove>
So `echo $PATH` => /Users/sgrove/.opam/system/bin:...
<seangrove>
That's the only mention of opam anyway
<ggole>
Have you ran eval `opam config env` (or have it in .bashrc?)
<seangrove>
Yeah
<ggole>
There should be other OCAML entries in PATH, surely
hhugo has joined #ocaml
<def`>
`ocamlfind list` returns the expected list of package?
<seangrove>
Updated it with the output of `ocamlfind list`
thetabyte has left #ocaml [#ocaml]
<ggole>
Ah, they don't correspond
<ggole>
...um, why not?
hhugo has quit [Ping timeout: 260 seconds]
* ggole
scratches his head
<def`>
seangrove: I would switch to an opam managed compiler, that might not be the cause of your problem, but I got strange things when using system compiler from opam, since I always use a local one
<seangrove>
ok, let me try that
<ggole>
Worth a try
<ggole>
I was about to ask what Sys.getenv "OCAML_TOPLEVEL_PATH" returns in your toplevel, but do that first.
<seangrove>
just `opam switch 4.01.0`
samrat has quit [Quit: Computer has gone to sleep.]
<ggole>
And make sure to follow the instructions regarding eval `opam config env`, since the environment changes that makes are crucial.
<ggole>
(And do keep in mind that they will be local to your terminal.)
<seangrove>
Oh, eval'd, reinstalling the libraries
<companion_cube>
gasche: btw I think there are compile errors in batteries' master
iorivur has quit [Ping timeout: 260 seconds]
<gasche>
companion_cube: are there solved in my release-in-progress branch?
<gasche>
s/there/they/
morphles has quit [Ping timeout: 258 seconds]
<companion_cube>
no idea, my CI only tries master iirc
<gasche>
hm
<gasche>
is that a recent failure?
<companion_cube>
oh, last commit is ok apparently
fold has joined #ocaml
<gasche>
yeah ok
<gasche>
that's a syntax error in a test by madroach
<ollehar>
(anyone here from paris?)
<gasche>
it was fixed in a later commit
<gasche>
ollehar: plenty, why?
<companion_cube>
ollehar: many people, yeah
<gasche>
companion_cube: how do I subscribe to get emails when your CI fails?
<ollehar>
might go there over a weekend, and thought maybe I could crush on someones couch? or am I being too forward? :)
<companion_cube>
gasche: I'll do it :p
zpe has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
BitPuffin has joined #ocaml
Submarine has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
ski has quit [Ping timeout: 244 seconds]
NoNNaN has joined #ocaml
ski has joined #ocaml
badkins has joined #ocaml
oscar_toro has quit [Ping timeout: 246 seconds]
rgrinberg has joined #ocaml
<seangrove>
Is there a way to be sure that .ocamlinit is being run? if I copy the contents of it into my .ml file, it seems to work (with the exception of one unbound Cohttp_async module), but if I leave it in .ocamlinit, it reverts back to the unbound module Core error
<orbitz>
seangrove: print_endline "foo";; ?
<ggole>
Do you have another .ocamlinit in the same directory?
<ggole>
If not, ~/.ocamlinit will be run.
contempt has quit [Disconnected by services]
contempt has joined #ocaml
<seangrove>
I have a .merlin, which I assume is unrelated. If I just run `ocaml`, "foo" get printed out as per orbitz' suggestion. But if I run `ocaml server.ml`, it doesn't
<ggole>
Oh, hmm... I never use ocaml the second way.
<ggole>
Maybe it skips .ocamlinit if there's a script file argument
<seangrove>
Oh, how do you usually invoke scripts?
<ggole>
I usually either send them from emacs or use them compiled.
<ggole>
There's #use, too
<seangrove>
M-x utop?
<seangrove>
Do you eval form-by-form, or do you
<seangrove>
Sorry, or do you eval the whole buffer at once?
<ggole>
Depends what I'm doing, really
<seangrove>
I'm coming from the clojure/lisp world, so trying to get my head around the workflow
<ggole>
Working on a largish project, I usually tell the build system to construct a toplevel that contains all the stuff already linked, and run that.
<ggole>
For random test code, just sending the buffer from emacs works OK.
pyon has quit [Quit: I feel as if... The fear fades away.]
axiles has quit [Remote host closed the connection]