<DroneZilla>
it's almost perfect (except two or three devil functions)
itewsh has quit ["KTHXBYE"]
<Yoric[DT]>
Essentially, the standard library is incomplete and can't be modified by anyone outside of the Inria.
<DroneZilla>
add some librarires okay but replace why ?
<Yoric[DT]>
Have you looked at, say, streams?
<DroneZilla>
what do you think it's missing in it ?
itewsh has joined #ocaml
<Yoric[DT]>
Constructors.
<Yoric[DT]>
Duplication.
<DroneZilla>
Yes stream it's complicated but complete no ?
<Yoric[DT]>
Nope.
<DroneZilla>
Duplication what is it ?
<Yoric[DT]>
Essentially, there are plenty of things which are very difficult to put in streams.
<Yoric[DT]>
You have a stream a.
<DroneZilla>
like what ?
<Yoric[DT]>
You want to back it up before reading it.
<Yoric[DT]>
You can't do that.
<DroneZilla>
back it up (you mean save it ?)
<Yoric[DT]>
Yep.
<Yoric[DT]>
Not to disk.
<Yoric[DT]>
But for backtracking purposes.
<DroneZilla>
Of course you can't, the datas could come from a network socket, if you wanna save it you must read it and store it by yourself
<Yoric[DT]>
Which you can't do with streams.
itewsh has quit [Client Quit]
itewsh has joined #ocaml
<DroneZilla>
why you can read it if you really need.
<Yoric[DT]>
Well, let's assume you're writing a parser based on streams.
<DroneZilla>
yes
<Yoric[DT]>
In order to be able to handle alternatives, you need backtracking.
<Yoric[DT]>
Just exactly how do you plan to implement that backtracking?
Linktim has quit ["Quitte"]
<DroneZilla>
I rememer do that with the stream in caml-light and in ocaml using a special syntax which come from something like camlp4
<DroneZilla>
but if you want to backtrack in a stream you can, but it cost in memory
<Yoric[DT]>
Sure, it's Camlp4.
<DroneZilla>
if you read 1GO you have to store 1GO, that's why it's not a simple function in the library, OCaml it's not a magic language, you're near your CPU and understand all the complexity behing eah algo
<Yoric[DT]>
DroneZilla: btw, Unicode support has been around for OCaml for years.
<DroneZilla>
I saw, nothing usefull, just function I wrote in past in one minute
<Yoric[DT]>
It's just not included in the standard library, hence not usable.
<Yoric[DT]>
DroneZilla: including the constructors?
* Yoric[DT]
extremely seriously doubts that.
<DroneZilla>
which one ?
<Yoric[DT]>
create_in and create_out
<Yoric[DT]>
And then you'll tell me exactly how you implement [pipe] in one minute.
<Yoric[DT]>
(or at all)
<DroneZilla>
oh it's difficult to in OCaml to write type input = (unit -> char) * (string -> int -> int -> int) * (unit -> unit)
<kig>
exceptions feel hacky, on any larger bit of code you'll be wrapping excepting functions inside a try-with anyhow, so the compiler not requiring that is a source of runtime errors
itewsh has quit [Connection timed out]
<DroneZilla>
and always use input in your cde
<Yoric[DT]>
DroneZilla: you're missing the point.
itewsh has joined #ocaml
<DroneZilla>
explain
<Yoric[DT]>
The point is that you can't use the standard library functions with your new type input.
<Yoric[DT]>
Essentially, you have to rewrite all the I/O functions for use with this input.
<Yoric[DT]>
Oh, and Printf.
<Yoric[DT]>
And Scanf.
<Yoric[DT]>
And parts of Unix.
<DroneZilla>
oh it's difficult
<DroneZilla>
but OCaml is a low language (one step from the C)
* Yoric[DT]
fails to understand whether DroneZilla is being sarcastic.
<subconscious>
above C level
<subconscious>
lol
* Yoric[DT]
will probably just stop answering DroneZilla, sounds too much like trolling.
<DroneZilla>
you want complex function, but OCaml is minimal, it's the goal of this language
<DroneZilla>
not to provide library you coul write, but complet set of primitives (plus some additional modules)
<Associat0r>
DroneZilla : I don't think you are bad per se
<Associat0r>
I mean subconscious
<Associat0r>
there are different levels of programming
<DroneZilla>
no there are one level of programming , you say to the compurter waht you want and it obey
<Associat0r>
there are plenty of bad programmers who never used a GC language
<Associat0r>
and vice versa
<DroneZilla>
of course
<Associat0r>
programming isn't about the computer
<DroneZilla>
programming isn't about the computer => and what is it ?
<Associat0r>
well I mean it isn't about von neumann machines
<DroneZilla>
it's the science that the greecs develop, the the arabs develop, that the french develop, and wich concern the ways to compute
<DroneZilla>
that the german developp, the chines dev.. (you can complete)
<DroneZilla>
it was created by mathematicancs for mathematicians with time in minds
<subconscious>
I thought most of computing was invented by high school kids
<subconscious>
that's why we have stuff like unit tests and PHP
<Associat0r>
what if computers had GC's in hardware?
<DroneZilla>
subconscious: you know the jistory of computing ?
<subconscious>
I know about the software crisis
<DroneZilla>
Associat0r: the problem doesn't change
sporkmonger has joined #ocaml
<Associat0r>
I can also say you are a bad programmer if you have never dealt with microcode
<DroneZilla>
you got the same complexity problem, with or without GC
<Associat0r>
which is absurd
itewsh has quit ["KTHXBYE"]
<DroneZilla>
Associat0r: no not if you never have, only if you can't deal with
<Associat0r>
remember that the machines that we have today are just 1 possible kind of machine out of many
<DroneZilla>
no you can't change the complexity model
<subconscious>
what about quantum computers?
<DroneZilla>
or you gonna be a god
<subconscious>
Don't they have very different complexities
<subconscious>
I don't know about the physics though so I can't be affirmative
<DroneZilla>
quantum computers ? if you think that it change the complexity model, it means that you could have the quantity of memory you wan in an isolated space (not 1 MO, 1GO). Which it's impossible
<DroneZilla>
They could just gain a great mutliplicative coefficient, but O(n ln(n)) will stay O (n ln (n))
<kig>
has anyone tried to move allocations into the type system? (is that even possible?) i mean, gc exists because manually calling free() is error-prone
<subconscious>
DroneZilla: I don't know the physics of it
<subconscious>
kig, doesn't ATS use linear types for this?
<DroneZilla>
only god could overpass the complexity system of the universe
<DroneZilla>
:D
<subconscious>
kig, The whole section on linear types is missing from the manual so I couldn't be sure
<subconscious>
DroneZilla: I don't think god could factorize large numbers in linear time
<Yoric[DT]>
kig: well, there are linear type systems and region-based memory management.
<Associat0r>
speaking of ATS what do you guys think of it?
<subconscious>
All I know is the #ATS channel is really quiet
<subconscious>
which is a shame
<Yoric[DT]>
kig: the question being what you plan to do if you lift allocations into the type system?
<Associat0r>
nice someone is there now
<subconscious>
there have been a couple others in there
<Yoric[DT]>
Chances are that you will still need dynamic allocation, for computations for which you can't predict size.
<subconscious>
but not back today
<Associat0r>
subconscious : what do you think of F#?
<Associat0r>
and DroneZilla
<DroneZilla>
what ?
<Associat0r>
F#
<subconscious>
I'm not at all interested in F#
<subconscious>
If there was anything unique or interesting about it I would know
<kig>
you could check frees with the compiler and maybe thread space-complexity stats through a program to prove upper limits to memory use? the latter would be nice for embedded systems, might be possible to turn some subset of programs into statically allocated ones as well
<Yoric[DT]>
kig: well, thread space-complexity sounds like some of my research :)
<Yoric[DT]>
(and one of the foci of the Hume language)
<subconscious>
It's a Higher-order Unified Meta-Environment
<DroneZilla>
could you explain
<subconscious>
:)))
<kig>
and hmm, maybe get a more hardware-friendly memory layout for data, and easier parallelism
<DroneZilla>
i'm downloading th emanual
<subconscious>
I'm looking at examples
<DroneZilla>
i love to discover new languges
<subconscious>
me too!
<Yoric[DT]>
A language with functional-style resource-bounded computing and concurrent resource-bounded computing.
<Yoric[DT]>
Quite experimental.
<DroneZilla>
I think
<kig>
optimizing out a float div saves a dozen cycles, optimizing out an uncached memory load saves a couple hundred
<DroneZilla>
but very hard to read (it remonds me co$oft languages)
<DroneZilla>
co$oft => cro$soft
<Associat0r>
which language?
<DroneZilla>
VB, and F#
<DroneZilla>
exspecially
<subconscious>
Hume reminds me of haskell
<Associat0r>
which langauge are we talking about?
<subconscious>
which is obviously the real influence
<Associat0r>
o hume
<DroneZilla>
when I rode "r"c it takes me many minutes to understand
<Associat0r>
DroneZilla : F# is as readable as ocaml
<DroneZilla>
f |> x | | y > 2
<DroneZilla>
whoua
<Associat0r>
I don't get the VB and F# connection
<DroneZilla>
VB is unreadable and in F# there aro many operators which makes it difficult to read
<DroneZilla>
like the |>
<DroneZilla>
which is just (fun x y -> f y x)
<Associat0r>
that is just forward pipe
<DroneZilla>
what is is in OCaml ?
<DroneZilla>
it not the f -> (fun y x -> f x y) ?
<Associat0r>
you can define it yourself
<DroneZilla>
but when you read it and doesn'tknow it you cry
<DroneZilla>
of course you can
<DroneZilla>
define it, but I don't like languages with 45 operators in it
<Associat0r>
I don't see what is so unreadable about it
<DroneZilla>
what is |> in F# ?
<Yoric[DT]>
I actually use it from time to time, but this ends up being write-only code.
<DroneZilla>
I don't know, and there wasmany things that I don't understant
<Associat0r>
well it got operator overloading
<Yoric[DT]>
So, yeah, while it helps with concision, I agree that it's rather bad for readability.
<Associat0r>
that is 1 thing I like about it
<DroneZilla>
today when I rode something I understand it, except the F# and the VB (now I read th VB, it's my job, but before no)
<DroneZilla>
it was the same with $ in haskell (that I love today)
<Associat0r>
I also couldn't read VB
<DroneZilla>
in fact it's a very simple language except the "r"c
<DroneZilla>
whic is unreadable if you don't know
<Associat0r>
well everything is unreadable if you are not trained for it
<DroneZilla>
I could read many languages I don't know
<DroneZilla>
hume was unreadable with the first files, but now I begin to understand
<subconscious>
It's because so many languages designed are pointless grey mush made from the last 3 uninspiring languages the author used
<DroneZilla>
you just have to don't read the unecessary words (like in VB)
<subconscious>
look at python ruby .. etc
<subconscious>
arc F#
<DroneZilla>
in fact it's just that all languages do the same
<DroneZilla>
examples :
<Associat0r>
what is uninspiring about F#?
<DroneZilla>
dim i as INteger = 3
<DroneZilla>
int i = 3
<DroneZilla>
i :: Int
<Associat0r>
python and arc
<DroneZilla>
i = 3
hkBst has quit [Read error: 104 (Connection reset by peer)]
<DroneZilla>
i =3
<subconscious>
they are just grey paste
<DroneZilla>
you remove the unusefull word and you understand
<subconscious>
you take a few concepts that make you feel comfortable and make a language out of them
<Associat0r>
F# is very well designed
<subconscious>
no it's not
<subconscious>
ocaml, SML and such are well designed
<DroneZilla>
yes, but I think it's just that you must offer the same primitives if you want your language to be powerfull (Turing powerfull) and the primitives all always the same, read a variable, and assigne a variable, and call a function with variables (the three primitives of lambda calculus)
<subconscious>
F# is just a copy -- there is no design left to be done
<Associat0r>
it is no copy
<Associat0r>
it has view patterns, op overloading, a usefull object system
<im_alone>
subconscious, rm -fr F#
<subconscious>
Associat0r: So does it predecessors
<Associat0r>
ocaml doesn't have view patterns
<DroneZilla>
it has a very powerfull library system, .NET
<Associat0r>
no op overloading
<subconscious>
none of these (or anything in F#) is original
<im_alone>
M$ doesn't think in the improvement of the performance of its products
<Yoric[DT]>
Associat0r: well, OCaml *nearly* has had view patterns for some time.
<subconscious>
Like I said, you take a few features you like and mush them together
<Yoric[DT]>
(with Camlp4)
<Associat0r>
it fixes the inconsistencies of boxed floats
<DroneZilla>
op overloading in OCaml would be boring
<Yoric[DT]>
As for op overloading and objects, well, that's quite useful but hardly original.
<DroneZilla>
becaus you couldn't write (+)
<Associat0r>
ocaml is designed for different reasons
<Yoric[DT]>
I'm more interested by the units.
<DroneZilla>
you have to precise which one you want
<Associat0r>
so is F#
<Associat0r>
stuff doesn't need to be original to be usefull
<subconscious>
Associat0r: I see what you mean, it's new and fixes problems, but do you agree with my point -- nothing is _original_
<im_alone>
F# lacks polymorphism
<subconscious>
they would have been better to improve existing languages than be control freaks and invent from scratch
<Associat0r>
it has polymorphism just not polymorphic variants
<DroneZilla>
what is polymorphic variants ?
<subconscious>
progress is really slow because of these things and it's a shame
<Associat0r>
they didn't really invent from scratch they took a lot of caml
<subconscious>
You have all these languages that can't interoperate, everyone writes a new regex library and a blog engine once a week
<im_alone>
M$ only is interested in selling .Net products
<im_alone>
with 0% of current development
<Associat0r>
if they were they would have released F# years ago
<Associat0r>
remember it is in dev since early 2000's
<Associat0r>
they could have rushed it out if they wanted to
<Associat0r>
but didn't
<subconscious>
in any case, you should admit F# is boring
<subconscious>
(unless you never heard of SML and ocaml)
<subconscious>
(... and haskell and whatever else the paste has been made of)
<DroneZilla>
LISP maybe ?
<Yoric[DT]>
I actually think that F# is interesting.
<Associat0r>
it is usefull for numerical computing for me it has a ncie IDE and good libs that is what counts
<Yoric[DT]>
Working on the good libs :)
<Associat0r>
subconscious : why don't you design your own language?
<Yoric[DT]>
I was wondering how hard it would be to have a type system with an equational theory (or whatever is behind F#'s unit types).
<im_alone>
i recommend you to design your own p-code-like's pascal-like from C scratch as in 197x
<subconscious>
Associat0r: There is no possible way I could improve what already exists
<subconscious>
Associat0r: The problem is that other people haven't realized this, or are control freaks that want to define their own language
<Associat0r>
subconscious : ATS and bit-c are interesting IMO
<subconscious>
(or they actually have a good idea, that happens to but is rare)
<dobblego>
haha, so true
<DroneZilla>
they're still things that doesn't exit in actual languages
<Yoric[DT]>
Plenty things remain to be done.
<Yoric[DT]>
Now, the problem is that the barrier is getting steeper.
<Yoric[DT]>
Any new high-level language should have at least ML's polymorphism, Haskell's type-classes, OCaml's Camlp4 and .Net's libraries.
<Yoric[DT]>
And that's just for starters:)
<DroneZilla>
there is no parallel language (something in which there are two kinds of expression : the sequence and the parallel)
<Yoric[DT]>
DroneZilla: yes there are.
<DroneZilla>
like ?
<Yoric[DT]>
Concurrent Haskell, for one.
<Associat0r>
IMO it should have low level capabilities and performance comparable to C++
<Yoric[DT]>
BSML, in the OCaml world.
<DroneZilla>
what is it ? I just know hakell since two weeks
<subconscious>
Concurrent Haskell/pH is a really disappointing story
<Associat0r>
.NET is optionally IMO
<Yoric[DT]>
Associat0r: oh, yeah, that, too :)
<Associat0r>
there should be something to replace C++'s niche
<subconscious>
If you read the book they have a really grand vision about implicit parallel programming
<Yoric[DT]>
Associat0r: yeah, the JDK's libraries would be sufficient :)
<subconscious>
all this research later you end up with `pseq`
<Yoric[DT]>
subconscious: never tried it, I'm afraid.
<Yoric[DT]>
I just read papers.
<DroneZilla>
no no concurrent haskell is not what I need
<Yoric[DT]>
But yeah, pseq is a little disappointing.