<thelema>
let rec ui = ref ... and board = ref ...
<a13x>
This kind of expression is not allowed as right-hand side of `let rec'
<a13x>
talkinga bout ref(new ui ....
<a13x>
(first line)
<thelema>
okay, let ui0 = blah and b0 = blah (no refs);; let ui = ref ui0 and board = ref board0
<a13x>
you mean duplicate definitions
<a13x>
?
<a13x>
actually
<thelema>
no, define two values, and then define your refs to refer to them.
<a13x>
i think i already tried it without ref
<a13x>
but let me try it again
<thelema>
no, that won't work in your case, because board has to be a ref... hmmm...
jargonjustin has joined #ocaml
<ben__>
Uh, hm. Is it possible to construct a single argument tuple? :)
<thelema>
any chance your board function can take ui as an argument?
<jargonjustin>
Does Printf.printf use some sort of compiler intrinsics to type-check and accept variable length arguments?
<pango>
ben__: syntactically, I don't see how
<thelema>
jargonjustin: yes, printf statements use a magical type generated by the compiler from the format string.
<jargonjustin>
thelema: thanks, I like it but it was more than a little confusing
<thelema>
just treat it as magic, and don't worry about how it actually works. There's only a few cases where the magic breaks down, and you just have to stay away from those.
<pango>
# Printf.printf "%d: %s\n" ;;
<pango>
- : int -> string -> unit = <fun>
<a13x>
thelema: it seems like too much hassle, this is a homework project which doesn't have to be perfect (networking more important)
<a13x>
i thought there was an easy way of doing it
ben__ is now known as ziph
<a13x>
thanks
ttamttam has joined #ocaml
<pango>
and first argument of Printf.printf has not type string
<pango>
# let a = "%d: %s\n" in Printf.printf a ;;
<pango>
This expression has type string but is here used with type
<pango>
('a, out_channel, unit) format =
<pango>
('a, out_channel, unit, unit, unit, unit) format6
<thelema>
pango: yup, that's where it breaks down. The format just looks like a string. :)
filp has joined #ocaml
filp has quit [Read error: 104 (Connection reset by peer)]
wy has quit ["Leaving"]
hkBst has joined #ocaml
<pango>
you can only do controlled operations on formats
* RobertFischer
is in good company for the first time ever.
<thelema>
RobertFischer: oh yeah. I've watched it many many times.
<RobertFischer>
It's one of my girlfriend-filtering flicks.
<RobertFischer>
If they don't like that movie, it just ain't going to work out.
<RobertFischer>
:)
* RobertFischer
is off to lunch.
<thelema>
I guess that might work.
<RobertFischer>
I'm very happilly married now, so it worked out pretty well. :)
<RobertFischer>
mbishop: GoF
<mbishop>
what's GoF?
<bluestorm>
Gang of Four ? :-'
<mbishop>
Ah, yeah
<bluestorm>
(although it's quite unlikely, being a programming-related topic :-' )
<mbishop>
GOF added
<mbishop>
any other acronyms I should add?
Morphous has quit [Connection timed out]
<bluestorm>
hm
<bluestorm>
isn't 'CLR' actually written by 4 (a S iirc) ?
<mbishop>
CLR is the first edition
<mbishop>
CLRS is the second (Stein was new)
<bluestorm>
ah
<bluestorm>
hmm, that was the second line ^^
<mbishop>
I just added AIMA and EOPL
bluestorm has quit ["Konversation terminated!"]
evn_ has joined #ocaml
evn_ is now known as noob
a13x has joined #ocaml
postalchris has joined #ocaml
TheLittlePrince has quit [Client Quit]
<RobertFischer>
AIMA and EOPL?
ben_ has joined #ocaml
Linktim has joined #ocaml
ben_ has quit []
<RobertFischer>
I've never read those.
Linktim_ has joined #ocaml
goalieca has joined #ocaml
Linktim- has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
jsk has quit ["Leaving."]
<RobertFischer>
Heheh.
<RobertFischer>
mbishop and thelema: Turns out my boss is a huge Sneakers fan, too.
<RobertFischer>
I never knew.
<mbishop>
heh
<RobertFischer>
And then we proceeded to talk about how we strangely hate Swordfish more than Hackers.
<RobertFischer>
Go figure.
Linktim_ has quit [Read error: 110 (Connection timed out)]
Linktim- has quit [Read error: 110 (Connection timed out)]
<thelema>
as bad as hackers distorted the actual computer work, it didn't degrade it as much as swordfish.
bongy has quit ["Leaving"]
bluestorm has joined #ocaml
OChameau has quit ["Leaving"]
Yoric[DT] has joined #ocaml
pango has quit [Remote closed the connection]
jsk has joined #ocaml
ofaurax has joined #ocaml
pango has joined #ocaml
a13x has quit ["Leaving"]
ita has joined #ocaml
jsk has quit ["Leaving."]
ciscbrain_ has joined #ocaml
ciscbrain_ has left #ocaml []
noob is now known as evn__
evn__ is now known as evn_
goalieca has quit [Remote closed the connection]
szell has joined #ocaml
szell` has quit [Read error: 110 (Connection timed out)]
szell` has joined #ocaml
ttamttam has joined #ocaml
szell has quit [Read error: 110 (Connection timed out)]
middayc has quit [Read error: 104 (Connection reset by peer)]
bluestorm has quit ["Konversation terminated!"]
middayc has joined #ocaml
<neale>
is it just horrifically inefficient to curry functions left and right?
lordmetroid_ has joined #ocaml
<thelema>
neale: not horrifically, but a cost gets paid
<neale>
higher than keeping the individual parameters around?
<neale>
I mean, does it package up a whole continuation each time you curry a function?
<thelema>
it packages the function pointer with the values used in application.
<neale>
oh, that's nothing.
<thelema>
it's not that heavyweight
<neale>
awesome.
<thelema>
yes, ocaml is awesome
<neale>
:)
ita has quit [Remote closed the connection]
authentic has quit [No route to host]
LordMetroid has quit [Connection timed out]
bongy has joined #ocaml
lordmetroid_ has quit [Client Quit]
bongy has quit ["Leaving"]
middayc has quit []
middayc has joined #ocaml
mikeX has joined #ocaml
ttamttam has left #ocaml []
<neale>
it's weird
<neale>
seems like I spend a little longer thinking the program out
<neale>
a little longer getting it to compile
<neale>
and then generally no time debugging whatsoever
<thelema>
neale: good types and a strong typing system does that. Such is the case in Ada as well, although step 1 isn't as long, but step 2 is much longer
<neale>
I attribute this to strong typing but maybe I've just become a better programmer
<neale>
(lag)
<neale>
step 1 is really fun
<thelema>
mostly strong typing with good types. strong typing with simple types (see perl) doesn't produce the same results.
<neale>
how can you say perl is strongly typed?
<jlouis>
perl is definitely not strongly typed
<pango>
with enough beer
<thelema>
it is, it just has very simple types : scalar, list, hash, reference
<neale>
heh
<neale>
anyway perl is a terrible strawman example
<neale>
nobody likes perl
* thelema
likes perl
* evn_
likes perl
<neale>
heretic! burn them!
* pango
uses Perl at times
<pango>
for what it's worth, I prefer it to PHP :)
<neale>
I gave up on perl in college, and vowed never to look back when I read $SERVER{$server[$server]} = "glenn";
<thelema>
neale: someone abusing namespaces. I can do the same with ocaml:
<neale>
that was played for comedic effegct
<jlouis>
The problem with dynamic typing is that you all too often end up having to maintain the code for extended periods of time while people abuse your abstractions and introduce "bugs"
<thelema>
jlouis: repeat after me - The hybrid type system of Flanagan (2006) allows one to write this
<thelema>
program without any casts, and uses a theorem prover and a type-
<thelema>
Untyped code is really uni-typed; it is a special case of typed directed inference system to add the casts in the above. However,
<thelema>
code where every term has type Dyn we want to stress the point that a theorem prover, or even a fancy
thelema has quit [Excess Flood]
<RobertFischer>
Niiiiiiiiiiiice.
thelema has joined #ocaml
<RobertFischer>
WB!
<thelema>
oops, I hope the flood was contained...
<pango>
thelema: repeat after you... maybe not
* thelema
pulls the quote out of what he tried to paste (stupid selecting in evince...)
<jlouis>
thelema: Is that the work by Flannagan and Wadler?
<thelema>
Untyped code is really uni-typed; it is a special case of typed code where every term has type Dyn
<thelema>
jlouis: findler and wadler
<jlouis>
ah yes, that it was
<jlouis>
that case is entirely different and extremely interesting
<thelema>
I've heard the idea before (maybe by the same people), but this way of saying it seems very concise and agreeable.
<jlouis>
by flooding oneself off the IRC network ?
<jlouis>
hehe
<neale>
heh
<neale>
geez lag
StoneNote has joined #ocaml
<neale>
well gents
<neale>
my IRC server is coming along nicely
<neale>
I now have my own event dispatch system and an OCaml binding to epoll (or poll for non-Loonix systems)
<jlouis>
thelema: You can always give a dynamically typed environment the unityped type system. But it is not that interesting. However, the interesting part of Wadler and Findlers work is that they can mix and match that with static type systems
<jlouis>
or, which is much more interesting, can mix and match a Ocaml-style system with a (total) dependently typed system on top of it
<thelema>
jlouis: I look forward to systems being built on those foundations.
<RobertFischer>
We call those "Ruby bindings".
<jlouis>
neale: On most BSDs you have access to kqueue/kevent for he same thing if you ever want to speed it up. On Solaris, there is a system called /dev/poll doing the same IIRC
<RobertFischer>
Basically, all you're saying is that you can map to and from a dynamically typed system by allowing arbitrary actions on a given piece of data, and punting to the runtime to handle bad situations.
<RobertFischer>
This is not news.
<thelema>
jlouis: you seem to claim that untyped code encourages weak (easily abusable) abstractions
<neale>
jlouis: if anybody ever decides they want to run my code they're free to add those systems :)
<jlouis>
neale: urgh, I've signed up for work it seems ;)
<thelema>
Be sure to check pages 32 (NewsCorp stock), 38 (UHC stock)
<thelema>
NewsCorp is very big on only reporting on the CFR members running for president and UHC is trying to position theirself to handle a big chunk of administration should our country go toward National healthcare.
<thelema>
<thelema>
As you are looking thru this info you will also notice how much she has vested in the pharacuetical industry also. It's no wonder that she really wants to push national healthcare. She will make a fortune on it.
<thelema>
<thelema>
On page 37 you will notice that she doesn't have much faith in the government as opposed to the faith that she has in companies owned by CFR members. Wonder why that is? Does she seem to think that the CFR is going to be controlling more of our country than they do now?
<RobertFischer>
It's Java, but you can forgive me for that. :)
<thelema>
RobertFischer: why do you think we'd forgive you?
<thelema>
:)
marmottine has quit [Remote closed the connection]
<pango>
another paste problem? :)
<thelema>
pango: ?
<thelema>
mbishop: thinking about the QPL - debian thing, debian already includes OCaml which has QPL license. Why would a fork's QPL license cause any problems?
<mbishop>
eh?
<thelema>
oops, I thought it was you I was discussing QPL/debian with. sorry.
bongy has quit ["Leaving"]
<thelema>
hcarty: QPL + debian = OK (see above)
<hcarty>
thelema: Makes sense. I was unclear if the original + patches restriction was for sources only, or if it also imposed some further restriction on binaries
<hcarty>
But I think I understand the applicable restrictions now
<thelema>
hcarty: as far as I can tell, binaries don't have much restriction on them. There's some language making sure that a fork doesn't claim support from the original authors