toomuchtvrotsurb has quit [Remote host closed the connection]
tmtwd has quit [Ping timeout: 244 seconds]
SomeDamnBody has joined #ocaml
<SomeDamnBody>
Can anybody tell me specifics about OCaml pervasive's List functions- in particular about complexity?
<SomeDamnBody>
The official documentation doesn't seem to mention what does or doesn't compute a completely new list. In particular, append does
<SomeDamnBody>
but does that mean that recursive functions that append on append functionality do as well?
<SomeDamnBody>
in that case, wouldn't List.map have something like n^2 space/time commplexity
<SomeDamnBody>
?
<Drup>
1) map doesn't use append
<Drup>
2) append l1 l2 is O(len(l1))
<Drup>
Not sure how you could come up with a n^2 List.map, even when trying very hard
jao has quit [Ping timeout: 244 seconds]
<SomeDamnBody>
Drup, well, supposing append produces a new, separate list that *didn't* edit the links at the end
<SomeDamnBody>
you would be creating a new list that was linear in size with O(l1+l2)
<SomeDamnBody>
so, supposing you apply this logic to list.map... you see my thought?
rossberg has quit [Ping timeout: 246 seconds]
<Drup>
Not really, no.
<SomeDamnBody>
I didn't say precisely append, I said append functionality. Thank you for the clarification, :)
<SomeDamnBody>
ok, let me illustrate
<SomeDamnBody>
So, in a hypothetical scenario in which you have List.map using an append that eats O(l1+l2) space per append operation
<SomeDamnBody>
you have append applied between each and every individual newly created list element from (f elem) :: tail
<SomeDamnBody>
right?
<SomeDamnBody>
That was just hypothetical
<SomeDamnBody>
in any case, I agree with you, I wasn't certain, so I asked. Boy, I really wish someone would annotate the library documentation with complexity information
<Drup>
So, in your hypothetical scenario, you have an badly coded append and a badly coded map ? :D
<SomeDamnBody>
I dug before I asked. And hey-try not to discount me so hard. It wasn't until just yesterday that I eliminated a bottleneck from C++'s std::list.size(), which literally counts the fucking list every time instead of storing it in a class member size_t
<SomeDamnBody>
yes, I wasn't certain
<SomeDamnBody>
right now, I'm dealing with a library that has balls to the wall ass poor complexity in both space and time
<SomeDamnBody>
and I'm reading over the code finding ass tons of optimization opportunities
<Drup>
(List.length does count the list every time :D)
<SomeDamnBody>
YUCK
<SomeDamnBody>
wtf is up with list implementations!
<Drup>
It wouldn't make sense to store it anyway
<SomeDamnBody>
... *sigh
<SomeDamnBody>
:(
<Drup>
storing it would mean either a header field for each list (meh) or an additional field in each cell (outch)
<SomeDamnBody>
in any case, I'm just perusing this library annotating all the code with forward directions I'm going to take. It's hard to know where to start because so much of it was written assuming the input would be tiny. They must have wrote this code in a fucking hurry. They throw exceptions away like no other and toss in assert false everywhere
<SomeDamnBody>
not in each cell
<SomeDamnBody>
just for the list instance
<Drup>
that doesn't work in ocaml, there is no list instance.
<SomeDamnBody>
so, I have a list, l1, of some number of elements. Store the head, the tail, and the size. Seems sensible to me.
<SomeDamnBody>
List.t is the type representative of list, no?
<Drup>
list = cell, there is no distinction
<Drup>
you should just read list.ml ...
<Drup>
It's really simple ...
ygrek has joined #ocaml
magistr has quit [Remote host closed the connection]
magistr has joined #ocaml
<SomeDamnBody>
I was just reading it right after posting my question here
<SomeDamnBody>
but I didn't pick up that list = cell. I thought that List.t was a type that contained a reference and whatever instance that the polymorphic type resolved to
rossberg has joined #ocaml
<Drup>
yes
<SomeDamnBody>
In any case, it doesn't matter, because at the implementation, you can add some add some additional types not exposed at the module level, like type s = uint or whatever, and every ... oh hold on, you would have to distinguish elements from the head
<Drup>
and that's a cell. :]
<SomeDamnBody>
I see what you're saying now
magistr has quit [Remote host closed the connection]
<SomeDamnBody>
man I really like talking to you Drup :)
<Drup>
thanks, I guess ? :D
<SomeDamnBody>
seems like almost all of the friends I make over the net are phd's, ha
<SomeDamnBody>
I have to wait to finish my scholarship obligations to pursue my phd :/
magistr has joined #ocaml
SomeDamnBody has quit [Ping timeout: 250 seconds]
ygrek has quit [Ping timeout: 260 seconds]
tmtwd has joined #ocaml
Jaood has joined #ocaml
AltGr has left #ocaml [#ocaml]
AltGr has joined #ocaml
Jaood has quit [Remote host closed the connection]
darkf has joined #ocaml
<Enjolras>
hi
<Enjolras>
for some reason, with merlin, the colored background which appears with :MelrinTypeOf doesn't disappear
<Enjolras>
it doesn't happen with only merlin plugin, so i guess it's one of my plugin
<Enjolras>
does anyone knows where it might comes from ?
MrScout has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
ril has joined #ocaml
<ril>
hello channel!
mcc has joined #ocaml
<ril>
~
<ril>
hi mcc ^^
<mcc>
ril: hello!
<ril>
so I spent a little while playing with the latest buzzy node framework, and it was disappointing in new & exciting ways
<mcc>
heh
<ril>
a bunch of coroutines all lined up in a shared `this` context
<ril>
it's a nice way of colocating resource acquisition and cleanup code, and not really conceptually worse than a clojure atom
<ril>
but the fact that it can't be statically typed in a meaningful way bothers me
<def`>
Enjolras: no idea what's going on. do you have a lot of plugins?
<mcc>
ril, maybe you should just ask your question about app servers :)
<ril>
um, "how do people who like strongly typed pure functions make JSON API servers that talk to SQL databases"
<Enjolras>
def`: ~10
<Enjolras>
def`: btw, if you would write somewhere that to use lwt ppx you have to remove EXT lwt because it conflicts, it would help. Had to search a bit before finding how to make it work
<Enjolras>
could*
rossberg has quit [Ping timeout: 246 seconds]
govg has quit [Ping timeout: 250 seconds]
tmtwd has quit [Read error: Connection reset by peer]
malc_ has quit [Quit: leaving]
MercurialAlchemi has joined #ocaml
rossberg has joined #ocaml
<Enjolras>
ril: that's an interesting question. You can use macaque to dynamically construct typed SQL queries, but to be honest, i find it hard to use
ril is now known as ril[away]
Bhavya has joined #ocaml
ril[away] is now known as ril
MercurialAlchemi has quit [Ping timeout: 250 seconds]
MrScout has quit [Ping timeout: 244 seconds]
<def`>
Enjolras: what's happening when you do that?
<mcc>
enjolras: i was talking to ril on twitter a bit ago– i think what they were really looking for is , if they wanted to run a basic app server with OCaml, what would be the framework you'd hang that off of?
<mcc>
i seem to remember Mirage does these sorts of things!
<mcc>
? not !
<Enjolras>
def`: when i do what ? EXT lwt while using ppx lwt ? Syntastic prints syntax errors at lwt ppx expressions
<Enjolras>
mcc: i don't have enough experience to recommand anything :)
* mcc
nods
ygrek has joined #ocaml
<def`>
Enjolras: good to know, thanks
psy_ has quit [Ping timeout: 264 seconds]
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
SomeDamnBody has joined #ocaml
psy_ has joined #ocaml
<Enjolras>
def`: also, you should add for ocp-indent-vim that if it is used in combination with ringberg/ocaml-vim, the order matters. ocp-indent-vim should be loaded before it
<Enjolras>
I spent 15minutes at work to figure that out
ygrek has quit [Ping timeout: 244 seconds]
MrScout has joined #ocaml
ygrek has joined #ocaml
xificurC has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
native_killer has joined #ocaml
obadz has quit [Ping timeout: 240 seconds]
obadz has joined #ocaml
ygrek has joined #ocaml
shinnya has quit [Ping timeout: 255 seconds]
AlexRussia has joined #ocaml
IntuitiveLeap has joined #ocaml
reynir1 is now known as reynir
oscar_toro has joined #ocaml
IntuitiveLeap has quit []
Simn has joined #ocaml
Simn has quit [Read error: Connection reset by peer]
tokik has quit [Quit: leaving]
tokik has joined #ocaml
grouzen has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
<SomeDamnBody>
Suppose I have a type declaration, type _ xyz = | p xyz | q xyz
<SomeDamnBody>
what does this type declaration say? What does _ mean in the context of a type declaration?
<Enjolras>
it's just an anonymous type variable
<Enjolras>
it's like doing type 'a xyz
<Enjolras>
I didn't know that was working :)
ygrek has joined #ocaml
<SomeDamnBody>
... what a silly way to write something you're not going to use. why not just 'a? seems like it would only contribute to brittleness
<SomeDamnBody>
later down the road. thakns
<Enjolras>
yeah, i'm not convinced about the usefulness of this either
<flux>
it can be useful if the constructors are not exposed, in contect of phantom types
<flux>
somedamnbody, on the other hand, if you're not going to use it, why give it a name?-)
<SomeDamnBody>
I'm not control of it
<SomeDamnBody>
I was just wondering why in general
<flux>
in general it's not a rare practice to not name things you're not going to use..
ely-se has joined #ocaml
ril is now known as ril[away]
struktured has quit [Ping timeout: 260 seconds]
ril[away] is now known as ril
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
struktured has joined #ocaml
oscar_toro has quit [Ping timeout: 265 seconds]
SomeDamnBody has quit [Ping timeout: 264 seconds]
BitPuffin|osx has quit [Ping timeout: 246 seconds]
siddharthv_away is now known as siddharthv
mcc has quit [Quit: This computer has gone to sleep]
ely-se has quit [Quit: leaving]
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ril has joined #ocaml
MrScout has quit [Ping timeout: 246 seconds]
ely-se has joined #ocaml
grouzen has quit [Quit: Lost terminal]
kushal has joined #ocaml
kushal has quit [Remote host closed the connection]
kushal has joined #ocaml
grouzen has joined #ocaml
Haudegen has quit [Ping timeout: 250 seconds]
Haudegen has joined #ocaml
kushal has quit [Ping timeout: 240 seconds]
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kushal has joined #ocaml
ely-se has quit [Ping timeout: 265 seconds]
ely-se has joined #ocaml
<spacebat>
let int_add x y = Int.of_float(x) + Int.of_float(y);;
<spacebat>
Error: This expression has type int but an expression was expected of type float
<spacebat>
its referring to the first expression in the function body
<spacebat>
the inverse function, float_add, using Float.of_int, works fine
<spacebat>
I thought that int_add would just be float -> float -> int
<flux>
spacebat, where does Int.of_float come from?
zpe has joined #ocaml
<flux>
spacebat, it works for me if I use Batteries..
<flux>
(though more ocamly written as: let int_add x y = Int.of_float x + Int.of_float y)
<Enjolras>
putting ( ) like this is a weird convention
dsheets has quit [Ping timeout: 244 seconds]
<spacebat>
I'm not sure where Int comes from - I have open Core;;
<spacebat>
and Int.of_float 5.0 gives 5
<flux>
so probably from Core then
<flux>
I think the problem is as follows:
<flux>
try entering ( + );;
<flux>
if you're using the toplevel that is
<flux>
you have probably opened a module that redefines (+) in your scope
<spacebat>
float -> float -> float
<spacebat>
WTF
<flux>
:)
<spacebat>
ok that makes sense
<spacebat>
that seems really... unsound
<flux>
let (+) = Pervasives.(+)
<spacebat>
why the () in this case?
<flux>
I don't know where Core defines its operators
<flux>
to make a function out of an operator
<spacebat>
that worked thanks
<flux>
of course your - * / are still probably wrong
<flux>
better restart your toplevel and not use open Float :-)
<flux>
(a guess)
<spacebat>
I did do an open Float, because I was trying to use float_of_int before and got a deprecation warning
<spacebat>
which said to use module Float
<spacebat>
I'll keep this lesson in mind :)
<flux>
so: Float.(+) probably says float -> float -> float
<flux>
better open these things locally, if at all
<Enjolras>
float_of_int ? deprecated ?
<spacebat>
yup
<spacebat>
I'm using utop, maybe that's the thing
<spacebat>
starting out with real world ocaml
<flux>
maybe the ocaml standard library is trying to get rid of redundant functions
<spacebat>
the book
<flux>
there is 'float' that does the same conversion
<Enjolras>
haha. This is the day i discover new things
<spacebat>
int_of_float and truncate gave similar warnings
<flux>
or maybe it was a conversion in Core that's is being phased out by Jane Street
<flux>
in fact, that sounds more plausible
<spacebat>
so you guys don't use Core?
* Enjolras
doesn't
<flux>
some probably do. but Core wasn't first in the 'extended standard library' thing, so I don't think it's very much used here.
<spacebat>
what do you recommend instead?
<flux>
but I think with the book the popularity of Core will rise instead
<spacebat>
seems so
<Enjolras>
spacebat: i'm not telling that Core is bad. It's just what flux said
<spacebat>
and this conversation will happen again :)
<spacebat>
yes, I take your meaning
<spacebat>
I don't even know what the official std lib is
<Enjolras>
when i've learned ocaml, core wasn't public, hence i wasn't using it and i've never started
<flux>
and then the alternative to that is to just use piecewise small libraries for separate tasks
<flux>
but basically I think it's worth using at least something, the standard library isn't really very wide..
<Enjolras>
alternatives are batteries and extlibs, but i use small libs dedicated to some task
<Enjolras>
crap
* Enjolras
is too slow
<flux>
it's like we're saying the same things.. :-)
<Enjolras>
i tend to use containers + dedicated librairies
<spacebat>
do you know what mirageos uses?
<flux>
containers is the most recent contender. companion_cube is also very receptive to suggestions regarding it :-)
<flux>
hmm, maybe it just uses the stuff that come with Lwt..
<flux>
and then small libraries. no real idea though.
<Enjolras>
I remember trying Core a few years ago, but there wasn't any single documentation comment in the code
<Enjolras>
i hope it has changed
<Enjolras>
that's mostly why i'm not using it
<flux>
there's also philosophical differences I think between these libraries. Core tries to fix things that are inconsistent or bad in OCaml standard libraries, Batteries just mostly extends it.
<flux>
and Containers is something completely different.. :)
<spacebat>
cheers, must go
<Enjolras>
I'm trying to do something with menhir, but maybe my knowledge of parsers is too weak to understand what's the issue
<Enjolras>
spacebat: bye
<Enjolras>
basically, i'm trying to improve error reporting, and i would like at some point to "force reduce"
<Enjolras>
let's say i have a rule "TOKEN1 rule_2? rule_3? TOKEN2"
<Enjolras>
rule_2 is something like TOKEN4; foo... | TOKEN5; ...
<Enjolras>
What i would like to do is to force a reduce of rule_2 or raise an error if either of TOKEN4/TOKEN5 is read
<Enjolras>
instead of going back to the first rule and trying to reduce rule_3
<Enjolras>
(because i now that rule_3 doesn't start with TOKEN4 or TOKEN5)
arquebus has joined #ocaml
<Enjolras>
hmm, i think i know how to do that, i need to write this like "continuations"
Mandus has quit [Ping timeout: 255 seconds]
arquebus has quit [Quit: Konversation disconnected]
rand000 has joined #ocaml
ely-se has quit [Quit: leaving]
AlexRussia has quit [Read error: Connection reset by peer]
ely-se has joined #ocaml
dsheets has joined #ocaml
Mandus has joined #ocaml
Haudegen has quit [Ping timeout: 256 seconds]
native_killer_ has joined #ocaml
native_killer has quit [Ping timeout: 255 seconds]
ygrek has quit [Ping timeout: 244 seconds]
Haudegen has joined #ocaml
ely-se has quit [Quit: leaving]
ousado has quit [Ping timeout: 272 seconds]
ousado has joined #ocaml
ousado has quit [Changing host]
ousado has joined #ocaml
ely-se has joined #ocaml
ousado is now known as ousado_
ousado_ is now known as ousado
ousado is now known as ousado_
ousado_ is now known as ousado
ely-se has quit [Client Quit]
ollehar has joined #ocaml
ggole has joined #ocaml
Intensity has quit [Ping timeout: 244 seconds]
yomimono has joined #ocaml
lordkryss has joined #ocaml
jrslepak has quit [Ping timeout: 244 seconds]
hannes has quit [Ping timeout: 244 seconds]
_native_killer_ has joined #ocaml
DanielRichman has quit [Ping timeout: 244 seconds]
DanielRichman has joined #ocaml
jrslepak has joined #ocaml
vishesh has quit [Ping timeout: 244 seconds]
frawgie_ has quit [Ping timeout: 244 seconds]
hannes has joined #ocaml
profan has joined #ocaml
frawgie has joined #ocaml
ohama has quit [Remote host closed the connection]
maufred_ has joined #ocaml
Intensity has joined #ocaml
maufred has quit [Ping timeout: 244 seconds]
ohama has joined #ocaml
native_killer_ has quit [Ping timeout: 255 seconds]
riveter has quit [Ping timeout: 244 seconds]
riveter has joined #ocaml
Intensity has quit [Remote host closed the connection]
yomimono has quit [*.net *.split]
moei has quit [*.net *.split]
Guest87942 has quit [*.net *.split]
hcarty has quit [*.net *.split]
cthuluh has quit [*.net *.split]
larhat2 has quit [*.net *.split]
mfp has quit [*.net *.split]
low-profile has quit [*.net *.split]
patronus has quit [*.net *.split]
j0sh has quit [*.net *.split]
SuperNoeMan has quit [*.net *.split]
Intensity has joined #ocaml
Anarchos has joined #ocaml
vishesh has joined #ocaml
yomimono has joined #ocaml
moei has joined #ocaml
Guest87942 has joined #ocaml
cthuluh has joined #ocaml
low-profile has joined #ocaml
j0sh has joined #ocaml
SuperNoeMan has joined #ocaml
hcarty has joined #ocaml
larhat2 has joined #ocaml
mfp has joined #ocaml
patronus has joined #ocaml
<mrvn>
Enjolras: for each rule generate all possible valid first tokens. Then when you get TOKEN4 you know only rule2 can consume that and you never are tempüted to try rule3.
<mrvn>
If both rule2 and rule3 can consume TOKEN4 you report a conflict
ceryo has joined #ocaml
<mrvn>
menhir should already report a shift/shift or shift/reduce conflict when it generates the parser.
<Enjolras>
I don't think i understand what you mean.
<Enjolras>
yes, menhir would report a conflict, but what i want is to catch syntax error at parsing, not gramar error
<mrvn>
A syntax error is when the grammar runs into a deadend with no shift or reduce for the next token.
<Enjolras>
my grammar is well formed and has no conflic. But the error token is only shifted when nothing else can be done, which means it climbs back in my syntax tree
<Enjolras>
and it makes it hard to write meaningful error reporting
<Enjolras>
i mean, my grammar in its current state works
<mrvn>
I'm not sure what menhir does then, sounds like it skips tokens. I prefer an error that TOKEN1, TOKEN2 or TOKEN3 was expected.
NingaLeaf has quit [Read error: Connection reset by peer]
NingaLeaf has joined #ocaml
<Enjolras>
whatever. I'll drop this
<Enjolras>
thanks
<mrvn>
Error tokens are nice if you want to continue parsing and report more errors. But they are hard to place well to generate good error strings and a lot of the time the following errors are garbage anyway. I prefer to simply stop at the first error.
Guest87942 is now known as c-c-
c-c- is now known as c-c
mcclurmc has quit [Ping timeout: 265 seconds]
<mrvn>
c-c: couldn't you have changed your nick BEFOR you joined the channel?
<Enjolras>
i'm starting to realize that, i've spent 2hours on this and my parser is not better than 2hours ago
<c-c>
mrvn: I did - 12 days ago
<c-c>
bye!
c-c has left #ocaml ["ta!"]
<mrvn>
I spend a weekend on this and then threw it all out. The gain was minimal and the complexity was huge.
NingaLeaf has quit [Read error: Connection reset by peer]
NingaLeaf has joined #ocaml
mcclurmc has joined #ocaml
AlexRussia has joined #ocaml
mcclurmc_ has joined #ocaml
mcclurmc has quit [Ping timeout: 265 seconds]
slash^ has joined #ocaml
ely-se has joined #ocaml
govg has joined #ocaml
_andre has joined #ocaml
ollehar has quit [Ping timeout: 246 seconds]
Anarchos has quit [Remote host closed the connection]
Anarchos has joined #ocaml
rand000 has quit [Quit: leaving]
GeorgeHahn has joined #ocaml
kushal has quit [Ping timeout: 244 seconds]
xet7 has joined #ocaml
yomimono has quit [Ping timeout: 255 seconds]
mrm has joined #ocaml
igoroliveira has joined #ocaml
obadz has quit [Quit: leaving]
yomimono has joined #ocaml
adrien has quit [Quit: leaving]
adrien has joined #ocaml
yomimono has quit [Ping timeout: 265 seconds]
octachron has joined #ocaml
BitPuffin|osx has joined #ocaml
grouzen has quit [Ping timeout: 256 seconds]
tmtwd has joined #ocaml
dsheets has quit [Ping timeout: 252 seconds]
octachron has quit [Ping timeout: 250 seconds]
grouzen has joined #ocaml
_native_killer_ has quit [Ping timeout: 246 seconds]
native_killer has joined #ocaml
octachron has joined #ocaml
tane has joined #ocaml
<Drup>
anyone doing the icfp contest here ?
<companion_cube>
nope
siddharthv is now known as siddharthv_away
<Drup>
The theme is weirdly very charles-strossesque :D
ollehar has joined #ocaml
native_killer has quit [Ping timeout: 244 seconds]
native_killer has joined #ocaml
<ely-se>
Why I love function values: "(if return then return_stmt else expr_stmt) es_expr"
<ely-se>
Or conditionally apply a function: "(if c then f else id) x" :3
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
MrScout has quit [Remote host closed the connection]
MrScout has joined #ocaml
badkins has quit [Read error: Connection reset by peer]
ely-se has joined #ocaml
grouzen has joined #ocaml
badkins has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
toomuchtvrotsurb has joined #ocaml
toomucht_ has joined #ocaml
AlexRussia has quit [Read error: Connection reset by peer]
toomuchtvrotsurb has quit [Ping timeout: 244 seconds]
Anarchos has joined #ocaml
AlexRussia has joined #ocaml
ollehar has joined #ocaml
renopt has quit [Ping timeout: 240 seconds]
ceryo has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
AlexRussia has quit [Read error: Connection reset by peer]
whirm has quit [Quit: WeeChat 1.2]
ncthom91 has joined #ocaml
ygrek has joined #ocaml
Anarchos has joined #ocaml
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
grouzen has quit [Ping timeout: 265 seconds]
<scythe->
hey, guys
cdidd_ has joined #ocaml
<scythe->
do you want jobs?
<scythe->
just curious. i work for a major tech company. we've had a little ocaml experiment going for about a year now on the side
cdidd has quit [Ping timeout: 250 seconds]
<scythe->
it's gone excellently even though there are only three devs on the project
<scythe->
but
<scythe->
we're considering scrapping it because WE CAN'T FIND ANY OCAML PEOPLE
ollehar has quit [Ping timeout: 244 seconds]
<Anarchos>
scythe- where is the job located, and how much is the wage . by the way , why are you not allowed to give the name of the company ?
<scythe->
San Francisco, typical Bay Area wages (100-200k depending on how evil HR is feeling today), Salesforce. I didn't say, I guess, because I'm not a recruiter, I'm just ranting, lol.
<ely-se>
scythe-: yes
<scythe->
But yeah, if you apply for Salesforce Analytics they'll be happy to hear you can write OCaml. You will probably be expected to know at least one other language, though (we also use C, Go, Objective-C, Java, Javascript, and Coffeescript).
MrScout has quit [Remote host closed the connection]
<scythe->
And we *do* pay to relocate. Unless you've got a resume printed in the blood of tigers though I dunno if they'll let you work from abroad.
<scythe->
hm let me see if i can find it from outside
<scythe->
unfortunately part of me wishes i'd done this six months ago. good luck to anyone who applies, maybe we'll end up sitting next to each other :p
<scythe->
also you want the "full stack engineer" on the last page.
native_killer has quit [Read error: Connection reset by peer]
<Anarchos>
scythe- thanks for your answer to my questions.
<ely-se>
scythe-: do you need formal education?
<scythe->
ely-se: i only had/have degrees in physics when i applied
<ely-se>
that's formal education!
<ely-se>
Actually, I have 37 degrees. Maybe they're fine with those.
<scythe->
:p I have a friend who has a Master's in bioinformatics and they didn't like his resume as much (even though it involved more coding experience...). I don't think you need formal education, but unfortunately you probably do need to look sort of good to make it to the interview. After that they'll phone you and start asking coding questions.
<scythe->
so if you have e.g. open-source contributions, work experience w/ references, or even just a github
<ely-se>
I always look good.
<scythe->
:3
MrScout has joined #ocaml
MrScout has quit [Ping timeout: 244 seconds]
ggole has quit []
claudiuc_ has quit [Remote host closed the connection]
systmkor has quit [Ping timeout: 272 seconds]
contempt has quit [Ping timeout: 244 seconds]
contempt has joined #ocaml
lobo has joined #ocaml
srcerer has joined #ocaml
<dmbaturin>
ely-se: Mathematicians should measure education in radians, not degrees.
jao has quit [Remote host closed the connection]
<ely-se>
No, measuring isn't for mathematicians.
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
systmkor has joined #ocaml
thomasga has joined #ocaml
jao has joined #ocaml
magistr has left #ocaml ["Ухожу я от вас"]
<dmbaturin>
scythe-: It's quite odd actually: from the other side of the HR people rant that they can't find FP jobs. :)
ygrek has quit [Ping timeout: 245 seconds]
grouzen has joined #ocaml
ely-se has quit [Quit: Leaving...]
Anarchos has joined #ocaml
ely-se has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ollehar has joined #ocaml
systmkor has quit [Ping timeout: 272 seconds]
ygrek has joined #ocaml
<ollehar>
(fyi, php can handle reference loops, but you'd have to call the gc manually)
<ollehar>
(or wait till the script terminates ^^ )
_andre has quit [Quit: leaving]
badkins has quit []
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<ollehar>
still, some gc techniques must be out-dated by now
<bitbckt>
not necessarily.
<ollehar>
damn, expensive book ><
<ollehar>
filetype:pdf it is
LnL has quit [Ping timeout: 265 seconds]
ely-se has quit [Quit: Leaving...]
<ollehar>
is there a binary compiled language that implements refcount instead of gc?
<bitbckt>
C++ shared_ptr.
<ollehar>
yeah :D
<bitbckt>
Rust Rc<>
<bitbckt>
(and Arc<>)
<ollehar>
ah really
<ollehar>
what's arc? weak?
<bitbckt>
atomic
<ollehar>
ah ok
<ousado>
FWIW, swift is refcounted
<ollehar>
hm hm
rand000 has joined #ocaml
<ousado>
ollehar: are you looking into GC implementations?
<ollehar>
ousado: yep, for my PHP LLVM backend
<bitbckt>
cycles and waterfalls are the big issues with ref-counting
<bitbckt>
the latter can be amortized with lazy refs.
<bitbckt>
the former with weak refs.
<ousado>
PHP llvm?
<ollehar>
however, I will only use gc instead of refcount if there's a bug performance gain, since it would change the semantics of the __destruct function.
<ollehar>
*big
<ollehar>
ousado: hobby project
<bitbckt>
depends what you mean by "performance", and how much effort you want to put into a GC>
<bitbckt>
a naive GC is likely to be quite slow.
<bitbckt>
in both latency and throughput.
<ollehar>
bitbckt: honestly, I want to steal an existant implementation which fits into the llvm gc interface, if possible.
<bitbckt>
thankfully, there's been some work on that interface
<bitbckt>
if C4 can be implemented atop LLVM, any other algorithm should be fine.
ely-se has joined #ocaml
<bitbckt>
ousado: I used some of his proposed techniques in a GC for Ruby.
<bitbckt>
it worked well.
<ousado>
ah nice
<ousado>
I'm using it for a new haxe target, too
<bitbckt>
I pretty much always write a regional allocator (Immix style), anymore.
<mrvn>
What are waterfalls?
<bitbckt>
mrvn: a cascade of ref counts dropping to 0.
<bitbckt>
much like dtors.
<mrvn>
ollehar: You could analyze the code and detect palces that can be statically allocated or refcounted and only use the GC for the rest.
<bitbckt>
they cause unpredictable latency in a blocking ref-count impl.
<ousado>
like a big binary tree getting disposed at once
<bitbckt>
right.
tane has quit [Quit: Verlassend]
<bitbckt>
lazy refs permit more "float" and incrementally run the dtors.
<mrvn>
So keep a list of disposable items and disbose max 100 at a time.
<bitbckt>
right.
<bitbckt>
that's a lazy ref.
<bitbckt>
at the expense of resource utilization and nondeterminism.
<mrvn>
except for trivial cases refcounting isn't deterministic
<bitbckt>
I didn't say it was.
<mrvn>
so nithing changes
<bitbckt>
not quite. the nondeterminism is in delay before the dtor is run.
<bitbckt>
"normal" refs run dtors inline.
<ollehar>
mrvn: whaaat?
<mrvn>
which is undefined with refcounts except for trivial cases
<bitbckt>
that depends upon the impl.
<bitbckt>
almost noone does it that way for the reason I just cited: latency
<mrvn>
bitbckt: not realy. It depends on the complexity of the used data
<mrvn>
You never know if some object get destroyed when it gets out of scope. It might still be refrenced somewhere else.
<bitbckt>
no. in the classical sense, all refs which drop to zero after a resource is de-ref'd will be cleaned immediately before the next statement is executed.
<ollehar>
mrvn: php use refcount + gc for cyclic stuff, so that's my starting point.
<mrvn>
ollehar: if you have a GC then ref counting is a waste of time and memory
<bitbckt>
if it were ref'd somewhere else, by definition its refcount would not be 0.
<mrvn>
bitbckt: but you never know when they will be 0
<mrvn>
except for trivial cases that is
<bitbckt>
that's right... we're referring to two different latencies.
<ollehar>
yeah, but as mentioned refcount can handle cycles, so some gc is needed.
<mrvn>
and since you don't know when the refcount will be zero the extra delay till it gets cleaned up doesn't make things worse.
<bitbckt>
it can, and does, in resource contrained environments.
<bitbckt>
the extra float is meaningful.
<bitbckt>
the same problems occur with finalizers in managed languages.
<mrvn>
doesn't make it worse. It's still a problem.
<bitbckt>
haha
<bitbckt>
I'm not saying it *isn't* a problem, but that it *is* worse.
<mrvn>
What you want is pythons deterministic "with open("foo") as fd: ..."
<mrvn>
I think that covers most cases where you want an object to be destroyed exactly when it gets out of scope.
ygrek_ has joined #ocaml
<Drup>
scythe-: did you posted on the ocaml-jobs mailing list ?
<Drup>
(and the ocaml mailing list)
<MercurialAlchemi>
mrvn: hell, I want with open in ocaml, too
ygrek has quit [Ping timeout: 264 seconds]
<MercurialAlchemi>
Drup: since you're into gadts, I tried to do something a bit crazy with gadts and polymorphic variants, but it didn't work out
<mrvn>
MercurialAlchemi: should be doable with objects or modules and a little ppx syntax extension
<mrvn>
MercurialAlchemi: did you type annotate all your functions?
<Drup>
MercurialAlchemi: poly variants don't work with gadts
<Drup>
just .. don't
<MercurialAlchemi>
maybe there is a better solution
<Drup>
(the reason is that it's almost impossible to have any kind of variance annotations with gadts)
<mrvn>
Drup: type t = [ `Foo ] type _ box : Box : [ `Foo ] -> int box?
<Drup>
mrvn: ?
<mrvn>
Drup: doesn't that work or what did you mean with "poly variants don't work with gadts"?
<MercurialAlchemi>
well, you can certainly tag with polymorphic variants
<Drup>
ok, let me rephrase
<mrvn>
or type _ box = `Box : int -> int box?
<Drup>
"It's almost impossible to do anything remotely interesting with phantom poly variants and gadts."
<Drup>
yes, you can make stupid things
<Drup>
That's not interesting.
<Drup>
but you can keep doing bourbakism, mrvn. ;)
<mrvn>
I'm just unclear of what you mean
<MercurialAlchemi>
Drup: I was afraid you were going to say that
<MercurialAlchemi>
hm, I guess I don't have a typesafe solution to my problem then
<Drup>
MercurialAlchemi: what are you trying to do ?
ygrek_ has quit [Ping timeout: 246 seconds]
<Drup>
(btw, did you read the icfp contest problem ? It's sooo charles stross-y :D)
igoroliveira has quit [Ping timeout: 245 seconds]
<ollehar>
"The new garbage collector is an arena-based, quad-color incremental, generational, non-copying, high-speed, cache-optimized garbage collector."
<ely-se>
mrvn: look up "MarI/O" and use a similar strategy
<mrvn>
Drup: but a game that never looses is boring
<mrvn>
MarI/O is a program made of neural networks and genetic algorithms that kicks butt at Super Mario World. hmmmm
<MercurialAlchemi>
Drup: hm, this looks interesting, indeed
ril is now known as ril[away]
<ely-se>
although for tic-tac-toe it's likely overkill
<ely-se>
tic-tac-toe AI is well-understood
<ely-se>
it might be more interesting to implement it for connect four perhaps
<Drup>
MercurialAlchemi: most of the type trickery is in Type_equal, in fact
<ollehar>
monopoly!
<ely-se>
Dungeons and Dragons
<ollehar>
or Risk.
<ollehar>
:D
<ely-se>
or a Tour de France AI
<ollehar>
just put Asimo on a bike
<ollehar>
a small pike, three-wheeler
<ollehar>
*bike
tmtwd has joined #ocaml
<mrvn>
ely-se: I want it to learn from playing a user. I think a neural net would require way to many game plays to get anywhere
octachron has joined #ocaml
<ollehar>
why learn from user? just connect two AI.
<MercurialAlchemi>
Drup: I'm looking at it
<mrvn>
ollehar: because then it just is perfect in an instance.
<MercurialAlchemi>
but this looks too clever for this time of the day
<MercurialAlchemi>
er, night
<octachron>
MercurialAlchemi, if you want an illustration of using univ_map, I have used this kind of ideas for "open records" here https://github.com/Octachron/orec
<ollehar>
mrvn: not if it's a more compilcated game
<ollehar>
training NN can fail.
<MercurialAlchemi>
octachron: at least this doesn't look like it requires reading the entire Core source code
<MercurialAlchemi>
:)
<Drup>
octachron: I like how you absolutely don't show the signature in the tutorial, because it would scare everyone away
<Drup>
I actually woudn't mind help with a problem I have in furl
* ely-se
follows
<MercurialAlchemi>
night folks
marsam has quit [Remote host closed the connection]
<MercurialAlchemi>
thanks for the pointers
<ely-se>
Sorry, but pointers are insignificant due to referential transparency.
<octachron>
Drup, which problem?
<Drup>
octachron: my main datatype is not covariant
<Drup>
which means that I bump head on into the value restriction
<Drup>
octachron: notice how I guard everything behind unit functions in the examples ? That's because of this
<Drup>
I would *really* like to get rid of that
MercurialAlchemi has quit [Ping timeout: 244 seconds]
<Drup>
I can't manage to do it
rand000 has quit [Quit: leaving]
<Drup>
The issue is that I can't both solve that problem and keep the nice function-like type
<octachron>
A maybe related question: how much of your non-covariant type parameters are phantom types?
<Drup>
all of them ? :D
<Drup>
octachron: you know the type-level diff-list trick (used in formats, for example) ?
<Drup>
where you accumulate parameters into a function, and your type look like that : (int -> string -> 'a, 'a) t
<octachron>
yep, so you are using most of these type parameters to do type-level computation
<Drup>
well, turns out that, when using this trick, the 'a here is not generalizable
<Drup>
octachron: well, I want a type-level list, really
<octachron>
yes, I also hit this problem quite often with gadt
<octachron>
for list and type-level integer for instance
<Drup>
I'm considering moving to a non-flat representation using nested record, which would avoid the problem (by not having the type variable at the end)
<Drup>
but the price is that it's nested tuples, and that's awful, usability wise.
shinnya has quit [Ping timeout: 256 seconds]
<octachron>
well, maybe except with a ppx for doing litteral rewriting
<Drup>
the ppx is not going to help for composability
<octachron>
hum, would list concatenation be frequent in typical use pattern ?
<Drup>
Yes.
<Drup>
that's the issue :]
<Drup>
It's not frequent with format, that's why it's not broken
<Drup>
but in my case, it would be frequent
_2can has quit [Ping timeout: 256 seconds]
<Drup>
(you really want the ability to concat two parts of a url ...)
_2can has joined #ocaml
<octachron>
otherwise, a solution that I am using for a tensor library is to have couple representation datatype/computation datatype
shinnya has joined #ocaml
<octachron>
with the idea that for tensor, tensor product is not that common, and it is fine to ask the user to provide an helper variable to do the product/ dimension concatenation
<Drup>
can you link to what the couple look like ,
<Drup>
(I don't think it's going to satisfy me, but still interested)
Haudegen has quit [Ping timeout: 264 seconds]
systmkor has quit [Ping timeout: 272 seconds]
madroach has quit [Ping timeout: 264 seconds]
madroach has joined #ocaml
<octachron>
hum, it seems that I yet to reimplement this feature in the sane part of the library. Le me take the time to write a sane example
ygrek has joined #ocaml
Haudegen has joined #ocaml
<mrvn>
maybe you need ('a, 'b, 'a -> int -> string -> float -> 'b) t
<Drup>
mrvn: I don't see how that would help
<mrvn>
you can concat that with an ('b, 'c, 'b -> ... -> 'c) t
<Drup>
I can already concat with (int -> string -> 'a, 'a) t
<Drup>
that's not the problem at all.
<Drup>
I want to concat *polymorphically*
systmkor has joined #ocaml
<Drup>
and adding new type variables is not gonna help
<ollehar>
is there a name for a technique where you analyze an ast and decide what variables are heap or stack allocated?