<bluestorm>
and still it's sub-second delay in the toplevel
<bluestorm>
(wich mean sub-sub-second delay in native code)
<pwnguin>
use time :P
<bluestorm>
hm
<bluestorm>
unless you want to recompute that every second
<bluestorm>
i don't see the problem with that :p
<pwnguin>
certainly not viable on embedded systems
<bluestorm>
hm
<pwnguin>
i doubt the compiler even bothers with bitfields
<bluestorm>
he doesn't
<bluestorm>
i saw a library doing this recently
<bluestorm>
hm
<pwnguin>
but fret not
<pwnguin>
its just a toy application
<bluestorm>
$ time ./test
<bluestorm>
real 0m0.222s
asmanur has joined #ocaml
<pwnguin>
its a bit sad the GC isn't thread safe
<bluestorm>
hm ?
<bluestorm>
if you need simple concurrency, you can use fork()
<pwnguin>
well, can't take advantage of multicore systems without it
<bluestorm>
what about multiple processes ?
<pwnguin>
well, i suppose theres message passing
<pwnguin>
so it looks like sieve theory is a real win
<bluestorm>
i suggest you have a real look at multi-processes
<bluestorm>
some people did some tests
<bluestorm>
and it seems that forking, that is having independants GCs, but simpler
<bluestorm>
may in some cases be better that having a complicated (thus slower) multi-threading GC
<bluestorm>
(i mean, performance-wise)
<pwnguin>
in non multithreaded apps or?
<bluestorm>
?
<pwnguin>
well, if you have a multithreaded GC with only a single thread, theres clearly an amount of overhead in synchronizing an uncontended heap or whatever
<bluestorm>
there was a "mathematical" Ocaml Summer of Code project, you may look on that side too, but i'm afraid it may be dead
<musically_ut>
I don't in particular have performance constrains .. but I was looking at how easy/difficult it is to do matrix calculations in Ocaml ...
<bluestorm>
hm
<bluestorm>
if it's basic things, the simpliest way is probably to code them yourself
<bluestorm>
(i mean, matrix multiplication is a five lines of code thing)
<musically_ut>
And so far I have found that they are easier in Python, hellish in Perl and a piece of cake in Matlab and Octave ... while C lies in between Python and Perl ..
<musically_ut>
And I think I will ... it'll be a good thing to practise a little imperative programming in Ocaml too.
<musically_ut>
Thanks bluestorm.
marmottine has joined #ocaml
asmanur__ has quit [Read error: 110 (Connection timed out)]
asmanur_ has quit [Connection timed out]
Amorphous has quit [Read error: 104 (Connection reset by peer)]
<pango>
the main frame is empty if you don't have js enabled ;)
<pango>
(above string may not be an URL per RFC1738 either)
<middayc>
yes that url is a little strange with two ?
<middayc>
you don't have js enabled?
<pango>
not by default
<middayc>
but it's the web 2.0 man :)
<pango>
security implications of js are just starting to pop up, but there's probably much more to come
<pango>
I only enable js on a per case basis
asmanur__ has joined #ocaml
asmanur__ is now known as asmanur
<middayc>
aha , yes I agree somewhat with you
bluestorm has joined #ocaml
filp has joined #ocaml
xavierbot has joined #ocaml
xavierbot has quit [Remote closed the connection]
Snrrrub__ has joined #ocaml
jderque has joined #ocaml
Snrrrub has quit [Read error: 110 (Connection timed out)]
jlouis has joined #ocaml
jlouis_ has quit [Read error: 110 (Connection timed out)]
musically_ut has quit [Remote closed the connection]
musically_ut has joined #ocaml
<bluestorm>
musically_ut: so how is your matrix stuff going ?
<musically_ut>
bluestorm: I am writing functions for them :)
<musically_ut>
And am reconsidering whether I should continue writing my assignments in Ocaml ... I can shift to Python ...
jderque has quit ["brb"]
* Yoric[DT]
prefers OCaml.
<flux>
what a curious coincidence, so do I!
<Yoric[DT]>
Strange, that.
love-pingoo has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
marmottine has quit ["Quitte"]
jderque has joined #ocaml
zmdkrbou has quit [Read error: 110 (Connection timed out)]
<middayc>
what would you switch to python? I coded in python few years back
cyrilRomain has joined #ocaml
middayc has quit []
ttamttam has joined #ocaml
middayc has joined #ocaml
<middayc>
(I got disconnected)
l_a_m has quit [Remote closed the connection]
<middayc>
(in case someone anwered the python question in the meantime)
<pango>
nope
zmdkrbou has joined #ocaml
<middayc>
aha
<middayc>
what do you use ocaml for pango?
<pango>
jan 05 13:27:59 <pango> benchmarks, statistics, simulations, utilities,...
<pango>
jan 05 13:33:59 <pango> (r&d, mainly on large storage problems)
<middayc>
uh :)
<middayc>
you have good memeory ...
<pango>
and good logs ;)
<middayc>
beter than me ... I remember you once said it would be cool if you could use something like ocaml instead of php -- I think
blackdog has quit [Read error: 110 (Connection timed out)]
<middayc>
I was asking before why the two of you are considering python because I used it a lot few years back and am new to ocaml.. and so far ocaml seems to me sort of like python on triple steroids.. but as I saind I am very new at ocaml
<bluestorm>
i don't really see the link between python and ocaml
ita has joined #ocaml
* pango
wonders who are "the two of you"
<Smerdyakov>
bluestorm, compared to traditional mainstream languages, both involve almost no types written in programs.
<Smerdyakov>
That is, both have usage modes with that property.
<Smerdyakov>
Good, modular OCaml code has many types written out. :-)
<bluestorm>
hm
<middayc>
I think flux and another person said above that are thinking of switching to python for something
<bluestorm>
as type aliases, interfaces, or plain constraint in the code Smerdyakov ?
<Smerdyakov>
I'm thinking of types appearing almost entirely in signatures and .mli files.
<pango>
* Yoric[DT] prefers OCaml.
<pango>
<flux> what a curious coincidence, so do I!
<bluestorm>
pango historite strikes again :-'
<pango>
middayc: seems you misread them
<middayc>
:) uh I didn't saw that Yoric's line , sorry
<pango>
ic
<middayc>
by python on triple steroids I meant mainly that ocaml has the similar basic structures as python has (list, tuple, dict..) and you could write imperative code that would not look that different than pythons .. only that here you can do so much more, and are faster, and errors get noticed at compile time... etc
<bluestorm>
actually i think that python data structures are quite different from OCaml's ones
<bluestorm>
as many other scripting langages (PHP and iirc Ruby), lists are not lists, for example
<bluestorm>
but rather a list-deque-array thingy
<Yoric[DT]>
Well, they're hash tables.
<bluestorm>
(and a bit of hashtables maybe)
<middayc>
yes I know ... lists at python are more like arrays ..
<Yoric[DT]>
It would be quite easy to write a syntax extension to make hash-tables appear like arrays in OCaml.
<Yoric[DT]>
I remember seeing one somewhere, actually.
<Smerdyakov>
You can use infix operators to get most all of the benefit.
<Smerdyakov>
(with no camlp4)
<cygnus_>
can you define unary operators in ocaml?
<bluestorm>
you can rebind (!) for example
<cygnus_>
does that mean i can't use it for references then ?
<Yoric[DT]>
It would look well in a comprehension extension, after all :)
<Yoric[DT]>
If anybody has a favorite syntax, feel free to tell me.
<Yoric[DT]>
(bluestorm's input duly noted)
<bluestorm>
hm
<bluestorm>
the problem is that ternary functions don't work when infix
<bluestorm>
you have to write (tbl <-- key) value
<middayc>
(hmm.. you are all too advanced for me)
<bluestorm>
so using a tuple instead is not a bad idea
<bluestorm>
cygnus_: are you learning from the plain manual ?
<cygnus_>
well i read other things to learn the basics, but i wanted to start learning the features in chapter 3 so i tried reading that but i couldn't understand mutch
<bluestorm>
hum
<bluestorm>
you mean "objets in OCaml" ?
<bluestorm>
+c
<Smerdyakov>
cygnus_, what is the first thing you don't understand?
<bluestorm>
btw, i don't think learning oo-ocaml is necessary, given the quite moderate usage of object oriented code in the ocaml community
<bluestorm>
i you find it too difficult or useless, i think you may just let it go for a while, and wait to feel a need/motivation for it
<Smerdyakov>
cygnus_, can you be more specific about the first paragraph that loses you?
Morphous has joined #ocaml
<cygnus_>
ok
<cygnus_>
what is object(self) doing ?
<cygnus_>
and also below method virtual move : _
<cygnus_>
then further along object (self : < move : _; ..> )
<Smerdyakov>
cygnus_, did you read 3.3?
<cygnus_>
yes
<Smerdyakov>
cygnus_, that explains the object(...) syntax.
<cygnus_>
since we don't have move method defined
<cygnus_>
how can it reference itself ?
<Smerdyakov>
Were the three lines you references meant to be one question or three questions?
<cygnus_>
yeah its different problems i have
<Smerdyakov>
Now that I reminded you of 3.3, do you understand the first problem?
<cygnus_>
yes ty
<cygnus_>
what is this one though: object (self : < move : _; ..> )
<Smerdyakov>
Does reminding you of 3.5 solve your problem about a virtual method?
<Smerdyakov>
Do you understand that < move : _; ..> is a type?
<cygnus_>
hat does the _ do for the virtual one?
<cygnus_>
it don't care what return type it has ?
<Smerdyakov>
The return type is inferred from context, I believe.
<cygnus_>
it's all very tricky
<Smerdyakov>
That isn't a problem, since you shouldn't be using objects.
<bluestorm>
:D
<cygnus_>
yes i don't think i will use it
Amorphous has quit [Connection timed out]
hsuh has left #ocaml []
<middayc>
can I ask something not ocaml related , but more algoritms related.. beacuse you seem more like higher educated programmers not just practitioners like I am or like I meet on channels of imperative languages..
<middayc>
question is.. how hard would it be to make a solver that would help me find card setups that are solvable in this game
<Smerdyakov>
Probably pretty easy, if it's "a game for kids."
<middayc>
it's sort of solitaire for kids and has a a lot less cards and colors so it's quicker to solve
<middayc>
:)
marmottine has joined #ocaml
<Smerdyakov>
Maybe even the most naive brute force search would work on modern machines.
<middayc>
I tried one time but I basically "lost myself" and didn't manage to do anything..
filp has quit ["Bye"]
<Smerdyakov>
You didn't manage to write a brute force solver, regardless of if it ran quickly enough?
<middayc>
I didn't know how to know what combinations I have already tried and what not .. but I don't have any background knowledge on this and maybe there is a known way of doing this
<middayc>
yes .. it can be slow
<Smerdyakov>
Then it's definitely worth learning how to do this.
<Smerdyakov>
Have you taken any university course on programming?
<middayc>
what topic (keywords) would this be in.. if I want to learn about it
<middayc>
no .. I was not at computer uni.
<middayc>
(and didn't finish it anyway)
<Smerdyakov>
You probably want a text used in a sophomore data structures course.
<middayc>
sophomore? this even sound complicated
<middayc>
ok thanks ... I will google for sophomore data structures
<middayc>
hmm.. sophomore means "A second-year student in a U.S. college." ... I thought it was a name of the datastructures .. I am not eng. native speaker
<middayc>
I found some papers on this so thanks
<flux>
you're confusing it with semaphore, no?
<flux>
(looking back some context: maybe you weren't mixing it with anything..)
madroach has joined #ocaml
ozzloy has quit ["leaving"]
ozzloy has joined #ocaml
piggybox has joined #ocaml
Smerdyakov has quit [Remote closed the connection]
Smerdyakov has joined #ocaml
piggybox has quit ["Leaving"]
piggybox has joined #ocaml
thermoplyae has joined #ocaml
Snark has quit ["Ex-Chat"]
asmanur has quit [Remote closed the connection]
madroach has quit [Read error: 113 (No route to host)]
madroach has joined #ocaml
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
ttamttam has left #ocaml []
mwc has joined #ocaml
thermoplyae has quit ["daddy's in space"]
thermoplyae has joined #ocaml
middayc has quit []
ita is now known as ita|zzz
Smerdyakov has quit [Remote closed the connection]