<Smerdyakov>
Use the higher-order functions of the Array module instead.
<Elendil>
which one?
<Smerdyakov>
That depends on what you want to do!
<Elendil>
for instance I want to modify t.(i) when i=1 (mod 3)
<Smerdyakov>
Then I suggest Array.iteri.
* Smerdyakov
escapes.
<Elendil>
i dont agree
<Elendil>
with (fun i _ -> if ... t.(i)<-...) ?
Banana has quit [Remote closed the connection]
<tsume>
Smerdyakov: you use swig any?
<neale>
I used swig long enough to determine that writing native wrappers was much, much easier.
<tsume>
neale: you don't want to write native wrappers for WideStudio
<tsume>
neale: its just a simple problem I can't figure out. its one problem which is causing me to get stuck
<tsume>
neale: I need to have swig define a class bypass in the .i file.. I'm unsure how
<neale>
I would be the wrong person to ask.
<neale>
Sorry.
<neale>
You're right, though; I don't want to write native wrappers for WideStudio.
<neale>
I don't even know what WideStudio is.
<tsume>
its a Free gui framework
<tsume>
with its own gui designer
<tsume>
and bindings to Ruby, Python, and Perl. Its written in C++
<tsume>
its _really_ good
<tsume>
I'm trying to use the mpfc.i file.. but its not working well
<tsume>
its a very cross platform gui toolkit, its very nice.
<tsume>
I want to use it with ocaml. Its nice to use it with C++ too :)
<anyone>
every month I hear about a new GUI library.
<tsume>
widestudio is from 95'
<tsume>
its portable on every platform I know
<tsume>
even works on many handhelds, and something called a BTRON
<tsume>
anyone: widestudio is MIT licensed, so its free to use unlike *GPL licensed libs
<tsume>
very easy to work with, generate code, etc. I'm trying to get it to work with ocaml
<tsume>
It would be nice.
<anyone>
I don't worry about licensing.
<tsume>
anyone: I do.
<tsume>
anyone: if I want to statically compile, I can statically compile without stupid restrictions of any closed source apps
<anyone>
Every half a year I hear about a new licensing scheme.
<tsume>
anyone: MIT hAs been around since the dawn of time. *GPL hasn't
<tsume>
yes, I sigh at the new GUI libraries and licenses too. the new projects are stupid
<tsume>
which is why I still use widestudio, the newer gui toolkits are ran by kids
<anyone>
What about the MIT license? How new is it?
<tsume>
MIT license is really old
<tsume>
looking*
<tsume>
anyone: GPL was what, 92? MIT was from the 80s, maybe 70s
<tsume>
anyone: BSD and MIT are older, wiser and better than linux/gpl crud. You don't get out much, do you? :P
<anyone>
The last sentence shows a flawed Western prejudice. But I understand you are just joking.
<tsume>
X was created in 84-85 under MIT license at MIT. I don't knwo when the first MIT license was. MIT probably had previous projects under the license
<tsume>
anyone: yes. see the ':P'
JustinWick has joined #ocaml
<tsume>
anyone: irc text always sounds flame mongering unless people use emotion symbols
JustinWick has quit [Client Quit]
_fab has quit [Remote closed the connection]
Banana has joined #ocaml
<Amorphous>
hi. anyone can tell me if there is a way to do the following with any ocaml (debug-)tools?: some code between try...with throws an exception and i want to know what part of the code does that (something like a line-number would be helpfull).
<anyone>
I don't know of a way.
Kleene-AAH has joined #ocaml
<Submarine>
run in ocamldebug
<Kleene-AAH>
hi
<Amorphous>
Submarine: is there a way to set something like a breakpoint at an exception?
<Submarine>
you can set breakpoints if I remember well
<Submarine>
or trace back in time from the uncaught exception
<Amorphous>
the exception is caught (or is it possible to not catch an exception that is thrown between a try...with?). i can't see any info on setting a breakpoint on an exception at http://caml.inria.fr/ocaml/htmlman/manual030.html how would i do that or is it not possible?
<Submarine>
use the trace back
<Submarine>
you can walk back in time
<Submarine>
just wait until the code crashes due to uncaught exception
<Submarine>
then use back steps
<Amorphous>
but the exception is caught.
<Amorphous>
is it possible to not catch an exception that is thrown between a try...with?
<Submarine>
aaah
<Submarine>
do you know where it is caught?
<Amorphous>
i now have: with |exception_foo s -> ... | e -> ...
<Amorphous>
and it is caught at the | e
<Amorphous>
is it possible to have an incomplete match there and therefor not catch some exceptions but specific ones?
Msandin has quit [Read error: 113 (No route to host)]
<Amorphous>
or is there a way to get line numbers from the exception-variable e?
Zaius has joined #ocaml
<mrvn_>
Amorphous: | x -> raise x
<Amorphous>
outch i could just set an breakpoint at |e ->
<Amorphous>
thx mrvn_ for the idea
<Zaius>
is module Queue threadsafe without any preconditions?
<Submarine>
no module has locks by default, afaik
<Elendil>
val magic : 'a -> 'b
<Elendil>
how is it possible?
<Submarine>
Elendil, it's black magic
<Submarine>
it's the ultimate polymorphic identity function
<Submarine>
defined as "do nothing, but break the type system"
<Submarine>
don't use it unless you know what you're doing
<Elendil>
ok :)
<humasect>
tsume: how is it going with WideStudio?
<Zaius>
*hmm* i checked the queue-sourcecode, it is not threadsafe :/
<tsume>
humasect: terrible
<humasect>
hmm
<tsume>
humasect: I'm 1 problem away from getting the swig wrappers to compile, and I can't figure it out
<humasect>
perhaps i can help
<tsume>
humasect: I need to wrap around this one class caled WSCvariable. Okay, I'll upload what I can tell and have
<humasect>
k
<tsume>
humasect: I see Hiribayashi has wrapped the class for the other languages as well. I'm not familiar with code linking, its something to due with setting a null var like in Ruby.. Qnil for the C interface
<tsume>
minute, I'm also compiling misette wm
<humasect>
k
<humasect>
hmm, my Unix module has disappeared.
<tsume>
humasect: you reinstalled ocaml or deleted the module? :P
<humasect>
hm neither =)
<tsume>
*poof* data loss
* humasect
does make install from ocaml dir ...
<humasect>
oh well. i didn't need it.
<tsume>
humasect: if you wish to see what I'm doing, you might want to download widestudio, and make sure swig has ocaml bindings
<humasect>
okay, i will have to find free space first
<tsume>
its kinda big.. about 22MB :)
<tsume>
well worth it however. its nice. though theres no freetype2 support, so I might just add a couplew lines in and send a patch. I haven't tried to use freetype2 with a Xt window, I imagine its just as easy as Xlib window.
kuribas has joined #ocaml
<Amorphous>
i try to set a breakpoint (break @ BTProtocol 407) but it says "Can't find any event there." but on that line (list BTProtocol 407 407) is: "| e ->" (from the matching of a try...with) shouldn't there be an event? what am i doing wrong?
<humasect>
tsume: soon =)
Msandin has joined #ocaml
Msandin has quit [Read error: 104 (Connection reset by peer)]
vincenz has quit [Read error: 60 (Operation timed out)]