<Camarade_Tux>
I think the style changed and these are not possible anymore
<Camarade_Tux>
(I *think*, or it's the other way round, I don't know)
<flux>
really?-o
<Camarade_Tux>
I know there were several styles and one got deprecated, I'm gonna check
<Camarade_Tux>
7.2 in the 3.10 reference manual, but I had only read half of it :
<Camarade_Tux>
it's not part of the language but it's available through a language extension
<flux>
yes, that has been the case for quite some time now
<flux>
that is, they've been supported via campl4
<Camarade_Tux>
flux, right
rwmjones_ has quit [Read error: 104 (Connection reset by peer)]
<Camarade_Tux>
btw is there a timeline of the ocaml development available somewhere ? for instance I'd like to know when these have been introduced and when they have been moved, but apart from reading all the changelogs...
jeremiah has quit [Read error: 104 (Connection reset by peer)]
<flux>
changelogs ;)
Amorphous has quit [Read error: 110 (Connection timed out)]
damg has joined #ocaml
Axle has quit ["Leaving."]
Amorphous has joined #ocaml
jeremiah has joined #ocaml
<Camarade_Tux>
I'm not even sure the 1 changelog is still available :p
<damg>
weee, 3.11. is proper shared library support available as I heard it should come in this version?
<flux>
what kind of proper shared library support?
<flux>
I knew only that it would support dynamically loadable native (ocaml) code
<damg>
yeah, I meant that ocamlopt can generate libraries to be loaded by ocaml apps (in contrast to libraries targeted to be loaded by C apps)
LeCamarade has joined #ocaml
Linktim has joined #ocaml
Camarade_Tux_ has joined #ocaml
christo_m has joined #ocaml
Camarade_Tux has quit [Read error: 110 (Connection timed out)]
christo_1 has joined #ocaml
<christo_1>
I'm trying to implement a queue data structure in ocaml
<christo_1>
im not sure how to delete things from a record type
<christo_1>
or remove them if you will
Linktim_ has joined #ocaml
<flux>
how you mean?
<flux>
one cannot add or remove elements from a record, as its fields are fixed during compile time
<christo_1>
flux: im being unclear, my bad
<christo_1>
what i mean to say is, i want to reset a particular field back to defaults
<christo_1>
let me show you some of the code if i have thus far
<christo_1>
flux: basically, i want to pop the element that's in the front, so i want to remove it, and the way i can do that is reset the data field to "" (empty string) and the id field to 0
<flux>
well, you must make them mutable
<christo_1>
flux: ah..
<christo_1>
mutable keyword in front
<flux>
yes
<christo_1>
flux: how will i know which field im accessing
<christo_1>
that smy problem right now
struktured_ has quit [Read error: 110 (Connection timed out)]
<flux>
myq.contents.(myq.font).data <- "" ?
<flux>
not unlike push
<christo_1>
i see
<christo_1>
thats perfect
<christo_1>
is there a way to reset both data and id in one line
<christo_1>
or should i do it separately
<flux>
do it separately
struktured_ has joined #ocaml
pango has quit [Remote closed the connection]
LeCamarade has quit [Read error: 110 (Connection timed out)]
christo_m has quit [Connection timed out]
mishok13 has quit [Connection timed out]
<christo_1>
flux: im not implementing queue correctly am i
<christo_1>
im not really sure how the data structure works
<flux>
no, not really
Linktim_ has quit [Connection timed out]
<flux>
I would perhaps not use an array at all, but rather bidirectionally linked lists
Linktim has quit [Read error: 110 (Connection timed out)]
pango has joined #ocaml
<christo_1>
flux: i don thave that option
jeremiah has quit [Read error: 104 (Connection reset by peer)]
<christo_1>
the teacher, once again, is enforcing requirements
<christo_1>
flux: i have to keep track of the first one put in, so that its the first one popped off, and i have to keep track of the back so i kno what is the last element ot be removed
<christo_1>
not only that, but i need to do this for my length function which needs to be fixed
<doy>
christo_1: is an array specifically required?
<flux>
christo_1, so there is to be a maximum length to the queue?
<flux>
is it supposed to be a ring buffer?
struktured_ is now known as struktured
<christo_1>
flux: yes
<christo_1>
doy: yes
<christo_1>
flux: basically there are cases where back is greater than front, an di need to account for this in my length function
rpg has joined #ocaml
ulfdoz has quit [kornbluth.freenode.net irc.freenode.net]
Smerdyakov has quit [kornbluth.freenode.net irc.freenode.net]
hcarty has quit [kornbluth.freenode.net irc.freenode.net]
wlmttobks has quit [kornbluth.freenode.net irc.freenode.net]
sbok has quit [kornbluth.freenode.net irc.freenode.net]
Mr_Awesome has quit [kornbluth.freenode.net irc.freenode.net]
ski_ has quit [kornbluth.freenode.net irc.freenode.net]
ulfdoz has joined #ocaml
Smerdyakov has joined #ocaml
Mr_Awesome has joined #ocaml
wlmttobks has joined #ocaml
sbok has joined #ocaml
ski_ has joined #ocaml
hcarty has joined #ocaml
Camarade_Tux_ is now known as Camarade_Tux
<rpg>
type x = { a:array };;
<rpg>
constructor array expects 1 argument
<rpg>
??
<vixey>
??
<rpg>
how do i use array type
<doy>
rpg: array isn't a type on its own, i believe
<vixey>
an array of what?
<doy>
should be 'int array', etc
<rpg>
int's for example
jeremiah has joined #ocaml
<rpg>
type x = { a:array int};;
<rpg>
??
<christo_1>
no
<doy>
type x = { a : int array };;
<christo_1>
yes
<rpg>
oh
<rpg>
ok
<rpg>
cool
hkBst has joined #ocaml
<rpg>
aah
<christo_1>
flux: yeah getting some seirous errors here
willb has joined #ocaml
jlouis has joined #ocaml
<christo_1>
flux: you know whats going on
<christo_1>
flux: that resetting to defualts affects the actual element
<christo_1>
and thus when i pop and push new things, i cant see them realtime
<doy>
well, you'll have to return a copy of the element
<christo_1>
doy: example?
<doy>
{data : myq.data; id : myq.id} maybe?
<doy>
i'm not too familiar with record syntax
<doy>
don't use them much
<christo_1>
ahh
<rpg>
are arrays dynamic ? can elements be added to them ?
<rpg>
like if# 1 :: [| 2 ; 3 |];;
<rpg>
This expression has type int array but is here used with type int list
<rpg>
but it works for lists
<rpg>
1 :: [ 2 ; 3];;
<flux>
they aren't
<rpg>
oh ok
<flux>
one could use DynArray from ExtLib (or Batteries), but I'm guessing that's not the point of this exercise
<rpg>
good guess :)
Linktim has joined #ocaml
<rpg>
lets say i want to initialize let x = [| 0 ; 0 ; 0 ; 0 ; 0 ; 0 |];;
<rpg>
is there a better way to do it ??
_zack has quit ["Leaving."]
<rpg>
in otherwords can i specify the size
<rpg>
of the array
<flux>
Array.make 10 0
filp has quit ["Bye"]
<rpg>
so let x = Array.make 10 1 ;; will place 10 1's ?
<flux>
yes
<rpg>
and if i want them to be blank ( NULL )
<rpg>
is there such thing ?
<doy>
no
<rpg>
ok
<flux>
well, perhaps you'd like Hashtbl then, or use the option type
<doy>
well, you could do 'int option array'
<rpg>
its ok i dont mind filling it up with 0's
christo_1 has quit ["going back home"]
damg has quit [Remote closed the connection]
pango has quit [Remote closed the connection]
pango has joined #ocaml
vixey has quit [Read error: 113 (No route to host)]