Arelius has quit [Read error: 104 (Connection reset by peer)]
LordMetroid has quit ["Leaving"]
<palomer>
is Str UTF8 friendly?
pango has quit [Remote closed the connection]
pango has joined #ocaml
<thelema>
palomer: yes, although it can accidentally cut characters into two pieces.
<thelema>
if misused
<palomer>
ouch
<palomer>
so there's no flag to set (like in PCRE)?
<palomer>
(I'm talking about the regular expression part)
RobertFischer has joined #ocaml
Morphous_ has quit [Read error: 110 (Connection timed out)]
Morphous_ has joined #ocaml
<thelema>
nope, the regexes are not unicode-aware
<palomer>
doh!
<palomer>
so I can't start matching japanese characters, right?
seafood has joined #ocaml
rhar has quit [Read error: 110 (Connection timed out)]
rhar has joined #ocaml
<tsuyoshi>
there's not really any reason to use str over pcre
seafood has quit []
<thelema>
palomer: not easily.
prince has quit [Client Quit]
<palomer>
pcre it is!
seafood has joined #ocaml
<palomer>
anyone got a link to the pcre online documentation?
ppsmimou has quit [leguin.freenode.net irc.freenode.net]
flux has quit [leguin.freenode.net irc.freenode.net]
Naked has quit [leguin.freenode.net irc.freenode.net]
AxleLonghorn has joined #ocaml
AxleLonghorn has left #ocaml []
ppsmimou has joined #ocaml
flux has joined #ocaml
Naked has joined #ocaml
thelema has quit [leguin.freenode.net irc.freenode.net]
mfp has quit [leguin.freenode.net irc.freenode.net]
unfo- has quit [leguin.freenode.net irc.freenode.net]
thelema has joined #ocaml
mfp has joined #ocaml
unfo- has joined #ocaml
cmeme has joined #ocaml
cmeme has quit [Client Quit]
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
RobertFischer has quit []
cmeme has quit []
cmeme has joined #ocaml
<palomer>
weee!
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
<palomer>
hrmph, I'm tokenizing and this pcre stuff is way too fancy
<palomer>
anyone know how to simply get the length of the longest match when matching regexp r with string s starting at position p?
cmeme has quit []
cmeme has joined #ocaml
<palomer>
Returns an array of offsets that describe the position of matched subpatterns in the string subj starting at position pos with pattern pat when given, regular expression rex otherwise. The array also contains additional workspace needed by the match engine. Uses flags when given, the precompiled iflags otherwise. Callouts are handled by callout.
<palomer>
additional workspace??!?
<tsuyoshi>
if you're tokenizing maybe you want ulex?
<palomer>
cool!
<palomer>
but I'm creating a custom tokenizer
<palomer>
basically, it ignores \n \t and space
<palomer>
returns words in blocks
<palomer>
numbers in blocks
<palomer>
and everything else character by character
<palomer>
and I need regexps
cmeme has quit []
<tsuyoshi>
you can do that with ulex
cmeme has joined #ocaml
<palomer>
but I've already written everything!
<palomer>
and it seems I'll need to read a lengthy tutorial on how to use this
<flux>
hm, I have an en expression do_stuff >>= fun result -> let result = f result in if debug then print_endline "foo"; return result. How would I write that with pa_monad?
<flux>
my first attempts requires print_endline "foo" to be in the monad too..
<flux>
ah, putting return around the if debug -thingy solved it
<flux>
but I'm not sure if that's satisfactory..
OChameau has joined #ocaml
l_a_m has joined #ocaml
l_a_m has quit [Client Quit]
l_a_m has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
<flux>
return (if debug ..; result) doesn't even compile
<flux>
and the indentation gets messed up, although it came with a patch to tuareg mode
cmeme has quit []
cmeme has joined #ocaml
Snark has joined #ocaml
<mfp>
flux: result <-- do_stuff; let result = f result in let () = if debug then print_endline "foo"; return result
<flux>
ah, yes
cmeme has quit []
<flux>
figured that by myself seconds ago, though :)
cmeme has joined #ocaml
<mfp>
oops let () = if debug then print_endline "ff" in
<mfp>
sorry for the noise then
<flux>
no worries
<flux>
you still figured it out before I did :)
<flux>
should just keep the irc on the screen all the times, I could save time! (or not)
hkBst has joined #ocaml
<flux>
after digging into pa_monad's documentation I'm starting to understand why it's so big (well, ~650 lines)
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
<qwr>
you are using monads in ocaml? ;)
<qwr>
crazy people...
cmeme has quit []
cmeme has joined #ocaml
<flux>
it's slightly better than dragging around a thread-local context object
<flux>
I'm just happy that I haven't yet needed to use another monad from within another
Yoric[DT] has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
ygrek has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
prince has quit [Client Quit]
jeremiah has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
petchema_ has quit [Remote closed the connection]
cmeme has quit []
RobertFischer has joined #ocaml
cmeme has joined #ocaml
petchema has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
LordMetroid has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
thelema has joined #ocaml
ygrek has quit [Remote closed the connection]
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
seafood has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
<RobertFischer>
Someone want to give me a sales pitch on Ocsigen?
<Smerdyakov>
I want to give you a sales pitch away from it, but the 2nd release of Laconic/Web isn't ready yet. :-)
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit [Connection reset by peer]
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
marmotine has joined #ocaml
<orbitz>
interesting
<orbitz>
LinkedIn supposedly does nto use any ORM but straight JDBC calls
<Smerdyakov>
Huh? Because I write lots of web applications.
<vixey>
ok
<Smerdyakov>
...as do a majority of programmers today, I think.
<orbitz>
i inerviewd at a company doing web stuff yesterday
<orbitz>
al lin Ruby though
<orbitz>
*cringe*
<orbitz>
Smerdyakov: your demo doesn't work :(
<orbitz>
CRUD one atleast
<Smerdyakov>
orbitz, your reading comprehension doesn't work. ;-)
cmeme has quit []
cmeme has joined #ocaml
<orbitz>
Smerdyakov: your use of <h1> doesn't work
<Smerdyakov>
orbitz, I don't know what you mean.
<orbitz>
just that there isn't much to draw ones attention to that fact
<Smerdyakov>
I'm not really concerned about potential users who don't read whole documents through carefully.
<flux>
smerdyakov, laconic is compiled, right? what does it compile into?
<flux>
(or via)
<Smerdyakov>
flux, the first release compiles to SML and C, and from there to native code. The second release will compile just via C.
<flux>
smerdyakov, just wondering, if compiling via SML would allow taking advantage of the existing SML libraries
<vixey>
How will you compile directly to C?
<flux>
why not C too, but that might be more difficult
<Smerdyakov>
I'm not concerned with taking advantage of anything of anything but C libraries in my current efforts.
<flux>
I suppose C-library support is more important
<Smerdyakov>
vixey, that's not a question with a short answer.
<Smerdyakov>
vixey, I expect there to be a good amount of publishable research along that path.
<flux>
smerdyakov, did you pick C due to interoperability reasons, or just because it's a decentish cross-platform assembler?
<vixey>
Smerdyakov: I am looking forward to it!
<Smerdyakov>
flux, the latter.
<Smerdyakov>
flux, maybe I should say "both," if your "interoperability" includes aspects like access to libpq.
<flux>
it does
cmeme has quit []
cmeme has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
<flux>
but, off to home
cmeme has quit []
cmeme has joined #ocaml
<Yoric[DT]>
hi
<RobertFischer>
Smerdyakov: I'm interested in Laconic. It sounds like the same kind of thing I've been looking for. There's a lot of stuff I do in Ruby/Rails and Groovy/Grails that really should have type checking.
<Yoric[DT]>
Smerdyakov and flux: if you're still interested, I've put together a short presentation of my static analysis project.
<Smerdyakov>
You can't do the stuff that Laconic does in Rails. :-)
<Smerdyakov>
Rails has ad-hoc code generation with no support for customization if you want to "reinsert" the generic stuff.
<RobertFischer>
Smerdyakov: As long as you can do all the stuff that Rails does in Laconic, Laconic will win. Of course, right now you're saying that your vaporware is better than their shipping software, so it needs a bit of proving out.
<orbitz>
RobertFischer: i interviewed at a place usign rails yesterday. i dont' think they'll want me hah
<RobertFischer>
Smerdyakov: Slick. Some of your accusations against Rails are a little off -- or, rather, they're very dated. Stuff like make_resourceful (http://mr.hamptoncatlin.com/) reduces boilerplate to practically 0. But the argument type checking for forms is exactly the kind of thing I want. Have you considered lenses for types instead of having to code in decode methods?
<RobertFischer>
orbitz: I'm actually maintaining a Rails application right now. And I write a lot of Grails, too. Those two frameworks really aren't bad -- probably the #1 and #2 slots for web development at this point. The ordering depends on the nature of your application and the kind of stunts you want to pull.
<orbitz>
the interview questsion were weird. the first one was how to implement a meeting room booking system (I think i failed that because I was given such little information on what they wanted) and the second question was to implement foldl in python (but the person caleld it inject?) which was reallyt rivial
<RobertFischer>
orbitz: Yeah, "inject" is the Ruby/Groovy name for fold. I don't get why.
<orbitz>
is there are 'right' version of inject?
<RobertFischer>
I don't understand the question.
<orbitz>
there are left and right folds
<orbitz>
is inject only left?
cmeme has quit []
cmeme has joined #ocaml
<RobertFischer>
Yeah, there's no concept of a right fold in Ruby/Groovy, AFAIK.
<RobertFischer>
There's definitely a market for a statically typed framework to come in and build applications that "just work". The trick is that the barrier to entry is pretty friggin' high, given the ease of development in Rails/Grails.
<orbitz>
have you gotten a chance to play wtih ocsigen?
<RobertFischer>
Not yet. I've looked at it, and I'm trying to decide if it's worth my time. The presentation I watched on it put me off a bit, though, because they said the project was geared towards research, not towards building a production code.
<RobertFischer>
I'm not interested in research.
<RobertFischer>
I'm interested in writing code that people will pay me for, and doing so in a way that makes me look like an invaluable technical badass.
<orbitz>
good idea
<orbitz>
RobertFischer: you can do it a lot easier though
<orbitz>
just buy a wallet that sas "badmotherfucker" on it
cmeme has quit []
cmeme has joined #ocaml
<orbitz>
what happens in ocaml if the memory usage is maxed out?
<RobertFischer>
orbitz: Give it a shot and let me know.
bluestorm has joined #ocaml
<Smerdyakov>
RobertFischer, why would the concept of lenses be helpful for the primitive data types I'm dealing with?
Snark has quit ["Ex-Chat"]
<RobertFischer>
orbitz: re: LinkedIn not using ORM -- doesn't surprise me. All the ORM technologies that I've played with are great for smaller queries/apps, but end up quickly getting to a point where they get in the way of optimization. And if you keep your data logic in your database (where it belongs), the ORM is actually counterproductive, since the database will change out from under it.
cmeme has quit []
cmeme has joined #ocaml
<Smerdyakov>
I don't see any use for ORM.
struk_atwork has joined #ocaml
<Smerdyakov>
Direct SQL integration always seems to work better.,
<RobertFischer>
Smerdyakov: For small apps which don't need to scale past a certain point, it's great.
<Smerdyakov>
I don't agree.
<Smerdyakov>
It's easier to program with SQL than with objects.
<RobertFischer>
Smerdyakov: Your average in-the-trench developer would disagree.
<Smerdyakov>
I don't care about the average developer.
<RobertFischer>
Most companies do, because they're filled with them. So there's definite "a use" for ORM -- namely, making life easier for the average development.
<RobertFischer>
Smerdyakov: Instead of having a "decode" attribute attached to the display, you could tag the type with a lens. Then you could use the variable in multiple places without having to repeat the decode assertion.
<Smerdyakov>
No use in any context that I care about.
<RobertFischer>
And the lenses would enable you to use larger types just as easilly.
<RobertFischer>
Smerdyakov: Granted.
<RobertFischer>
s/assertion/attribute/ a couple of lines up.
<orbitz>
is it likely somethign liek laconic would eb adopted if it does not provide some weak ORM support for simpler applications?
<RobertFischer>
Writing unit tests while IRCing. Not for the faint of heart.
<Smerdyakov>
I think I ended up deprecating "decode" attributes in my mind, anyway.
<Smerdyakov>
orbitz, I'm going to use it. I don't care about too much beyond that.
<orbitz>
oh
cmeme has quit []
<Smerdyakov>
If people with PhDs in programming languages are enthusiastic about it fairly uniformly, then that's about my 100% success level.
cmeme has joined #ocaml
<RobertFischer>
orbitz: I'm trying to figure out something better than ORM for functional programming which still gets at the essence of abstracting the data store. ORM is terribly broke, and doubly so when you get into a functional context.
<orbitz>
mfp said he uses some sort of SQL-in-OCaml solution so he can do foo = SELECT ... FROM ....;;
<struk_atwork>
orbitz, I'm on mfp's side...want syntax /keyword extensions
<RobertFischer>
orbitz: PGOCaml is like that.
<Smerdyakov>
I don't even bother thinking about what you can do in OCaml or Haskell.
<Smerdyakov>
The type systems are so useless for doing this right.
<struk_atwork>
Smerdyakov, then what?
<Smerdyakov>
struk_atwork, follow above conversation. I'm developing a new programming language.
<Smerdyakov>
Today I'm going to start figuring out how to incorporate the start-up company that will be based on it.
<struk_atwork>
Smerdyakov, ambitious. I'd love to see what you come up with. and where is this start-up company located?
<Smerdyakov>
The start-up company is located in my head. It will be me sitting in my apartment for a while.
<Smerdyakov>
When/if I hire people, it will be around Cambridge, MA.
<RobertFischer>
Smerdyakov: If you get traction with Laconic, let me know. My ends are a bit different than yours (people with PhDs in programming languages can bite me -- I want $$$), but it looks like we're hunting for the same means.
cmeme has quit []
cmeme has joined #ocaml
<RobertFischer>
And I'll be out on the east coast by the end of the summer.
<Smerdyakov>
RobertFischer, I'm pretty confident my path leads to more than just three dollar signs, but the details are secret for now. ;-)
<struk_atwork>
Smerdyakov, what can you reveal, exactly?
<Smerdyakov>
struk_atwork, I'd rather not reveal anything, except that my catch phrase is "type theory for end users."
cmeme has quit []
<orbitz>
you'll have to turn 'type theory' into an office buzzword for that to be a money generating catch phrase
cmeme has joined #ocaml
<RobertFischer>
orbitz: We're already getting there, at least in the trenches. I've done a number of presentations (including one upcoming on OCaml) because people are interested in alternative type solutions.
<orbitz>
that's good
<orbitz>
in the areas i've been in professionally, peopel equate a better type system to going from Pythons -> Java though
<struk_atwork>
Smerdyakov, fair enough! I hope to use your language someday
<Smerdyakov>
This is a catch phrase for attracting collaborators, not customers.
munga has joined #ocaml
<struk_atwork>
Smerdyakov, you move to cambridge already too?
<Smerdyakov>
struk_atwork, yes.
<struk_atwork>
Smerdyakov, cool. you're now surrounded by academia :)
<Yoric[DT]>
:)
cmeme has quit []
cmeme has joined #ocaml
<RobertFischer>
orbitz: Tell me about it. I've spent a lot of time trying to convince people that "static typing" does not equate to Java's type system.
<RobertFischer>
Scala and F# have both done a lot to wake people up, though.
<RobertFischer>
vixey: It's got static typing, but that doesn't mean it's type system is the be all and end all of static typing.
<Yoric[DT]>
It's hybrid static/dynamic.
<Yoric[DT]>
null, putting things in arrays (not reading things from array, surprisingly) and class cast are the three examples I can think of of dynamic typing in Java
<RobertFischer>
Collections, even given objects (thanks to type erasure), are circumventing the type system.
<orbitz>
generics have to be the most annoying syntax ever
<Yoric[DT]>
I wouldn't call that circumventing (except in a few cases).
cmeme has quit []
cmeme has joined #ocaml
<RobertFischer>
Why does the type system consider everything in the collection to be "Object"?
<struk_atwork>
orbitz, I don't find syntax that bad, but I also feel that the generic types aren't inferred easily enough
<RobertFischer>
struk_atwork: Declare a Map of Lists of Sets of Strings and tell me that the syntax isn't bad.
<orbitz>
struk_atwork: i mean it' really annouing to have ot do Vector<some logn complex thing> foo = new Vector<the same logn compelx thign again>()
<orbitz>
hideous
<RobertFischer>
BTW, for those who cared about the old ORM conversation, I've been thinking about a nice functional way to do something like Ambition -- http://ambition.rubyforge.org/
<RobertFischer>
orbitz: Don't use Vectors anymore. They're evil. They've been evil since Java2.
<RobertFischer>
orbitz: Use ArrayLists. And if you want to synchronize them, use Collections.synchronizedList
<struk_atwork>
orbitz, but if you made a special vector class of foos, you might call it FooVector, which is really not that syntactically different than Vector<Foo>
<orbitz>
RobertFischer: ok but that wasn' tmy point!
<orbitz>
struk_atwork: does Java have anythign equivalent ot tyepdef or functors?
<RobertFischer>
struk_atwork: And if you did that, you're also having to create a specialized class to wrap and hide the exact same functionality generics were intended to provide.
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
seafood has quit []
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
shortcircuit has quit [Remote closed the connection]
cmeme has quit [Connection reset by peer]
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
<struk_atwork>
orbitz: I don't what facility java has that is similar to typedef
<struk_atwork>
RobertFischer, agreed
cmeme has quit []
cmeme has joined #ocaml
<Yoric[DT]>
I don't think so.
pango has quit [Remote closed the connection]
cmeme has quit [Read error: 104 (Connection reset by peer)]
cmeme has joined #ocaml
mbishop_ has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
pango has joined #ocaml
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
mbishop has quit [Read error: 113 (No route to host)]
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit [Connection reset by peer]
cmeme has joined #ocaml
<hcarty>
Are there any pluses/minuses to using an identity function like (let id x = x) vs (external id : 'a -> 'a = "%identity")?
tomh has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
Linktim has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
<Yoric[DT]>
I've found out that %identity is a bit faster.
<Yoric[DT]>
But not currifiable.
<hcarty>
Yoric[DT]: Thanks. Does not being currifiable matter for an identity function?
<Yoric[DT]>
Well, when your function looks a bit more complex than identity but turns out to be identity, it might.
<Yoric[DT]>
let f g x = g x
<Yoric[DT]>
f : ('a -> 'b) -> 'a -> 'b
<Yoric[DT]>
it's identity
<hcarty>
Ok
<Yoric[DT]>
but it can't be %identity
cmeme has quit []
cmeme has joined #ocaml
LordMetroid has quit [Connection timed out]
cmeme has quit []
cmeme has joined #ocaml
LordMetroid has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
jonafan has quit [Read error: 104 (Connection reset by peer)]
jonafan has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
jonafan has quit [Read error: 104 (Connection reset by peer)]
cmeme has quit []
cmeme has joined #ocaml
jonafan has joined #ocaml
jonafan has left #ocaml []
Linktim has quit [Read error: 104 (Connection reset by peer)]
jonafan has joined #ocaml
cmeme has quit []
Linktim has joined #ocaml
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
<orbitz>
i wonder what is wron gwith cmeme
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
OChameau has quit ["Leaving"]
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit [Read error: 104 (Connection reset by peer)]
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
orbitz has quit [Remote closed the connection]
orbitz has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
ertai has quit [Remote closed the connection]
ertai has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
mbishop_ is now known as mbishop
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
<jonafan>
hello cmeme
<orbitz>
hah
cmeme has quit []
cmeme has joined #ocaml
<jonafan>
!!!!!
cmeme has quit []
cmeme has joined #ocaml
<Yoric[DT]>
?
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
bohanlon has quit ["leaving"]
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
<jonafan>
how do i ignore cmeme
cmeme has quit []
cmeme has joined #ocaml
* jonafan
bans cmeme from the internet
<orbitz>
depends on your compiler
<orbitz>
err
<orbitz>
irc client
<struk_atwork>
haha
<struk_atwork>
yeah you can also just ignore channel events
<jonafan>
xchat
<orbitz>
something like /ignore -ALL cmeme for issi it hink
cmeme has quit [Read error: 104 (Connection reset by peer)]
cmeme has joined #ocaml
<palomer>
SORRY
<palomer>
YOU TOO
cmeme has quit []
cmeme has joined #ocaml
RobertFischer has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
<Yoric[DT]>
Ah...
<Yoric[DT]>
It's more readable with an ignore list.
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
Linktim_ has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
bla has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
vpalle has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
<jonafan>
is there some really awesome way to find all the lines in a set that intersect other lines in the set?
<orbitz>
Set.intersect?
<jonafan>
o dpm
<jonafan>
i don't think so
<jonafan>
that's set intersection. i mean intersect in a geometric set
<jonafan>
er
<jonafan>
geometric sense
netx has joined #ocaml
postalchris has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
vpalle has quit [Remote closed the connection]
cmeme has quit []
cmeme has joined #ocaml
<struk_atwork>
jonafan: set theory can define geometric intersection, but it requires geometry to build the relationships first
postalchris has quit [Client Quit]
postalchris has joined #ocaml
<jonafan>
buh?
<orbitz>
hub!
<jonafan>
can i beat n^2?
cmeme has quit []
cmeme has joined #ocaml
Linktim_ has quit [Remote closed the connection]
cmeme has quit []
cmeme has joined #ocaml
<vixey>
you can probably beat O(n^2) average case if you use space partitioning
<vixey>
depends on the size of the lines wrt the size of the set of points
<vixey>
if the lines are usually smaller, then hashing on a space partition is a good idea
cmeme has quit []
cmeme has joined #ocaml
Snrrrub has quit []
<jonafan>
yeah, they are usually pretty small
<vixey>
well if they are on average length l then split the space into buckets of size roughly l x l and go through them all O(n) consing onto every bucket each line touches, then loop through each bucket O(k) and test if any things in that bucket only intersect
<vixey>
it's a common technique in e.g. games, so it's pretty fast
<jonafan>
cool
<vixey>
(oh the last step is O(1) since usually lines are in different buckets, O(n+k+1) = O(n))