jamii has quit [Remote host closed the connection]
oriba has quit [Remote host closed the connection]
lopex has quit []
everyonemines has joined #ocaml
Modius has joined #ocaml
mjonsson has joined #ocaml
mjonsson has quit [Read error: Connection reset by peer]
tautologico has quit [Quit: Leaving]
emmanuelux has quit [Ping timeout: 260 seconds]
everyonemines has quit [Quit: Leaving.]
joewilliams_away is now known as joewilliams
arubin has quit [Quit: arubin]
KDr2 has joined #ocaml
KDr2 has left #ocaml []
struktured has quit [Ping timeout: 258 seconds]
struktured has joined #ocaml
sebz has joined #ocaml
sebz_ has joined #ocaml
sebz has quit [Ping timeout: 260 seconds]
sebz_ is now known as sebz
sebz has quit [Quit: Computer has gone to sleep.]
joewilliams is now known as joewilliams_away
sebz has joined #ocaml
ulfdoz has joined #ocaml
othiym23 has quit [Ping timeout: 260 seconds]
othiym23 has joined #ocaml
everyonemines has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
<everyonemines>
Am I the only one who uses ;; in source files, or are most people using in or nothing?
<zorun>
mmh, nothing at all
<everyonemines>
ocamlrun got me in that habit of doing that, and sometimes I feel like I shouldn't use them in code so much, but ultimately it doesn't really matter
<penryu>
I use them like ; in ruby or mysql: only when required to disambiguate code, or to kick the REPL into motion
<everyonemines>
Well, sometimes I write long imperative functions, and I don't like indenting long functions, and the ;; helps remind me where stuff ends.
<everyonemines>
But mostly it's just habit.
<everyonemines>
....nobody's going to tell me "writing long imperative functions is bad" ?
wagle has quit [Ping timeout: 258 seconds]
wagle has joined #ocaml
everyonemines has quit [Quit: Leaving.]
wagle has quit [Ping timeout: 258 seconds]
wagle has joined #ocaml
ulfdoz has quit [Ping timeout: 276 seconds]
rixed has quit [Ping timeout: 240 seconds]
ttamttam has joined #ocaml
ikaros has joined #ocaml
sebz has joined #ocaml
edwin has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
everyonemines has joined #ocaml
larhat has joined #ocaml
<adrien>
everyonemines: there are definitely peoples using ';;' in .ml files, inria peoples first
<flux>
indentation is helpful as well :)
<flux>
I don't see there's a problem with ;;, other than that you cannot take the piece of code and put module A = struct end around it.
<flux>
in fact, sprinkling ;; can help you get better error messages
<everyonemines>
flux: you sure? I thought you could.
<flux>
hmm
<flux>
indeed, in my test it appears to work
<flux>
yes, no problem. so it's all good :)
<adrien>
I write perfect code and never get error messages, that's why I never use ';;' /o\
<everyonemines>
When I was reading what people thought of different languages I heard a million complaints about ;; but in practice it's such a nonissue I use them even though they're unnecessary
<flux>
it makes me feel more of a man when I don't use redundant lexemes!
<adrien>
yup, ';;' is really not an issue
<flux>
in any case, if someone complains about the ;;'s, I can just tell them that they aren't needed
<flux>
:)
<adrien>
on the one hand you get people who say that ocaml is too condensed and that makes it not clear enough (they prefer something more verbose like java since "it is easier to understand")
<flux>
but it may be confusing for a newbie to see when they are needed and when not
<flux>
if they don't remember to put them always
<adrien>
on the other hand, you have people who think ocaml makes you write too many useless words
<flux>
and notice that hm, this piece of code works without ;;, but this doesn't
<everyonemines>
Let/in/;; is actually a little confusing for some new ocamlers
<everyonemines>
but it's a perfectly logical design choice
<flux>
everyonemines, I guess you know the rule you need to follow when omitting ;;'s?
<everyonemines>
Well, if the end of a let statement is followed by another let, there's an implied ;;
<everyonemines>
but if you have an imperative command / function call in there you need ;;
<flux>
well, I have a rule that explains it otherwise
<flux>
a file is composed of blocks that are separated with ;;
<flux>
a block consists of EITHER an expression or a sequence of top-level statements
<everyonemines>
Well yeah, it can also change scope of some definitions above it.
<flux>
hm?
<everyonemines>
er, that's not the right way to put that
<everyonemines>
I mean it breaks a chain of let...in
<flux>
well, it separates an expressions from each other, yes, because they are in different blocks then
<flux>
and let..in.. is not a statement, it's an expression
<flux>
as in: it has a value
<everyonemines>
They sort of do, but I don't really think of let statements of having a value.
<everyonemines>
*as having
<penryu>
I definitely do, but that might be the Scheme talkin'
<everyonemines>
I have a gift for you guys:
<everyonemines>
let ( << ) = ( := )
<everyonemines>
so much easier to type!
<flux>
everyonemines, there's a difference. let a = 42 is a statement, let a = 42 in b is an expression
<flux>
the first has no value (it just states from where on a is bound to 42) while the latter has value b
<flux>
you could maybe say its first part (let a = b in) is a statement, but that's not the whole syntax of the expression, it has the 'b' part as well
<everyonemines>
flux: What I was calling an expression was the 1st part of the 2nd thing.
<everyonemines>
Er, what I was calling a statement was the 1st part.
<everyonemines>
Like you said, part of the expression.
<flux>
yes, well, that's "nothing" in my mind, making as much sense as talking about the "for a" part of "for a = 1 to 1 do () done"
<everyonemines>
It's as much something as a function definition. But this is just semantics.
<flux>
hm, well it's not a definition of any kind
<flux>
it's part of a syntax, and that makes it just a sequence of characters. it has a label, it has a subexpression, but it doesn't yet mean anything, until we have the whole expression
<flux>
while it does, perhaps unfortunately, lend the syntax of the let statement
<everyonemines>
flux: Idea for a reality show: Scheme programmer and FORTRAN programmer live in the same house
<everyonemines>
flux: If you compile half the program, it doesn't mean anything without the other half either.
<everyonemines>
We break things up into conceptual pieces, but what makes up a piece is subjective.
<flux>
everyonemines, it can mean in ocaml, because a truncated program may still be a whole, if not non-sensical, program
seafood has joined #ocaml
<flux>
but for example, a module without 'end' would not be complete
<flux>
uh, unintentional double-negative
<flux>
or for example let's say we have: tyep a = (int *
<everyonemines>
OK, but you don't have to always mentally organize things the same way the compiler does.
<flux>
(without the typo in type)
<flux>
I wouldn't even start to discuss the meaning of that statement :)
<flux>
because the language doesn't understand it, because it is incomplete
<everyonemines>
What I meant was, a program fragment could be incomplete to the lexer, but conceptually complete to a person in some sense.
<everyonemines>
We're using the word to mean different things.
<flux>
in that case we're approaching the domain of pseudo code
<flux>
which may be very well understood. or it may be misunderstood, because there aren't really standards for that kind of programs.
<everyonemines>
flux: Good communication between programmers, or perhaps I should say conceptual compatibility, is something that's very important and poorly understood, and I don't think it comes down to lack of standards.
<flux>
everyonemines, someone might understand the code differently because he expects 0-based arrayrs, while a pseudocode (..or lua-code..) might use 1-based arrays.
<everyonemines>
That's a shallow kind of difference, though, and not what I think causes the most problems....although off-by-1 errors are certainly a common bug.
<everyonemines>
Arguably using arrays starting at 1 reflects a deeper difference in how people think about them actually.
<everyonemines>
....but I agree about that being a problem, and standards being necessary. I just think there's more involved.
Kakadu has joined #ocaml
seafood has quit [Quit: seafood]
<adrien>
Kakadu: please fasten your sear belt
<adrien>
zsh: ./build.ml: bad interpreter: /usr/bin/ocaml: no such file or directory
<adrien>
maybe you could use oasis for the build steps
<Kakadu>
adrien:
<Kakadu>
adrien: It's difficult to explain oasis about autogenerated files
<adrien>
why does lablqt depend on core_extended?
<Kakadu>
I've asked a question about this before
<adrien>
Kakadu: for the first step of the build it should be ok
<adrien>
and why does it depend on ocamlgraph?
<Kakadu>
adrien: I my favourite ocaml conference on jabber.ru server user ermine says that she have never seen any useful library which depends on js's core
<adrien>
that doesn't sound like a very good reason :P
<Kakadu>
adrien: )
<edwin>
Kakadu: some integration of lablqt with React would be interesting
<adrien>
Kakadu: so, what are the steps for new signals and slots, does it take an extra preprocessing step like in C++?
<adrien>
edwin: btw, I got my lablgtk-react stuff mostly ready; and you had asked how I would do when I would have multiple layers of elements, turns out I already do and the solution is quite simple: I want functional updates for my Zipper and for the elements in the zipper, but the elements in the zipper can be simply updated with a Zipper.set operation
<Kakadu>
adrien: Now use, but it is not a big problem to avoid it. I have seen sources of Qt's moc and implement is is only time question
<adrien>
Kakadu: I want to make a new signal, how do I proceed?
<Kakadu>
In current version only new slots are supported
<adrien>
Core sure doesn't build very quickly
<everyonemines>
If you're using LGPL you can just copy code from core_extended into your library.
<adrien>
ok, and then, does it take extra steps?
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
lopex has joined #ocaml
<adrien>
Kakadu: also, why do you use tyxml? (curious)
<adrien>
I have to say I'm not really looking forward to debugging all that
<Kakadu>
adrien: In Russia people said that it is not good to stop after half-step.
<Kakadu>
I want to say that core_exteded is needed to)
<Kakadu>
Yes, you can kill me))
<everyonemines>
Why not just copy the stuff you need from core into your library?
<adrien>
Kakadu: I don't think I'm at half step, more 1/10th
<Kakadu>
I ahver represented my thought warong way
<Kakadu>
A user gds from jabber is very interesting in person who will use js's libraries and reports its experience
<Kakadu>
thats why to use core and anot to use extended for me will be a half-step
<Kakadu>
anot <- not
<adrien>
ah, ok
<adrien>
as far as I'm concerned, I'd love to try lablqt but the Core stuff is just a big annoyance that I'm not willing to fix right now
<adrien>
they've been hard to follow for the past few months
<everyonemines>
Kakadu: Seriously, why not just copy-paste the core modules you need into your code?
<everyonemines>
on a different topic, I'm not super-experienced with ocaml, and there are a number of ocaml tutorials already, but I was thinking of writing another one, and I was wondering what kind of tutorial might be good
<adrien>
after some time thinking the same, and starting a basic one, I think the best first step is to collect all the tutorials you can find
<adrien>
there are actually a _lot_
<adrien>
basically, there's one per university teaching caml
<everyonemines>
I remember not liking the tutorials I found when I was learning ocaml, but there might have been better ones.
<everyonemines>
Maybe someone just needs to put together the best parts of the better tutorials.
<larhat>
and itroduce ocamlfind and oasis in the first letters :-)
<everyonemines>
I think you'd start with GODI
sebz has quit []
<adrien>
everyonemines: I mostly agree with you but there are many more tutorials than what you probably thing
<adrien>
think
<adrien>
*
<adrien>
as for the tools, you definitely want to mention them; I recently introduced someone who's been on #ocaml-fr for a few years to ocamlbrowser for instance (and others)
<everyonemines>
maybe ocamlbrowser is underused but I'm not sure it's tutorial material
<everyonemines>
only seems useful for larger projects
<adrien>
not for the tutorial: for the conclusion and opening words
<adrien>
bbl
etosch has quit [Quit: This computer has gone to sleep]
everyonemines has left #ocaml []
emmanuelux has joined #ocaml
Cyanure has quit [Remote host closed the connection]
Cyanure has joined #ocaml
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
Kakadu has quit [Ping timeout: 252 seconds]
etosch has joined #ocaml
rixed has joined #ocaml
ftrvxmtrx has joined #ocaml
joewilliams_away is now known as joewilliams
Cyanure has quit [Remote host closed the connection]
<hcarty>
thelema: I've been away for a while, but I'm happy to see that some conclusion was reached on how to unify the Batteries module.
<hcarty>
thelema: re: threads or no threads
<thelema>
I'm happy to get rid of that annoyance too.
<hcarty>
The only pain is that "-thread" needs to be manually specified somehow. Can that be addressed in the META file, without requiring manual intervention?
<hcarty>
Manual intervention on each compilation and toplevel use, that is.
<thelema>
Although one of the suggestions on the email list started me in a path that makes sense - breaking the toplevel Batteries module into two separate modules, with no overlap.
<thelema>
hcarty: that's a findlib limitation as far as I can tell
<thelema>
Batteries and Batteries_thread
<thelema>
We tried doing this, but with Batteries_thread containing batteries
<hcarty>
Mutex and friends live in Batteries_thread in this case?
<thelema>
this leads to our problem
joewilliams is now known as joewilliams_away
<thelema>
in this new organization, Batteries is usable under threads and under no-threads
<thelema>
but you have to open both Batteries and Batteries_thread to get both
joewilliams_away is now known as joewilliams
<thelema>
And batteries_thread is built as a separate module that does thread initialization stuff on startup
<hcarty>
Is this coming in 2.0?
<thelema>
yes, mutex and anything requiring -thread lives in Batteries_thread
<thelema>
well, I still have to build it and let people try it out
<thelema>
It won't be any sooner than 2.0
<flux>
thelema, is there any stuff that could take advantage of threads if threads are around? for example to provide more safety with mutexes?
<thelema>
2.0 will either require threads or use this architecture
<hcarty>
Sounds reasonable
<thelema>
flux: yes, some of the metrics modules I've been working on would require threads for a tick event
<thelema>
flux: as to more safety, the META will link in Batteries_threads if the (mt) predicate is on, meaning that real locking primitives will be put in place of dummy ones that get used in non-threaded code
<thelema>
flux: I'm not sure what you want RE: more safe mutexes
<flux>
thelema, I meant that a tick event wouldn't need mutexes in single-threaded code, but would need them in multi-threaded
<thelema>
flux: the way batteries does this now is by having mutex refs in each module that default to NOOP code, but that get set to real mutexes as part of the loading of Batteries_thread
<thelema>
Is it even possible to have a tick event in single-threaded code without taking control of the execution path from the client code (as in lablgtk, lwt)?
<flux>
I don't know what a tick-event is :). I was thinking perhaps you could have a main loop in your app, such as in lablgtk, lwt, and issue the tick there.
<thelema>
The tick event is needed for a loadavg-like meter, which needs to decay even when no events trigger it.
<thelema>
This meter is intended to be used as a library, thus using a main loop would be... burdensome... on the client.
<flux>
yes, but sometimes you already have a main loop
<flux>
for example in games.
<thelema>
sure, but often you don't.
<flux>
well, then you can just choose to use threads?
<thelema>
yes, I'll need threads to do this meter. Which just means it'll be in the Batteries_threads module
<thelema>
err, BatteriesThreads -- wrong naming standard
<flux>
thelema, actually it might be preferable for a game to issue such ticks manually in a loop, because then you might be able to answer better questions like 'how many x was done per frame'
<flux>
(very accurately)
edwin has quit [Read error: Operation timed out]
Associat0r has joined #ocaml
avsm has joined #ocaml
<thelema>
The intent of this is 1, 5, and 15 minute EWMA throughputs, ala load avg.
<thelema>
the concept of using an EWMA to answer 'how many x per frame' doesn't match up
<thelema>
although I can see the use for allowing the client to specify their own "ScheduledExecutorService" (event loop/thread/etc.)
<thelema>
but I need a simple default, and that probably has to be threads.
<flux>
version 1.0 of a new feature doesn't need to provide everything at once :)
<thelema>
yes, but it shouldn't prevent doing the right thing in the future.
<thelema>
I guess v1.0 could require clients to tick the meter themselves
<thelema>
and a future version add a self-ticking thread option
<thelema>
although it doesn't seem hard to just do both in v1.0
edwin has joined #ocaml
lopexx has joined #ocaml
lopex has quit []
lopexx is now known as lopex
DimitryKakadu has joined #ocaml
<adrien>
I can't make up my mind: I have a module X and a functor Bar which take a module type of X as argument; once it has been applied, Bar can't really be used stand-alone and references to the values from X are quite common; currently I "include" X in Bar; does that sound like bad style or whatever?
<thelema>
you can also open X
<hcarty>
thelema: Is there a Batteries standard or semi-standard for naming functions which write to output streams?
<thelema>
print_foo
<hcarty>
thelema: For example, Foo.get : source_t -> string vs. Foo.get_? : source_t -> IO.output -> unit
<hcarty>
thelema: Ah, right. That may make sense in this context...
<thelema>
Foo.print
<thelema>
other way around though, IO.output first if possible
<thelema>
well, after any helper functions that are needed.
<hcarty>
This is for file reading/copying. The previous implementation used a Buffer.t to hold the input data temporarily.
<hcarty>
I'd like to make something more flexible so the input can be held in a value or piped directly to some other location.
<thelema>
so like IO.copy, but... how different?
<hcarty>
It currently uses Buffer.add_string and I'd like to move to IO.nwrite
<hcarty>
With the buffer implementation then becoming a wrapper around the IO-based form.
<hcarty>
The input comes one string at a time
<thelema>
ok... does IO.pipe fit into this?
<hcarty>
I don't think so, since I don't have a IO.input value to work with
<thelema>
so you want to take byte data a chunk at a time and push it somewhere and get it back out in the same order it was pushed in, possibly in different chunks?
<hcarty>
Yes
<thelema>
create a pipe, write your data to that pipe's output and when you're ready, read from its input
<adrien>
sorry, slowass internet connection
<adrien>
not including the module would make some code in my library simpler but on the other hand, it might make using the libarary less nice; I was wondering if someone had previous experience with that or some opinion on the matter
<thelema>
adrien: then go ahead and include the module.
larhat has quit [Quit: Leaving.]
ttamttam has quit [Remote host closed the connection]
Tianon has quit [Ping timeout: 260 seconds]
Tianon has joined #ocaml
Tianon has quit [Changing host]
Tianon has joined #ocaml
<adrien>
after some more thought, it's better to include it :-)
Kakadu has joined #ocaml
DimitryKakadu has quit [Quit: Konversation terminated!]
Kakadu has quit [Client Quit]
Kakadu has joined #ocaml
Kakadu has quit [Client Quit]
Kakadu has joined #ocaml
Kakadu has quit [Client Quit]
Kakadu has joined #ocaml
<Kakadu>
yeah! I've remembered my pass and now DimitryKakadu is Kakadu )
Associat0r has quit [Quit: Associat0r]
ulfdoz has joined #ocaml
<hcarty>
thelema: So a function of source_t -> input?
<hcarty>
thelema: With the output created internally in the function
<thelema>
yup
<hcarty>
thelema: Thanks, I'll give it a shot. Is any buffering performed by IO.input/IO.output streams?
<thelema>
no buffering is inherent in IO.input or output, but many implementations (to/from in_channel/out_channel) are buffered
<kurtosis>
I'm trying to define my own exception in a function, but I get a syntax error. Is it not possible to put the "exception InvalidInput of string" line in my function?
<thelema>
nope, it's got to be toplevel in your file
<hcarty>
kurtosis: Or in a module in a function
<thelema>
yes, toplevel in a module.
<kurtosis>
oh ok thanks
<thelema>
if you want an exception to be defined only within a given function, you'll have to do some funny stuff nesting modules inside functions
<bitbckt>
OCaml dropped that part of SML; no local type or exception defs.
<bitbckt>
(for the best, imho)
ttamttam has joined #ocaml
<hcarty>
thelema: If I write ten megabytes of data to the output returned by IO.pipe, what happens to those bytes between writing and reading from the IO.pipe's input?
<thelema>
they get shoved in a buffer
<hcarty>
Ok, so internally it is similar to what I described earlier - accumulate the bytes in a buffer, then get the bytes when the reading is done.
<thelema>
there's a buffer and a string, writes go to the buffer, and reads come from the string. When the string is empty, the buffer is transferred to the string
<hcarty>
Cool, thanks for the pointer
<thelema>
n/p
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 245 seconds]
ulfdoz_ is now known as ulfdoz
joewilliams is now known as joewilliams_away
joewilliams_away is now known as joewilliams
avsm has quit [Read error: Connection reset by peer]
avsm has joined #ocaml
eb4890 has joined #ocaml
joewilliams is now known as joewilliams_away
joewilliams_away is now known as joewilliams
sebz has joined #ocaml
sebz has quit [Ping timeout: 248 seconds]
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
Associat0r has joined #ocaml
sebz has joined #ocaml
sebz has quit [Client Quit]
<kurtosis>
Is there a way to match two things at once so I don't have to repeat the same code twice? For example if I want a case to execute if list matches the empty list or the list of one element?
<adrien>
| [] | t :: [] -> ...
<thelema>
match l with [] | [_] -> foo
<adrien>
I need to check mine actually
<thelema>
adrien: yours works too
<thelema>
well, except for the t part
<thelema>
_ :: []
<adrien>
yup ;-)
<adrien>
Error: Variable t must occur on both sides of this | pattern
<adrien>
easy to fix but still an error
<kurtosis>
awesome, thanks, the _ syntax is what I couldn't figure out
<thelema>
_ matches anything and doesn't give it a name.
ttamttam has quit [Remote host closed the connection]
Kakadu has quit [Quit: Konversation terminated!]
junsuijin has joined #ocaml
ulfdoz has quit [Ping timeout: 276 seconds]
thelema has quit [Remote host closed the connection]
thelema has joined #ocaml
junsuijin has quit [Ping timeout: 248 seconds]
etosch has quit [Quit: This computer has gone to sleep]
_andre has quit [Quit: leaving]
junsuijin has joined #ocaml
<_habnabit>
is there a way to specify a function has an optional parameter and not use it without getting an unused variable warning?
<_habnabit>
there's a few functions implementing the same signature, and some just ignore the parameter.
<_habnabit>
but since the parameters are named, I don't think I could do just ?_ or something
edwin has quit [Remote host closed the connection]
eb4890 has quit [Quit: Leaving]
emmanuelux has quit [*.net *.split]
_habnabit has quit [*.net *.split]
bitbckt has quit [*.net *.split]
emmanuelux has joined #ocaml
_habnabit has joined #ocaml
bitbckt has joined #ocaml
seafood has joined #ocaml
<thelema>
_habnabit: ?foo:_
<_habnabit>
ah, okay.
<thelema>
or something like that (maybe with more ())
lopexx has joined #ocaml
<_habnabit>
that was it.
lopex has quit [Read error: Operation timed out]
lopexx is now known as lopex
sebz has joined #ocaml
seafood has quit [Ping timeout: 260 seconds]
ikaros has quit [Quit: Ex-Chat]
etosch has joined #ocaml
everyonemines has joined #ocaml
etosch has quit [Quit: This computer has gone to sleep]
Amorphous has quit [Read error: Connection reset by peer]
Amorphous has joined #ocaml
lopex has quit [Read error: Connection reset by peer]
lopex has joined #ocaml
surikator has joined #ocaml
<_habnabit>
is there a reason there's Enum.mapi but not Enum.filteri?
<everyonemines>
Because people rarely need to filter with a function that also depends on an index?
<_habnabit>
okay. well, I just did.
<everyonemines>
Just write it yourself, you can copy the filter code from the lib if you want.
<everyonemines>
Or use a for loop.
<everyonemines>
I think people usually use for loops for that.
<everyonemines>
Actually, batteries has a filteri, in map.make
<_habnabit>
right, but that's the wrong filteri.
<everyonemines>
...?
<_habnabit>
that works on a map and is passed a map's keys and values.
<_habnabit>
(as opposed to Map.Make.filter, which is just passed values)
<everyonemines>
Did you come to ocaml via haskell, by any chance?
<_habnabit>
no.
<_habnabit>
(but I've been looking at haskell after getting frustrated with ocaml.)
<everyonemines>
frustrated how?
<everyonemines>
I'm pretty sure batteries map.make filteri can do what you want.
<everyonemines>
You just need to apply it to create the filter you want.
<_habnabit>
not a fan of no typeclasses and no overloading.
<_habnabit>
also the toolchain is significantly more mature.
<everyonemines>
mature? not really.
<everyonemines>
the object system is sort of ocaml's overloading solution
Associat0r has quit [Quit: Associat0r]
<_habnabit>
shame that nothing in the standard library uses it, then.
<everyonemines>
because it's slower
<everyonemines>
actually I'm not sure that's why
etosch has joined #ocaml
<everyonemines>
But anyway the compromises ocaml made are why it's fast and compiles fast.
<_habnabit>
okay. and in my eight months working with ocaml, I've found that I'd rather have something that's easier to debug.
<everyonemines>
overloading makes debugging easier?
<_habnabit>
sure. it means you can have a generic 'show' like in haskell.
<everyonemines>
Converting to a string to print stuff is at most slightly annoying.
<everyonemines>
If that's your biggest complaint about ocaml...
<_habnabit>
right now, I'd rather get work done than try to explain my dislike.
<everyonemines>
I would understand if you said it's annoying to rewrite functions for bigarrays vs arrays, or floats vs ints.
<everyonemines>
OK. Use a for loop, problem solved.
<_habnabit>
I was hired as a python programmer, and then immediately put on maintaing ocaml code. I've done nothing but ocaml for eight months, fulltime.
<everyonemines>
Sounds like you can write your own filteri pretty easily.
<everyonemines>
I don't have batteries installed here, but I think you could use its filteri.
<_habnabit>
maintaining, even.
<everyonemines>
I realize it's not good to tell people "write it yourself" all the time, but copying a filter function from batteries or core and adding an index to the function argument is pretty easy.
<everyonemines>
Use the source, Luke.
emmanuelux has quit [*.net *.split]
_habnabit has quit [*.net *.split]
bitbckt has quit [*.net *.split]
emmanuelux has joined #ocaml
_habnabit has joined #ocaml
bitbckt has joined #ocaml
emmanuelux has quit [*.net *.split]
_habnabit has quit [*.net *.split]
bitbckt has quit [*.net *.split]
arubin has joined #ocaml
struktured has quit [Ping timeout: 260 seconds]
struktured has joined #ocaml
emmanuelux has joined #ocaml
_habnabit has joined #ocaml
bitbckt has joined #ocaml
emmanuelux has quit [*.net *.split]
_habnabit has quit [*.net *.split]
bitbckt has quit [*.net *.split]
surikator has quit [Quit: Scientific discovery is just maximal compression of strings. Nothing more, nothing less.]