<komar_>
(the better way for learning camlp4 is reading sources)
<julm>
Camlp4/Struct/Lexer.mll has the patterns for LIDENT or FLOAT, I'm looking forward to see if we can use our own patterns without modifing Lexer.mll
maskd has quit ["leaving"]
maskd- is now known as maskd
<thelema>
I think you have to change the lexer, as when identifiers are lexed, they get categorized as lident or uident
<thelema>
and you'd have to handle both in your parser if you wanted to handle both.
<julm>
yep, you can use another lexer with Camlp4.PreCast.MakeGram
<julm>
but how can we extend Lexer.mll without copy/pasting it?
<thelema>
it's a module, you can include it in your new lexer module, no?
<julm>
and how can we extend Lexer.mll's tokens since it uses Sig.camlp4_token which is a fixed sum type?
<thelema>
type ext_token = Old of Sig.camlp4_token | ...
<thelema>
more boxing
<thelema>
(just an idea - I've never done this before)
<julm>
could be possible if we have a way to call a lexer into another lexer, which is likely
<thelema>
nice - it looks like the work on functorizing camlp4 does someone some good
<julm>
komar_: well, ulexer.ml doesn't seem to reuse Camlp4's Lexer.mll, but you may be able to do it for your own lexer if you're more used to ocamllex than me.
<komar_>
Oh, thank you men.
ccasin has joined #ocaml
jeddhaberstro has joined #ocaml
Associat0r has quit []
seafood has quit []
yziquel has quit [Read error: 110 (Connection timed out)]
mattam has quit [hubbard.freenode.net irc.freenode.net]
Demitar has quit [hubbard.freenode.net irc.freenode.net]
mattam has joined #ocaml
Demitar has joined #ocaml
ccasin has quit ["Leaving"]
jeddhaberstro has quit []
seafood has joined #ocaml
maskd has quit [Read error: 113 (No route to host)]
alexyk has quit []
Lomono_ has quit ["Don't even think about saying Candlejack or else you wi"]
Camarade_Tux has joined #ocaml
Lomono has joined #ocaml
* julm
is away: "Terminator trees, genetically engineered never to flower, could ensure a silent spring in the forests of the future" -- London Daily Telegraph, July 1999
_zack has joined #ocaml
jeanbon has joined #ocaml
_zack has quit ["Leaving."]
seafood has quit [Read error: 110 (Connection timed out)]
jeanbon has quit ["EOF"]
schmx has joined #ocaml
BiDOrD has quit [Read error: 60 (Operation timed out)]
ikaros has joined #ocaml
BiDOrD has joined #ocaml
_zack has joined #ocaml
_zack has quit ["Leaving."]
julm has quit [Read error: 110 (Connection timed out)]
ikaros_ has joined #ocaml
ikaros has quit [Read error: 104 (Connection reset by peer)]
julm has joined #ocaml
Associat0r has joined #ocaml
Jedai has quit [Read error: 110 (Connection timed out)]
Jedai has joined #ocaml
youscef has joined #ocaml
ulfdoz has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
authentic has quit [Read error: 110 (Connection timed out)]
ChristopheT has joined #ocaml
maskd has joined #ocaml
ChristopheT has left #ocaml []
sporkmonger_ has quit []
Associat0r has quit []
spez has joined #ocaml
schme has joined #ocaml
schme has quit ["Lost terminal"]
schme has joined #ocaml
lde has joined #ocaml
spez has quit [Read error: 104 (Connection reset by peer)]
ikaros_ has quit [Read error: 110 (Connection timed out)]
ched_ has quit [Read error: 101 (Network is unreachable)]
ccasin has joined #ocaml
authentic has joined #ocaml
hkBst has joined #ocaml
Associat0r has joined #ocaml
<thelema>
is anyone here interested in starting an OCaml evangelism team?
<Camarade_Tux>
hmm, what do you mean by "evangelism" and by "team" ?
<Smerdyakov>
Camarade_Tux, don't forget: question marks don't get spaces before them in English!
<thelema>
well, the thing that got me thinking about this was a conference organizer talkin about how he didn't have to arrange speakers on jquery because their evangelism team took care of that.
<Camarade_Tux>
Smerdyakov, I know but it's my hands' fault ! (that space was on purpose ;) )
<Smerdyakov>
thelema, which conferences would have non-OCamlers looking for speakers about OCaml?
<thelema>
Smerdyakov: it's exactly that kind of thinking that keeps us outside the mainstream
<thelema>
maybe think about it this way: which conferences would benefit from someone presenting on OCaml?
<Smerdyakov>
thelema, OK. I genuinely don't know the answer. Do _you_ have an answer?
<thelema>
no, I don't. I end up organizing conferences in a totally different sphere, and don't go to computer conferences
<Smerdyakov>
So what leads you to believe an evangelism team would be worthwhile?
<Smerdyakov>
Do you have any evidence that that presentation was worth the effort?
<thelema>
no
<thelema>
but I do think that ocaml could do with more outreach
<Camarade_Tux>
it probably had almost no influence but it's like a single ad somewhere, it has no influence either
<thelema>
yup.
<thelema>
I also find a lot of value in the reasons given by the speaker on "what rubyers can contribute to the ocaml community"
<Smerdyakov>
I have deep doubts about the chance that many members of general Ruby audiences will want to use OCaml.
<thelema>
Many rubyists won't want to use OCaml. Many perlists won't want to use OCaml. Many .net-dudes won't want to use OCaml. Many Java-drinkers won't want to use OCaml. But some will, and the community can benefit.
<thelema>
Don't forget there's conferences that aren't PL themed... postgresql has great OCaml bindings - they have conferences, no?
<thelema>
oscigen would likely be interesting to some web designers
<Smerdyakov>
I think people who would like OCaml tend to learn about it already.
<Smerdyakov>
The language is pretty visible in today's savvy-hacker community.
<flux>
smerdyakov, I believe there is a group of people that at times looks for other tools in their application domain, not just for other tools in written in their language
<Smerdyakov>
flux, yes, and those who would use an OCaml solution are already aware of the language, for the most part.
<flux>
smerdyakov, well, I'm not sure. if that would be true, I would have been aware of ocaml possibly 10 years ago. but I wasn't :)
<Smerdyakov>
flux, I'm not making a statement about arbitrary times in the past.
<thelema>
flux: I think Smerdyakov would say you weren't in the "savvy-hacker" community
<flux>
(well, of course it doesn't say it doesn't hold for "most part", but this discussion is hand waving - for the most part :))
<Smerdyakov>
thelema, no, see last line.
<Smerdyakov>
OCaml is hot today. It's one of the top 10 hottest programming languages among the real "hacker" crowd, I think.
<Camarade_Tux>
I know several people who have heard about ocaml and think it would be nice to code in it, but don't and evangelism could be just enought to make them actually try ocaml
<Smerdyakov>
Camarade_Tux, people who think a tool might be useful but choose to ignore it are unlikely to have the fortitude to learn and use OCaml.
<thelema>
Can we all agree that ocaml isn't just a niche language for ... whatever its niche would be?
<Smerdyakov>
thelema, yes, and you've now met your preaching-to-the-choir quota for the day. ;)
<flux>
I believe one big reason why people don't try less-mainstream tools is that they think "well, I doubt it can be useful for me, afte rall, tools in my domain are pretty sophisticated already"
<Smerdyakov>
thelema, on the other hand, I might answer "no," depending on how we define "niche."
<flux>
advocacy can help there
<thelema>
Smerdyakov :)
<Smerdyakov>
thelema, I think OCaml is a general-purpose language that has a steep learning curve.
<Smerdyakov>
thelema, so it works in many situations, but most programmers won't ever be productive with it.
<thelema>
Smerdyakov: really? What's a language with a shallow learning curve?
<Smerdyakov>
thelema, PHP, Ruby, Python, ...
<thelema>
because you can do useful things with them without learning much of the language?
<Smerdyakov>
My notion of "steepness" is the average of how hard the language is to learn, considering all people who call themselves programmers.
<Camarade_Tux>
hmm, ruby operators and python indentation-based syntax are quite annoying for beginners
<thelema>
and I deny the concept of "how hard the language is to learn" -- people don't learn an entire language.
<flux>
I'm off for a walk, have a good talk ->
<Smerdyakov>
thelema, most people find the basic control idioms of imperative languages easier to apply.
<thelema>
and ocaml allows people to use them.
<Smerdyakov>
Most people also find static type systems confusing.
<Smerdyakov>
I'm pretty close to convinced that dynamic typing and imperative/OO are the right settings of the language design knobs for The Masses.
<thelema>
I disagree - static type systems (can) make for great compiler error messages. It's a shame we don't have that in ocaml.
<Smerdyakov>
You don't appreciate how abnormally talented at programming you are. Most programmers prefer to find bugs by testing; they find it easier.
<thelema>
they think it's easier.
<Smerdyakov>
I think it really is easier for a majority of them.
<thelema>
the ruby community does TDD more than anyone else - they can be convinced of the usefulness of static typing exactly because they understand the weaknesses in TDD
<Camarade_Tux>
I'm not sure it's a matter of being or looking easier, mostly a matter of being lazy and not willing to think about what the compilers tells you
<Smerdyakov>
Camarade_Tux, again, you, too, don't appreciate how high on the Programmer IQ bell curve you fall. I think the level of abstract thinking needed to work with fancy types is beyond the comfort zones of most programmers.
* thelema
thinks the compiler can go above and beyond just compiling correct code and offer great help to people going off the track.
<maxote>
what means TDD?
<thelema>
most programmers work with fancy types all the time - it's just that their compilers don't check that they're doing it right.
<thelema>
TDD = Test Driven Development
<Smerdyakov>
thelema, I did mean to imply static typing.
<Smerdyakov>
(BTW, it's hilarious that I'm the one playing the role of the populist in this discussion. :D)
<thelema>
TDD is one (kinda extreme) methodology of using testing during development
<thelema>
yes, even in the other major lands of static typing (java, C#), the types the compiler uses only barely capture how values are being used.
<Camarade_Tux>
Smerdyakov, you usually don't start with terribly complicated types and among the people I know who could try ocaml, there are some very talented developpers (and bad ones too)
<thelema>
I agree that the masses won't write ocaml libraries with incredibly complex internals to solve difficult problems.
<Camarade_Tux>
and a C++ template look worse than any ocaml type
<Smerdyakov>
Camarade_Tux, there is a mysterious X factor that determines who will like using statically-typed FP. It's hard to predict who has it.
<thelema>
But I think the masses are more than capable of using such a library, presented to them.
<Smerdyakov>
And now I get to provide some assurance that I'm not too much of a popular, by repeating my usual position: Most people who are programming today shouldn't be, in anything but very restricted DSLs.
<thelema>
and that's where they'll start - that's where everyone starts to get something done.
<Camarade_Tux>
Smerdyakov, right, but I think people who experienced type-unsafety are more likely to enjoy it :)
<Smerdyakov>
The people who should be programming are all equipped to learn OCaml and will tend to explore it on their own.
* thelema
used to hate static typing
<thelema>
but I only had languages like Ada, Java, C, etc. as examples
alexyk has joined #ocaml
<thelema>
if you like, divide programmers into layers: "capable of writing hello-world", "capable of using a simple library", "capable of working around bugs in libraries", "capable of developing libraries", ...
<thelema>
You're right that the people at the bottom will need almost none of the power of ocaml
<thelema>
but I suggest that OCaml can provide them what they need, while allowing others to advance
<thelema>
OCaml makes a great DSL, no?
<Smerdyakov>
I strongly disagree.
<Smerdyakov>
The type system is more or less a toy compared to what we know how to do today.
<thelema>
and?
<Smerdyakov>
And the good thing about DSLs is that you can enforce rich domain-specific properties.
<thelema>
isn't it simple enough to do what you need to do while being understandable?
<Smerdyakov>
OCaml also lacks the features needed to implement expressive enough metaprogramming.
<Smerdyakov>
(To save enough effort for the people outside the elite)
_zack has joined #ocaml
<Smerdyakov>
I don't think OCaml has much of a future among informed programmers, for those reasons.
<thelema>
ocaml does miss compiler pragmas in the source code
<thelema>
which makes compilation difficult
<Smerdyakov>
Can you be more specific about what problem you are pointing out?
<thelema>
perl, python and ruby have what I call compiler pragmas - instructions to the compiler that change how the rest of the source file is parsed.
<thelema>
It's a bit more than defining functions, but it's internal to the source file
<thelema>
maybe what I really want is this: Devel::Declare can install subroutines called declarators which locally take over Perl's parser, allowing the creation of new syntax.
Ched has joined #ocaml
<Camarade_Tux>
hmmm, when interfacing C, a char takes a much space as an int ? :o
<thelema>
yes.
<thelema>
everything's word sized. otherwise the GC would have problems.
<Camarade_Tux>
right
<Camarade_Tux>
it's just a bit surprising, especially on 64bit
<mrvn>
Camarade_Tux: it takes one register. :)
<Camarade_Tux>
my previous registers ='(
<Camarade_Tux>
next, how to automatically find how to handle t*, t**, t*** from the given type t?
<Camarade_Tux>
(yeah, t***, it's a real example)
<mrvn>
It could. But what if the conversion breaks the package and I upload ia32-apt-get 20 which fixes the problem. How would people get the fixed package installed? By adding ~19 (or then ~20) the package version changes and the package gets reinstalled and fixed.
<thelema>
51% of use is selecting by id. another 13% is by class
<thelema>
about another 10 % are tag or tag.class
<thelema>
and then you hit the tail
spez has joined #ocaml
spez has quit [Client Quit]
<thelema>
#attrib "href" would be late enough binding to do that, yes. but don't forget that $(foo) can return a list of elements, or even no element.
<thelema>
jquery basically handles this monadically.
_zack has quit ["Leaving."]
<thelema>
and once you have that infrastructure, the types don't matter much.
<thelema>
to the user, at least
schme has quit ["Lost terminal"]
schme has joined #ocaml
slash_ has joined #ocaml
tar_ has joined #ocaml
schme has quit ["Lost terminal"]
* julm
is back (gone 07:45:51)
<flux>
julm, btw, public away/gone-messages are considered bad netiquette, and their primary use is in small channels where everyone knows each other (ie. someone might actually care a person has gone/arrived)
schme has joined #ocaml
* thelema
used to use nick changes (thelema/thelema_) to indicate presence
<flux>
pft, same thing :)
<thelema>
but even that is probably pushing it - there's an away bit for a reason.
<julm>
flux: ok
<thelema>
nick changes aren't the same - they're metadata, not in-channel data
* julm
is away: nothing
<tar_>
haha
<thelema>
julm: is that what your client does on /away?