Alpounet changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.1 out now! Get yours from http://caml.inria.fr/ocaml/release.html - Answer OCaml Meeting 2010 poll https://forge.ocamlcore.org/survey/survey.php?group_id=77&survey_id=1
tmaeda is now known as tmaedaZ
struktured has quit [Remote closed the connection]
ccasin has joined #ocaml
rwmjones has quit [Read error: 113 (No route to host)]
_unK has quit [Remote closed the connection]
Associat0r has quit []
ulfdoz_ has joined #ocaml
valross has quit [Remote closed the connection]
ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz_ is now known as ulfdoz
valross has joined #ocaml
seanmcl has quit []
struktured has joined #ocaml
Asmadeus_ has joined #ocaml
Camarade1Tux has joined #ocaml
tmaedaZ is now known as tmaeda
Asmadeus has quit [Read error: 113 (No route to host)]
Camarade_Tux has quit [Read error: 101 (Network is unreachable)]
seanmcl has joined #ocaml
eldragon has quit [Remote closed the connection]
caligula__ has joined #ocaml
zhijie has quit [Read error: 110 (Connection timed out)]
caligula_ has quit [Read error: 110 (Connection timed out)]
thrasibule has joined #ocaml
zhijie has joined #ocaml
tar_ has joined #ocaml
seanmcl has quit []
ccasin has quit ["Leaving"]
seanmcl has joined #ocaml
trav has joined #ocaml
<trav> Can someone explain the "> `List" in "[< `List of 'b | `S of string > `List ] as 'c) list as 'b"?
caligula_ has joined #ocaml
<trav> Even the name of this construction would help.
Mr_Awesome has quit [Remote closed the connection]
seanmcl has quit []
caligula__ has quit [Read error: 110 (Connection timed out)]
Alpounet has joined #ocaml
seanmcl has joined #ocaml
seanmcl has quit [Client Quit]
<julm> trav: polymorphic variants; > `List means that the `List variant must be handled when you match a value of this type; see the manual for more explanations
<trav> julm: Ch4 doesn't seem to mention that but maybe i missed it
<trav> What construction forces certain polymorphic variants to be handled but not others?
<Alpounet> trav, see in the manual what the ">" and "<" symbols mean.
<trav> Alpounet: please read my type signature again... this occurs after the union
<Alpounet> I wasn't there, paste it again.
<Alpounet> please
<trav> "[< `List of 'b | `S of string > `List ] as 'c) list as 'b"
<trav> please disregard the missing open paren
<julm> manual is silent about this mix of > < but its meaning is quite straightforward isn't it?
pad has joined #ocaml
<trav> Is it? What does that last bit mean? Why is it needed?
valross has quit [Remote closed the connection]
<Alpounet> trav, what is your function's def by the way ?
<Alpounet> trav, facebook client in OCaml ?
<trav> Alpounet: yeah
<Alpounet> nice, when you have a working version, tell us
<trav> Alpounet: it'll probably be open source but I haven't had the conversation with my boss yet
<Alpounet> that's the kind of project that shows OCaml is a real world language.
<trav> oh, you have no idea...
<Alpounet> ok.
<trav> :-P
<Alpounet> haha
<Alpounet> so what's confusing you is the '>' before `List
<Alpounet> right N
<Alpounet> ?*
<trav> yes... it's not actually causing any problems
<julm> [("uids", `List uids); ("fields", `List fields)] <- I think it should be because you use `List and only `List here that you get > `List
<trav> i've just never seen it before and it's hard to find docs to explain it
<trav> but that `List is to pack a list of the union -- to move the method argument type check into ocaml's type system
<Alpounet> that's exactly why you get `List there
<Alpounet> when packing a list of the union you get `List
<Alpounet> thus the > `List
<trav> I assume that "> `List" applies to the union as a whole
<trav> so what is the meaning of the ">"?
<Alpounet> that it's extendable
<trav> an arrow? greater than? over there? and what is special about its argument?
<Alpounet> there, the code may handle more polymorphic variants than just `List
<Alpounet> but for the moment it doesn't.
<Alpounet> on the contrary, the < at the beginning tells the list of handled polymorphic variants can be shortened, i.e that the function can be restricted wrt all the polymorphic variants it handles.
<trav> Huh? Right now it handles the entire union... the `List in get_info is just a constructor?
<Alpounet> polymorphic variants are value constructors, yeah indeed
<trav> so I don't understand how it handles `List but not `S enough to warrant a type annotation
<Alpounet> hmm
<Alpounet> you have `List only in get_info
<Alpounet> whereas you have `S in coerce
<Alpounet> so the > means that "ok, you're handling `List, but you can handle more there. You don't, for the moment, but just to be sure you know about that, I may handle more polymorphic variants than just `List"
<trav> uhh? `List isn't used to match in get_info... shouldn't it just bubble up the full union handled in coerce inside of an ocaml list?
<Alpounet> trav, coerce isn't called anywhere in get_info
<Alpounet> why should it know about the rest ?
<Alpounet> that's the key idea behind polymorphic variants : you only get the minimal "tags" you need in the type.
<Alpounet> but still, it tells that you can handle more things than `List
<Alpounet> since `List is used to build values, it appears after the >
<trav> but coerce implies that params has the full type which implies that that argument to call has the full type
<trav> hmmm
<Alpounet> yeah
<Alpounet> but coerce isn't called in get_info
<Alpounet> THAT is the key point.
<Alpounet> you see what I mean ?
<trav> sort of
<trav> I just don't understand /why/
<Alpounet> coerce and your list aren't related for the compiler, when type checking get_info
<Alpounet> why should it worry about coerce since it doesn't appear in get_info ?
<trav> because call->call_method->coerce?
<Alpounet> yes
<Alpounet> but in get_info
<Alpounet> you have no `S
<Alpounet> thus the "> `List" only
<trav> How does that change checking, though?
<trav> How is that different from just leaving "> `List" off?
tar_ has quit []
<Alpounet> trav, well, the compiler looks at the list, and sees only `List
<Alpounet> but it also sees there could have been other stuffs there
<Alpounet> like `S
<Alpounet> thus it tells you "this function handles `List, but can handle more actually"
<trav> hrm... i'll need to think about this harder
<trav> I see what you're saying
<Alpounet> trav, if you put `S "a string" in get_info
<Alpounet> it'll put your `S too
<trav> There must be something about the laziness of polymorphic variants that i don't understand
<Alpounet> but there isn't any for the moment.
<Alpounet> trav, polymorphic variant type checking works "on demand"
<Alpounet> it only considers a tag when you explicitly mention it somewhere in your function's code.
<trav> ok... but shouldn't it just unify `List in get_info and `List in coerce?
<trav> i mean, it clearly inferred both List and S in get_info's sig
<Alpounet> yeah it knows about them
<trav> and it understands that the polymorphic variants in the arguments of get_info are closed
<Alpounet> but as you said, that's the "laziness" that imply the behavior you're having hard to grasp.
<Alpounet> but polymorphic variants ARE DIFFERENT from classical variants
<Alpounet> `Off and ... `Off can be of different types
<trav> yes
<Alpounet> so no, it won't unify anything
<trav> I see
<Alpounet> it's purely structural
<trav> I mean, it's not possible in the general case
<trav> but in this case, it is possible
<Alpounet> like when you have : let f obj = obj#g 4;;
<trav> because both uses of the variants infer from the same match
<Alpounet> yeah
<Alpounet> but PV only rely on their names
<Alpounet> and their potential arguments
<trav> Hmm... so it seems like it would mean something useful in the general case
<trav> but this case just looks like superfluous annotation because they are the same
<Alpounet> if you return `Off somewhere, and match it elsewhere, and if you connect these two piece of codes, then it'll be about the same `Off.
<trav> Yes
<Alpounet> trav, then you should consider creating a type for `List of list | `S of string
<trav> ooooooohhhhhhh
<trav> Thank you! :-)
<Alpounet> trav, see the manual
<trav> Yes... that explains it all.
<Alpounet> there's an example of a type with polymorphic variant constructors IIRC
<trav> I forgot I can declare PV union types
<trav> It is all clear now.
<trav> Thanks again and I'll let the chan know what's up with the library
<Alpounet> nice :-)
trav has quit ["Page closed"]
Asmadeus_ has quit [Read error: 60 (Operation timed out)]
Camarade_Tux has joined #ocaml
Asmadeus has joined #ocaml
<Alpounet> thelema, ping
<flux> mrvn, http://www.pcper.com/article.php?aid=825 - Intel's 48-core CPU: "The SCC eliminates significant complexity & power [consumption?] by removing hardware cache coherency"
<flux> of course, there still is shared memory
<flux> but it's quite a step down from the magical shared memory, if stuff in L2-cache doesn't appear to be shared
Camarade1Tux has quit [Read error: 60 (Operation timed out)]
Mr_Awesome has joined #ocaml
tar_ has joined #ocaml
r0bby has quit [Connection timed out]
ttamttam has joined #ocaml
ttamttam has quit ["Leaving."]
rlarson85 has joined #ocaml
rlarson85 has quit [Client Quit]
rlarson85 has joined #ocaml
Submarine has joined #ocaml
M| has quit [Read error: 110 (Connection timed out)]
M| has joined #ocaml
ttamttam has joined #ocaml
albacker has joined #ocaml
Submarine has quit [Read error: 113 (No route to host)]
tar_ has quit []
Associat0r has joined #ocaml
_zack has joined #ocaml
<flux> ooh, 19 people (or spiders) have taken an interest on ocaml-nntp, or atleast enough to check the repo
<gildor> flux: what about moving it to OCaml forge (forge.ocamlcore.org)
<gildor> (ok, sorry for constant advertisement, I keep trying to make more people coming to OCaml forge ;-)
<Alpounet> I think you're right. Centralizing OCaml projects can't be bad... in any way.
<Alpounet> having a hackage/cabal like environment would be neat :-p
<flux> gildor, well, yes, but it was much simpler to just darcs put ~/public_html/darcs/ocaml-nntp :)
sgnb` is now known as sgnb
<Alpounet> flux, git push isn't hard :-)
<flux> alpounet, I bet it wouldn't work without some preparation :)
<Alpounet> come ooooon :-p
<Alpounet> libraries / apps centralization is really something missing for many languages
<flux> I wonder if I actually have an ocamlforge account already, iirc I might've created it to file some bug report..
<Alpounet> haven't you filled some bug reports for batteries ?
<gildor> flux: if you have already a darcs repository somewhere, you can ask to create an empty one with a project on forge.ocamlcore.org
<gildor> flux: and just push your repository to darcs.ocamlcore.org
Associat0r has quit []
Associat0r has joined #ocaml
<flux> well, I submitted a project request
<gildor> flux: if a lot of people begin to be interested in you'll have everything ready then (including BTS, download counter and a way to allow other people to commit their change in your darcs repo)
Yoric has joined #ocaml
<flux> oh wait, was that even useful?
<gildor> flux: ok, time to test if I can see the project appears on the new gforge version ;-)
<flux> how do I actually get access to the forementioned darcs server?
<gildor> once your account is created, you need to add a SSH pub key to it
<gildor> then you'll have access to ssh.ocamlcore.org, which contains the darcs repository
<gildor> for anonymous access, there is an http server (i.e. darcs.ocamlcore.org)
<gildor> flux: I create the darcs repository also ?
<flux> gildor, sure
<flux> gildor, is it possible to get a list of all projects in a single (possibly paginated, if it's too big) list?
<flux> (the darcsweb main page was nice, but it didn't have any descriptions on the projects)
<gildor> darcs get/push ssh.ocamlcore.org:/darcsroot/ocaml-nntp/ocaml-nntp
<gildor> (for the darcs repository)
<gildor> you need to wait a little bit, it you just update your SSH key (hourly cron)
<flux> gildor, btw, none of the bzr projects appear to have any files (some directories, though), is that a bug?-o
<gildor> list of all projects -> ls /home/group/ in ssh.ocamlcore.org, but you won't get description either
<gildor> you mean in the bzr projects doesn't have any files in the web interfaces ?
<gildor> that is because file are hidden
<gildor> not listed, but it is there
<gildor> bzr know how to deal with it, and I will install loggerhead to have a nice web interface ASAP
<gildor> flux: gtg, leave me a message if you have problem with your darcs repository
Associat0r has quit [Connection timed out]
<flux> gildor, I guess darcsweb requires some cronmatic maintenance for ocaml-nntp to appear?
albacker has quit ["Leaving"]
<flux> I think a big problem with the current pages is that if you only have a darcs repo, you cannot know how to find the source.. for example I'm here: http://libbitorrent.forge.ocamlcore.org/ and it looks like the project doesn't have anything available
<flux> (who knows, maybe it doesn't ;))
ikaros has joined #ocaml
<gildor> flux: the cronmatic for darcsweb has happen
<gildor> concerning the source problem, that is the reason why I contributed to FusionForge
<gildor> There is a darcs/git plugin which I have helped to design :
<gildor> We are planning to move to fusionforge to have this 2 plugins at hand + scmhg and scmbzr
<gildor> (fusionforge is (yet) a(nother) fork of gforge)
<gildor> Take a look at alioth to see this plugins working (esp. git)
<gildor> the problem was that we need to upgrade the whole system to proceed to the FusionForge migration (i.e. to have something that work with GForge 4.7, to migrate to FusionForge 4.8)
<gildor> I finished the Etch->Lenny migration last monday and I plan GForge -> FusionForge migration for mid-january
<gildor> flux: concerning libbitorrent, I just checked and the reason is that author seems to have stored its file in CVSROOT/CVSHACKING
<gildor> If you look now, you will see that I have made a symlink and that module libittorrent exist
Narrenschiff has joined #ocaml
ikaros has quit ["Leave the magic to Houdini"]
ski_ has joined #ocaml
_zack has quit ["Leaving."]
tmaeda is now known as tmaedaZ
maskd has quit [farmer.freenode.net irc.freenode.net]
mehdid has quit [farmer.freenode.net irc.freenode.net]
wm_eddie has quit [farmer.freenode.net irc.freenode.net]
infoe has quit [farmer.freenode.net irc.freenode.net]
jlouis has quit [farmer.freenode.net irc.freenode.net]
flux has quit [farmer.freenode.net irc.freenode.net]
Narrenschiff has quit [farmer.freenode.net irc.freenode.net]
Yoric has quit [farmer.freenode.net irc.freenode.net]
ttamttam has quit [farmer.freenode.net irc.freenode.net]
rlarson85 has quit [farmer.freenode.net irc.freenode.net]
Camarade_Tux has quit [farmer.freenode.net irc.freenode.net]
pad has quit [farmer.freenode.net irc.freenode.net]
thrasibule has quit [farmer.freenode.net irc.freenode.net]
ulfdoz has quit [farmer.freenode.net irc.freenode.net]
shr3kst3r has quit [farmer.freenode.net irc.freenode.net]
mrvn has quit [farmer.freenode.net irc.freenode.net]
jimmyb2187 has quit [farmer.freenode.net irc.freenode.net]
hcarty has quit [farmer.freenode.net irc.freenode.net]
mishok13 has quit [farmer.freenode.net irc.freenode.net]
acatout has quit [farmer.freenode.net irc.freenode.net]
Mr_Awesome has quit [farmer.freenode.net irc.freenode.net]
Asmadeus has quit [farmer.freenode.net irc.freenode.net]
caligula_ has quit [farmer.freenode.net irc.freenode.net]
mfp has quit [farmer.freenode.net irc.freenode.net]
nnyby has quit [farmer.freenode.net irc.freenode.net]
hyperboreean has quit [farmer.freenode.net irc.freenode.net]
jonafan has quit [farmer.freenode.net irc.freenode.net]
mbishop has quit [farmer.freenode.net irc.freenode.net]
nimred has quit [farmer.freenode.net irc.freenode.net]
mal`` has quit [farmer.freenode.net irc.freenode.net]
lanaer has quit [farmer.freenode.net irc.freenode.net]
infoe_ has quit [farmer.freenode.net irc.freenode.net]
struktured has quit [farmer.freenode.net irc.freenode.net]
bzzbzz has quit [farmer.freenode.net irc.freenode.net]
ertai has quit [farmer.freenode.net irc.freenode.net]
munga_ has quit [farmer.freenode.net irc.freenode.net]
det has quit [farmer.freenode.net irc.freenode.net]
tab_ has quit [farmer.freenode.net irc.freenode.net]
tonyIII has quit [farmer.freenode.net irc.freenode.net]
noj has quit [farmer.freenode.net irc.freenode.net]
safire has quit [farmer.freenode.net irc.freenode.net]
BigJ2 has quit [farmer.freenode.net irc.freenode.net]
julm has quit [farmer.freenode.net irc.freenode.net]
M| has quit [farmer.freenode.net irc.freenode.net]
Alpounet has quit [farmer.freenode.net irc.freenode.net]
tensorpudding has quit [farmer.freenode.net irc.freenode.net]
Amorphous has quit [farmer.freenode.net irc.freenode.net]
anders^^ has quit [farmer.freenode.net irc.freenode.net]
gildor has quit [farmer.freenode.net irc.freenode.net]
|Jedai| has quit [farmer.freenode.net irc.freenode.net]
mattam has quit [farmer.freenode.net irc.freenode.net]
tarbo2 has quit [farmer.freenode.net irc.freenode.net]
hugin has quit [farmer.freenode.net irc.freenode.net]
diml has quit [farmer.freenode.net irc.freenode.net]
ozzloy has quit [farmer.freenode.net irc.freenode.net]
peddie has quit [farmer.freenode.net irc.freenode.net]
zhijie has quit [farmer.freenode.net irc.freenode.net]
tmaedaZ has quit [farmer.freenode.net irc.freenode.net]
smimou has quit [farmer.freenode.net irc.freenode.net]
TaXules has quit [farmer.freenode.net irc.freenode.net]
patronus_ has quit [farmer.freenode.net irc.freenode.net]
ski_ has quit [farmer.freenode.net irc.freenode.net]
sgnb has quit [farmer.freenode.net irc.freenode.net]
thelema has quit [farmer.freenode.net irc.freenode.net]
brendan has quit [farmer.freenode.net irc.freenode.net]
svenl has quit [farmer.freenode.net irc.freenode.net]
__marius__ has quit [farmer.freenode.net irc.freenode.net]
fremo_ has quit [farmer.freenode.net irc.freenode.net]
Ori_B_ has quit [farmer.freenode.net irc.freenode.net]
Pepe_ has quit [farmer.freenode.net irc.freenode.net]
deavidsedice has quit [farmer.freenode.net irc.freenode.net]
orbitz has quit [farmer.freenode.net irc.freenode.net]
thelema has joined #ocaml
Narrenschiff has joined #ocaml
Yoric has joined #ocaml
ttamttam has joined #ocaml
M| has joined #ocaml
rlarson85 has joined #ocaml
Mr_Awesome has joined #ocaml
Asmadeus has joined #ocaml
Camarade_Tux has joined #ocaml
pad has joined #ocaml
Alpounet has joined #ocaml
caligula_ has joined #ocaml
zhijie has joined #ocaml
thrasibule has joined #ocaml
struktured has joined #ocaml
ulfdoz has joined #ocaml
tensorpudding has joined #ocaml
mfp has joined #ocaml
nnyby has joined #ocaml
bzzbzz has joined #ocaml
flux has joined #ocaml
Amorphous has joined #ocaml
tmaedaZ has joined #ocaml
shr3kst3r has joined #ocaml
ertai has joined #ocaml
munga_ has joined #ocaml
hyperboreean has joined #ocaml
mrvn has joined #ocaml
anders^^ has joined #ocaml
det has joined #ocaml
smimou has joined #ocaml
jimmyb2187 has joined #ocaml
TaXules has joined #ocaml
hcarty has joined #ocaml
jonafan has joined #ocaml
gildor has joined #ocaml
|Jedai| has joined #ocaml
maskd has joined #ocaml
mbishop has joined #ocaml
nimred has joined #ocaml
mal`` has joined #ocaml
mattam has joined #ocaml
mehdid has joined #ocaml
wm_eddie has joined #ocaml
tarbo2 has joined #ocaml
patronus_ has joined #ocaml
ozzloy has joined #ocaml
hugin has joined #ocaml
lanaer has joined #ocaml
diml has joined #ocaml
infoe_ has joined #ocaml
infoe has joined #ocaml
peddie has joined #ocaml
tonyIII has joined #ocaml
safire has joined #ocaml
tab_ has joined #ocaml
julm has joined #ocaml
jlouis has joined #ocaml
mishok13 has joined #ocaml
acatout has joined #ocaml
noj has joined #ocaml
BigJ2 has joined #ocaml
orbitz has joined #ocaml
Ori_B has joined #ocaml
ski__ has joined #ocaml
__marius__ has joined #ocaml
orbitz has quit [Killed by ballard.freenode.net (Nick collision)]
sgnb has joined #ocaml
brendan has joined #ocaml
deavidsedice has joined #ocaml
Pepe_ has joined #ocaml
orbitz has joined #ocaml
fremo_ has joined #ocaml
svenl has joined #ocaml
deavid has joined #ocaml
deavidsedice has quit [Connection reset by peer]
orbitz_ has joined #ocaml
orbitz has quit [Read error: 60 (Operation timed out)]
Alpounet has quit [Success]
Snark has joined #ocaml
_zack has joined #ocaml
Alpounet has joined #ocaml
_andre has joined #ocaml
ski__ is now known as ski_
Narrenschiff has quit []
_zack has quit ["Leaving."]
ikaros has joined #ocaml
seanmcl has joined #ocaml
<thelema> Alpounet: pong
thrasibule has quit [Read error: 110 (Connection timed out)]
<Alpounet> thelema, what's up with aaa ?
<thelema> aaa has been stuck waiting for me to rename all the friggin modules
<thelema> *everything* is getting a bat prefix
<thelema> this weekend there should be a wide release
<Alpounet> ok
<Alpounet> don't hesitate to blogpost about that :-)
<thelema> If I had a blog...
<Alpounet> or whatever will tell the community "come on, try batteries now ! nothing is keeping you from doing that, not even a hard install"
<Alpounet> thelema, if you give me the core of the content, I can
<thelema> ok
<Alpounet> but I don't have time to write myself a large post explaining what's changed, why they really should test this one, etc
tr|ck has joined #ocaml
<thelema> What I write will probably be a short post - Here's AAA batteries, easier to install, easier to understand, easier to hack on.
<Alpounet> ok
<Alpounet> I may try to make it a bit longer with samples but it won't be much longer.
<thelema> I'll probably make some comparison to extlib
<thelema> I don't think there's any wonderful new features of aaa.
<Alpounet> no
<Alpounet> rather that it is batteries, made easy
tmaedaZ is now known as tmaeda
seanmcl has quit []
<gildor> thelema: use the Announce of forge.ocamlcore.org, if you don't have a blog
<gildor> thelema: everything is setup for batteries
<gildor> thelema: just submit an announce and it will make its way to OCaml planet
<thelema> gildor: Thanks. That helps a bunch.
<thelema> I was wondering how things got from the forge to the planet occasionally
<gildor> well, you submit an announce to your forge project
<gildor> I review it on the admin interface of the project "Site News admin"
<gildor> and it goes to the root page of forge.ocamlcore.org
<gildor> then it is pickup by the planet feed aggregator after an hour
<thelema> no problems with delay.
<flux> I'm thinking that all the cron-jobs could perhaps run ten times as fast, it's not like your systems are under great stress?-)
<gildor> well, it depends on the availability of an admin to validate your post
<flux> ah, right
<thelema> gildor: any fancy formatting for code blocks?
<gildor> thelema: maybe html stuff, never tried it
<gildor> flux: my server is only hosting forge.o.o, there are others non related service running on it which is more important to me
<gildor> services
dmentre has joined #ocaml
<gildor> (i.e. related to my company, which can eat a lot more power than you thinkg, e.g. a single trac instance)
<gildor> flux: not counting a lot of SSH attack and other nmap running all the time
<gildor> attacks / nmaps
<gildor> flux: but maybe one day, I will make it run faster
<flux> hmm.. I wonder if there's a system for linux that would limit cpu-consumption of a process to max n%, regardless how much of it is available
<gildor> flux: vserver can do this using kind of tokens
<flux> that combined with an ssh whitelist (of hosts that have already authorized) could reduce the cpu consumption of such attacks
<gildor> flux: we are using denyhost to blacklist SSH attacker after 10 attacks for 2 hours
<flux> gildor, but it doesn't work for distributed attacks
<gildor> flux: most of the attack are targetting locked account (user: root, mysql, postmaster)
<gildor> flux: and it get blacklisted after the 1st try in this case
<gildor> flux: it is hard to find a solution that works for everything concerning this
<flux> gildor, but it is my understanding big distributed attacks only ever do just one attempt per a long period from a single ip
<flux> yes, it is difficult
<flux> the best would be that ssh had some builtin support for efficient first-round elimination of attempts
<flux> that wouldn't consume CPU
<gildor> I know about the slow distributed attacks
<flux> or bandwidth
<gildor> but I spend my time working on 1) make my company win some $ 2) run *.ocamlcore.org service 3) maintain my OCaml debian package 4) write my own OCaml code
<gildor> services/packages (sorry I am a singular man today)
<gildor> flux: if you have time to find a good solution, I will be happy to apply it
<gildor> flux: I mean a solution that won't take me hours to install
<flux> :)
<flux> I'm afraid it doesn't exist
<gildor> flux: and that won't lock valid users outside the forge
<flux> in any case, the cpu consumption is an actual concern?
<gildor> flux: yes and no, as usual
<gildor> flux: $ uptime
<gildor> 15:01:40 up 7 days, 23:11, 1 user, load average: 0.13, 0.10, 0.02
<gildor> (for the dom0)
<flux> gildor, but that's just a sample..
<gildor> the problem with CPU consumption is a real attacker will target this first
<flux> first = dom0?
<flux> uh, s/first/this/
<gildor> no first = CPU
<gildor> it is really easy to saturate a CPU
<gildor> (on amd64/x86à
<gildor> )
<gildor> flux: it happens frequently on another server (less powerful)
<gildor> flux: the bandwidth is huge (1GBps) and it is easy to have server saturate it by simple SSH/HTTP connections
<gildor> in this case, the load average can reach 16 to 60 and I cannot maintain a SSH connection
<gildor> (at least typing is hard)
<dmentre> gildor: regarding ssh attacks, one easy trick is to use a non standard port. On my own server, it has cleared out most of ssh logs filled by such attacks.
<gildor> dmentre: of course ;-) there is only ssh.ocamlcore.org that use a standard SSH ports
<gildor> the 5 others vservers doesn't use standard ports
<gildor> dmentre: the problem with this approach is that it is working as long as you are not behind a firewall that filter out connection
<dmentre> gildor: yep
<dmentre> gildor: is filtering firewalls really an issue for ocamlforge users?
<dmentre> s/is/are/
<flux> gildor, run your ssh-server in ipv6.. ;-)
<gildor> dmentre: yes, for people working in universities (like C. Troestler and his students)
<dmentre> gildor: ack
<gildor> flux: would like to but it will be hard to convince every people that use OCaml to setup ipv6 tunnel ;-)
<gildor> flux: OCaml is hard enough !
<gildor> (and not supporting IPv6 on Windows, BTW)
<flux> I was thinking this could help atleast within the single virtual machine: a system that nice +15's sshd, but once a session is established, restore to nice level 0
<flux> but implementing it would require some coding, and it wouldn't help the actual machine
<flux> bonus assignment: give nice 0 to sshd's accepting connections from hosts that have prior good authentications :)
seanmcl has joined #ocaml
lutter has joined #ocaml
* dmentre think ssh should offer an option to include and check a simple plain text token *before* starting crypto negociation. It would remove most of random attacks
<flux> dmentre, unfortunately I imagine such a change would not be backwards compatible
<dmentre> flux: can't say, I don't know enough the SSH protocol
<gildor> flux: your idea need to implemented inside SSH directly I think
<flux> gildor, depends. you could use rc-scripts for hooking the priority restoration.
<flux> gildor, the ssh-connection-priorisation could be implemented with iptables and a daemon
<Camarade_Tux> I know someone who just blocked all non-openssh clients to his box since the vast majority of the clients were pretending to be other implementations ;-)
<gildor> iptables won't work inside a vserver
<flux> gildor, I suppose implementing it directly in ssh would be cleaner, though
<flux> doesn't? bah, iptables is nice for many tricks, that's too bad
<gildor> vserver doesn't access dom0 iptables
orbitz_ has quit [Client Quit]
orbitz has joined #ocaml
<flux> maybe the trick could be implemented in dom0 level?
<flux> dom0 could report the required information to the guest
<gildor> flux: it would violate the security principle of virtualisation
<gildor> flux: if domU gets compromised, I don't want it to be able to access dom0 iptables
<flux> implement it in ocaml so it'll be safe ;)
<flux> I was thinking simple one-way information path
<flux> information flowing from dom0 do domU
<flux> to, even
<gildor> flux: especially if the first attacker move is to prevent me to blacklist me
<gildor> is to prevent me to blacklist me -< is to blacklist me
<gildor> is to prevent me to blacklist me -> is to blacklist me
<gildor> flux: maybe it is a good idea,
<gildor> flux: you can have a daemon watching for newly created SSH instance in dom0 and run corresponding nice command inside domU
<gildor> (either using a daemon in domU or launching "vserver ssh.ocamlcore.org run nice -n=15 pid
<gildor> )
<gildor> there is a lot to do however...
<gildor> you can watch incoming SSH connection using mlpcap...
<flux> true, didn't think of that
_andre has quit ["*puff*"]
<gildor> and use ocamlnet for dom0/domU communication
zarvok has joined #ocaml
_zack has joined #ocaml
ikaros has quit ["Leave the magic to Houdini"]
lutter has quit ["Leaving."]
Alpounet has quit [Read error: 60 (Operation timed out)]
Alpounet has joined #ocaml
ikaros has joined #ocaml
_unK has joined #ocaml
ikaros has quit [Client Quit]
ski_ has quit ["Lost terminal"]
ikaros has joined #ocaml
ski_ has joined #ocaml
Pimm has joined #ocaml
fraggle_laptop has joined #ocaml
lutter has joined #ocaml
Leonidas has quit [Read error: 104 (Connection reset by peer)]
Smerdyakov has joined #ocaml
Leonidas has joined #ocaml
ikaros has quit ["Leave the magic to Houdini"]
ikaros has joined #ocaml
fraggle_laptop has quit ["Quitte"]
subito has joined #ocaml
<subito> hello, i'm trying to do automatic memoization for recursive functions: http://fr.wikipedia.org/wiki/Memoization (see memo_rec and line bellow); so if i have a recursive function f already defined (let rec f = ... f ...) i want that applying "memo_rec" to f creates f with memoization; however, in the example given in wikipedia you have to redefine your function differently before giving it to memo_rec; am i clear?
<subito> maybe not :D
<Smerdyakov> I don't think there is a way to do automatic memoization in OCaml without using camlp4 or something like that.
tmaeda is now known as tmaedaZ
Snark has quit ["Ex-Chat"]
<mrvn> I can think of a way to do it semi automatic. You would have let fn = memo_N fn in and "fn arg1 ... argN" for the recursion.
<mrvn> N being the number of arguments.
lutter has quit ["Leaving."]
lutter has joined #ocaml
dmentre has quit ["Leaving."]
ua has joined #ocaml
Pimm has quit [Read error: 110 (Connection timed out)]
subito has quit [Read error: 113 (No route to host)]
ttamttam has quit [Read error: 110 (Connection timed out)]
ttamttam has joined #ocaml
ttamttam has quit ["Leaving."]
* Yoric agrees with Smerdyakov.
<Yoric> Hi Smerdyakov, btw.
<Yoric> How do you do?
<Smerdyakov> I do Quite Fine, thank you.
<thelema> Yes, you can't do completely automatic memoization without camlp4, but it's not difficult to write your recursive function in a style that allows for easy memoization.
ua has quit [Read error: 113 (No route to host)]
<thelema> and if subito was online, I'd tell him what those changes were.
Yoric has quit []
tensorpudding has quit [Remote closed the connection]
ttamttam has joined #ocaml
seanmcl has quit []
_zack has quit ["Leaving."]
Amorphous has quit [Read error: 110 (Connection timed out)]
albacker has joined #ocaml
Amorphous has joined #ocaml
albacker has quit [Client Quit]
seanmcl has joined #ocaml
BigJ2 has quit [Read error: 104 (Connection reset by peer)]
Smerdyakov has quit ["Leaving"]
BigJ has joined #ocaml
rwmjones has joined #ocaml
ua has joined #ocaml
Narrenschiff has joined #ocaml
fraggle_ has joined #ocaml
zarvok has quit ["Leaving"]
morse has joined #ocaml
lutter1 has joined #ocaml
lutter has quit [Read error: 104 (Connection reset by peer)]
Yoric has joined #ocaml
fraggle_ has quit [Remote closed the connection]
sramsay has joined #ocaml
ski_ has quit ["Lost terminal"]
ski_ has joined #ocaml
albacker has joined #ocaml
Narrenschiff has quit []
fraggle_ has joined #ocaml
tensorpudding has joined #ocaml
rwmjones has quit [Read error: 110 (Connection timed out)]
struktured_ has joined #ocaml
slash_ has joined #ocaml
marteo has joined #ocaml
fraggle_ has quit [Read error: 60 (Operation timed out)]
struktured has quit [Read error: 110 (Connection timed out)]
ttamttam has quit ["Leaving."]
Pimm has joined #ocaml
ua has quit [Remote closed the connection]
Yoric has quit []
ua has joined #ocaml
rhar has joined #ocaml
tr|ck has left #ocaml []
schmx has quit [Read error: 113 (No route to host)]
schme has joined #ocaml
pad has quit ["ERC Version 5.3 (IRC client for Emacs)"]
ua has quit [Remote closed the connection]
ua has joined #ocaml
albacker has quit ["Leaving"]
lutter1 has quit ["Leaving."]
marteo has quit ["Debian GNU/Hurd is Good."]
rhar has left #ocaml []
tmaedaZ is now known as tmaeda
<Leonidas> mrvn: coming back to your idea of optimizing my binomial tree merge operation:
<Leonidas> mrvn: http://xivilization.net/git?p=info2.git;a=blob;f=ha6/ha6.ml;h=8313bf8b6313a7d5f3c63beeea932556f6387be8;hb=c788d652259306ab5037a7e6de4f2335d7cece1e
<Leonidas> mrvn: the assignment says to recurse on both heaps at once, but this does not seem to be much more efficient. Only if both heaps have exactly the same orders.
* Leonidas also added a bunch of unittests, which make changes much easier
<Leonidas> again, it got late - good night, #ocaml!
ikaros has quit [Remote closed the connection]
<mrvn> Leonidas: Because you are doing it wrong.
slash_ has quit [Client Quit]
<mrvn> Leonidas: You start with an empty result heap, a and b. If the lowest order of a and b are different then you put the lower one into the result heap and recurse. if they are the same order you insert the one from b into a and recurse. At the end your reverse the result heap so it is sorted by order again. Alternatively you use 4 arguments: result heap, optional overflow, a and b. When 2 of overflow, a and b have the same
Pimm has quit [Read error: 110 (Connection timed out)]
<mrvn> Leonidas: Think of it as adding binary numbers. A 1 bit means a tree of that order exists.
tmaeda is now known as tmaedaZ
ua has quit [Remote closed the connection]