al-damiri has quit [Quit: Connection closed for inactivity]
agarwal1975 has quit [Quit: agarwal1975]
eh_eff_ has quit [Ping timeout: 265 seconds]
profan has quit [Ping timeout: 276 seconds]
profan has joined #ocaml
smondet has joined #ocaml
mfp has quit [Ping timeout: 264 seconds]
menasw has quit [Read error: Connection reset by peer]
parataxis has quit [Ping timeout: 244 seconds]
nomicflux has quit [Quit: nomicflux]
chenglou has quit [Ping timeout: 265 seconds]
menasw has joined #ocaml
parataxis has joined #ocaml
Algebr has joined #ocaml
jcloud has quit [Ping timeout: 272 seconds]
brunoro has joined #ocaml
chenglou has joined #ocaml
Algebr has quit [Ping timeout: 244 seconds]
brunoro has quit [Ping timeout: 252 seconds]
brunoro has joined #ocaml
jcloud has joined #ocaml
brunoro has quit [Ping timeout: 244 seconds]
nomicflux has joined #ocaml
tmtwd has joined #ocaml
eh_eff_ has joined #ocaml
eh_eff_ has quit [Ping timeout: 244 seconds]
eh_eff_ has joined #ocaml
eh_eff_ has quit [Ping timeout: 264 seconds]
sh0t has quit [Ping timeout: 244 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 264 seconds]
rgrinberg has quit [Ping timeout: 264 seconds]
rgrinberg has joined #ocaml
brunoro has joined #ocaml
nathanielc_ has joined #ocaml
brunoro has quit [Ping timeout: 244 seconds]
randomA has joined #ocaml
<randomA>
Hi
<randomA>
I have a bunch of files with failwith "Unimplemented"
<randomA>
before they were raise "Unimplemented"
<randomA>
I have a bunch of unit tests that test these files, but none of my unit tests will run because not all the functions are unimplemented
<randomA>
how can i either get the unit tests to ignore the unimplemented
<randomA>
or change the unimplemneted stuff to raise
<randomA>
i mean, just change the function to not do this
<randomA>
it's so fucking irritating
eh_eff_ has joined #ocaml
eh_eff_ has quit [Ping timeout: 272 seconds]
ygrek_ has quit [Ping timeout: 248 seconds]
jao has quit [Ping timeout: 272 seconds]
<flux>
randoma, the test framework you use stops testing once the first function throws an exception?
pierpa has quit [Ping timeout: 272 seconds]
<flux>
ounit has been pretty nice, it even deals with segmentation faults
fluter has quit [Remote host closed the connection]
Reshi has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 252 seconds]
Reshi has quit [Quit: WeeChat 1.5]
nathanielc has joined #ocaml
nathanielc_ has quit [Ping timeout: 276 seconds]
MercurialAlchemi has joined #ocaml
tmtwd has quit [Ping timeout: 264 seconds]
tmtwd has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 252 seconds]
nomicflux has quit [Quit: nomicflux]
AlexDenisov has joined #ocaml
brunoro has joined #ocaml
randomA has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
brunoro has quit [Ping timeout: 272 seconds]
MercurialAlchemi has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
tmtwd has quit [Ping timeout: 265 seconds]
tmtwd has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 244 seconds]
axiles has quit [Ping timeout: 244 seconds]
axiles has joined #ocaml
Intensity has quit [Remote host closed the connection]
jnavila has joined #ocaml
brunoro has joined #ocaml
sepp2k has quit [Quit: Leaving.]
brunoro has quit [Ping timeout: 265 seconds]
tmtwd has quit [Ping timeout: 248 seconds]
copy` has quit [Quit: Connection closed for inactivity]
tmtwd has joined #ocaml
Intensity has joined #ocaml
uzbn has joined #ocaml
jnavila has quit [Remote host closed the connection]
adi___ has quit [Ping timeout: 250 seconds]
cantstanya has joined #ocaml
adi___ has joined #ocaml
kakadu_ has joined #ocaml
MercurialAlchemi has joined #ocaml
tmtwd has quit [Ping timeout: 265 seconds]
pyon has quit [Quit: Reality is multi-dimensional. More precisely, two-dimensional.]
nomicflux has joined #ocaml
rgrinberg has quit [Ping timeout: 272 seconds]
pyon has joined #ocaml
pyon has quit [Remote host closed the connection]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pyon has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 252 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 265 seconds]
nomicflux has quit [Quit: nomicflux]
k1000 has joined #ocaml
zpe has joined #ocaml
orbifx has joined #ocaml
orbifx has quit [Ping timeout: 265 seconds]
kakadu_ has quit [Remote host closed the connection]
pyon has quit [Quit: Reality is multi-dimensional. More precisely, two-dimensional.]
AlexDenisov has joined #ocaml
pyon has joined #ocaml
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 265 seconds]
pyon has quit [Quit: Reality is multi-dimensional. More precisely, two-dimensional.]
alfredo has joined #ocaml
malina has quit [Read error: Connection reset by peer]
malina has joined #ocaml
dhil has joined #ocaml
brunoro has joined #ocaml
Algebr has joined #ocaml
fluter has joined #ocaml
dhil has quit [Quit: Quit]
malina has quit [Ping timeout: 265 seconds]
dhil has joined #ocaml
Simn has joined #ocaml
fraggle_ has joined #ocaml
malina has joined #ocaml
mfp has joined #ocaml
brunoro has quit [Ping timeout: 272 seconds]
kakadu has quit [Remote host closed the connection]
kakadu has joined #ocaml
randomA has joined #ocaml
<randomA>
how is a map like a set?
<ia0>
('k, unit) map ~= 'k set
<randomA>
~= meaning?
<flux>
meaning "is about the same as"
<flux>
in other words, the keys of a map form a set
<randomA>
so a set has is a list of map keys?
<ia0>
('k, 'v) map ~= ('k * 'v) set with compare (k1, _v1) (k2, _v2) = compare k1 k2
<randomA>
so suppose i make my map out of a bst. and i say that my set IS A MAP but an interface to the map where i see only the keys?
<flux>
set and map are implemented separately
chattere` has joined #ocaml
jwatzman|work has joined #ocaml
<flux>
but in principle you could implement set easily with a map
<randomA>
because a set is an interface of the maps datastructure
<randomA>
?
<flux>
sort of yes
<randomA>
so suppose i have my map that is a bst.
<flux>
but map might not always implement the same features as a set might for its keys
<randomA>
then what is the meaning of adding a key to my set?
<flux>
for example you might more likely want to find the maximum value from a set than the maximum key from a map
<flux>
so you need to ensure map has the superset of all the features you want
<randomA>
so a set ONLY includes the map's keys?
<flux>
yes
<flux>
map doesn't really care about the values, other than they are attached to keys
<flux>
but it deeply cares about the keys, so that it can put them into the proper order, much like set
<randomA>
so what is the meaning of inserting a value into my set if my set is a map implementation?
<flux>
you mean "if my set is implemented in terms of a map"?
<randomA>
because if my keys are like 1 2 3 with values "a" "b" "c", then i say i want to look at my set, so that is {1 2 3} and then what does it mean to insert a new element, 4
<flux>
you insert (key, value) (key, ()) into the map
chattered has quit [Remote host closed the connection]
fraggle_ has quit [Ping timeout: 252 seconds]
<randomA>
oh i see
<randomA>
does a map have the contract that it is ordered?
<flux>
yes. you can see it from the parameter the functor takes
<randomA>
oh, Ordered
octachron has joined #ocaml
<randomA>
so if my homework asks me to implement set and implement map and implement a set out of a map, then does it mean that I implement set seperately or out of th emap?
<flux>
to me it sounds like they want you to implement set in terms of a map.. you can ask your ta/prof for clarification?
<randomA>
yes probably
brunoro has joined #ocaml
fraggle_ has joined #ocaml
brunoro has quit [Ping timeout: 272 seconds]
randomA has quit [Remote host closed the connection]
roconnor has quit [Ping timeout: 264 seconds]
brunoro has joined #ocaml
fraggle_ has quit [Ping timeout: 252 seconds]
yomimono has joined #ocaml
<kakadu>
Folks, can somebody explan me correspondance between algebraic effects and delimitec continuations?
<kakadu>
It seems that al.eff. are som eformalisation to introduce more types on top of delimcc
<Drup>
have you read and/or watched a presentation of algebraic effects (ocaml or eff style) ?
<kakadu>
Effects really use some sort of continuations but it is not clear either it a generalisation of call/cc or call/cc are only technical thing to implement effects
<Drup>
kakadu: ok, you could watch leo's talk at HOPE, it's quite good.
<Drup>
anyway, effects are not a generalization of call/cc, more like an alternative presentation that makes programming with it quite easier
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
malina has quit [Ping timeout: 264 seconds]
malina has joined #ocaml
Algebr has quit [Ping timeout: 248 seconds]
brunoro has quit [Ping timeout: 248 seconds]
malina has quit [Ping timeout: 244 seconds]
fluter has quit [Ping timeout: 265 seconds]
yomimono has quit [Ping timeout: 264 seconds]
fraggle_ has joined #ocaml
malina has joined #ocaml
fluter has joined #ocaml
brunoro has joined #ocaml
Algebr has joined #ocaml
brunoro has quit [Ping timeout: 264 seconds]
AlexDenisov has joined #ocaml
fraggle_ has quit [Ping timeout: 265 seconds]
<kakadu>
Folks, Does the repo https://opam.ocaml.org/2.0~dev actually works? Opam says that it can't update from this repo. TT
silver has joined #ocaml
_andre has joined #ocaml
dhil has quit [Ping timeout: 252 seconds]
brunoro has joined #ocaml
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rand__ has joined #ocaml
rgrinberg has joined #ocaml
AlexDenisov has joined #ocaml
rgrinberg has quit [Client Quit]
rgrinberg has joined #ocaml
fraggle_ has joined #ocaml
mengu has joined #ocaml
mengu has quit [Changing host]
mengu has joined #ocaml
<mengu>
guys, what was the name of the types starting with ` sign
<Drup>
kakadu: it does for me, are you using the right opam version ?
<Drup>
mengu: polymorphic variants
<mengu>
thanks Drup
* reynir
is too slow to type 'polymorphic variants' to beat Drup :-)
alfredo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
grayswandyr has joined #ocaml
dhil has joined #ocaml
fraggle_ has quit [Ping timeout: 252 seconds]
<mengu>
and i want to see if it is an `Int list etc
<mengu>
Drup: reynir: is it possible to pattern match a polymorphic variant list? like i have [`Int 1, `Int 2, `Int 3]
<reynir>
Uh, you can recursively run through the list and match its elements, but i'm not sure that's what you want(?)
<reynir>
It's possible to specify it's type: ([`Int 1; `Int 2; `Int 3] : [`Int of int] list)
<reynir>
or ascribe
fraggle_ has joined #ocaml
<brunoro>
hi everyone
<brunoro>
I'm trying to writi some code using ctypes.foreign and opencv
<brunoro>
and i'm stuck with compiling this thing, it seems that the opencv symbols are just not there on my final executable
<brunoro>
i get a Fatal error: exception Dl.DL_error("dlsym(RTLD_DEFAULT, cvCaptureFromCAM): symbol not found")
grayswandyr has quit [Quit: Page closed]
<brunoro>
i'm passing the location of the headers to ocamlopt using --ccopt
<brunoro>
and passing the correct linker directives with --cclib
<brunoro>
-lopencv_core, -lopencv_video, etc.
grayswandyr has joined #ocaml
<brunoro>
can anyone point me to a nice working example or reference about linking c code? everything out there seems to cover the bits about writing the correct type signatures
<brunoro>
but nothing really about how to compile/link it
<randomA>
ok another question is that i have a module that's kind of abstract
<randomA>
so when I try to use it, it says unbound module dictionary
<Algebr`>
what does "kind of abstract" mean
<randomA>
like it has a signature
<randomA>
and then it has a functor that turns stuff into it
<randomA>
so lik Map is kind of abstract but has Map.Make
<randomA>
and i'm defining a module that uses Map from Map.Make as a set
<randomA>
but i'm confused as to what they types should be
since1987 is now known as for{}
<randomA>
I said that M:Map and then module C = M.Key : C
al-damiri has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 272 seconds]
<randomA>
?
<jstolarek>
what tool should I use to create source code documentation?
<jstolarek>
ocamldoc?
<companion_cube>
yes
<Algebr`>
or odig now apparently
yomimono has joined #ocaml
fluter has quit [Ping timeout: 248 seconds]
<Drup>
odig uses ocamlbuild under the hood for now, so you still need to provide a good "make doc" target
<Drup>
(and odoc still uses the same markup, so all efforts toward having a good ocamldoc documentation should translate well)
<randomA>
please help
<randomA>
if Map is called M in my functor and is abstract and Elt = M.Key and type elt = Elt.t then if i'm trying to implement a set, should type t, the set, be an elt or be D
<randomA>
i thought it was D but iw as wrong
<companion_cube>
what is D…
<randomA>
uh, M
<randomA>
sorry
<companion_cube>
M is a module, not a type
shinnya has joined #ocaml
<randomA>
it is
<companion_cube>
you probably want `type t = foo M.t` where foo is some type
<randomA>
yeah i dont know
<companion_cube>
(if it's just a set, you can use foo = unit`
<companion_cube>
)
<randomA>
foo needs to be the keys of Map?
<companion_cube>
no, the key is already part of M.t, in some sense
<randomA>
ok, so then just t = unit M.t
<companion_cube>
yeah, should do it
<Drup>
randomA: why don't you show us your implementation ?
<randomA>
i have module Elt = D.Key, then elt = Elt.t then t =unit M.t
<randomA>
i have the error, the type construct M.t would escape its scope
<randomA>
whenever i try to include something it says unbound
fluter has joined #ocaml
mengu has joined #ocaml
mengu has joined #ocaml
mengu has quit [Changing host]
roconnor has joined #ocaml
Algebr` has quit [Ping timeout: 244 seconds]
yomimono has quit [Read error: Connection reset by peer]
dhil has quit [Ping timeout: 272 seconds]
al-damiri has quit [*.net *.split]
ggole has quit [*.net *.split]
copy` has quit [*.net *.split]
chenglou has quit [*.net *.split]
Ravana has quit [*.net *.split]
nore has quit [*.net *.split]
kolko has quit [*.net *.split]
ldopa has quit [*.net *.split]
Drup has quit [*.net *.split]
ggole has joined #ocaml
kolko has joined #ocaml
nore has joined #ocaml
Drup has joined #ocaml
sh0t has quit [Remote host closed the connection]
Ravana has joined #ocaml
yomimono has joined #ocaml
MorTal1ty has quit [Ping timeout: 272 seconds]
sz0 has quit [Ping timeout: 272 seconds]
chenglou has joined #ocaml
ChristopheT has joined #ocaml
nomicflux has joined #ocaml
MorTal1ty has joined #ocaml
copy` has joined #ocaml
sz0 has joined #ocaml
al-damiri has joined #ocaml
<brunoro>
randomA: can you put the code on pastebin or something?
<randomA>
ive done this since 4 am
<randomA>
i dont want to do this anymore
<randomA>
and its 11 am
<brunoro>
companion_cube: figured out what was happening here, in the end it was opencvs fault
<brunoro>
randomA: wow
mehdib_ is now known as mehdib
<randomA>
yeah im dumb
<brunoro>
in that case taking a nap is definitely gonna help more than our support :D
<companion_cube>
brunoro: :D
<brunoro>
i was mapping my ocaml interface to cvCaptureFromCAM, the method shown in the opencv docs
<brunoro>
when i ran nm -gU on the dylib i found out that the method is actually called cvCaptureFromCamera
<brunoro>
this made me waste at least 5 good hours of my life XD
<companion_cube>
so it's old docs, isn't it?
<brunoro>
yeah
<brunoro>
they dropped support to their C API on new versions
<brunoro>
so I guess not much love is being given to those docs anymore
<brunoro>
now the official interfaces are only C++ and python
yomimono has quit [Read error: Connection reset by peer]
<companion_cube>
awww
<companion_cube>
they must be using swig, though?
<companion_cube>
I think swig supports more or less OCaml?
<jstolarek>
is there a way to specify name of the executable with oasis/ocamlbuild?
<jstolarek>
I'd like to avoid .byte/.native suffix on generated executable
<companion_cube>
it's present on the generated executable, no
yomimono has joined #ocaml
<companion_cube>
but not on the installed one
<companion_cube>
oasis strips the suffix upon installation
<jstolarek>
I'd like to strip it on the generated executable because my tests scripts rely on the name of executable
zpe has joined #ocaml
<jstolarek>
of course I can write a script to fix that
<jstolarek>
but was hoping for an easier solution
<companion_cube>
why can't they use .native ?
<jstolarek>
what if I build .byte ?
<jstolarek>
I'd like to have a flexibilit of switching between byte/native without a need to modify my scripts
<Drup>
jstolarek: you could use oasis to pilot the testing script, it has a varialble that can be filled with the name of the executable, regardless of the prefix
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
<Drup>
For example, if you give "Command: testing_script $links_executable" (and "links_executable is the oasis name of the Executable section), it'll do pass the name as argument
<Drup>
and then you can do whatever you want
MercurialAlchemi has joined #ocaml
<Drup>
(from a cross plateform perspective, this is better, avoid stumbling upon .exe problems and the like ...)
<jstolarek>
that might be an option
<jstolarek>
I have three documentation sections in my _oasis file
<jstolarek>
is there an easy way of controlling which one to build?
<jstolarek>
Links has: documentation of the grammmar in TeX format, user documentation in some markup that is converted to HTML, and ocamldoc source code documentation
<jstolarek>
I think it makes sense to separate these as separate kinds of documentation
<jstolarek>
and it would be nice to be able to build only, say, API documentation without having to edit _oasis file
yomimono has quit [Read error: Connection reset by peer]
smondet has quit [Ping timeout: 265 seconds]
zpe has quit [Remote host closed the connection]
<Drup>
maybe with configure flags, not sure
<Drup>
I never do that
zpe has joined #ocaml
yomimono has joined #ocaml
zpe has quit [Ping timeout: 252 seconds]
ChristopheT has quit [Remote host closed the connection]
nomicflux has quit [Quit: nomicflux]
luzie has joined #ocaml
sh0t has joined #ocaml
randomA has quit [Remote host closed the connection]
lolisa has quit [Ping timeout: 252 seconds]
yomimono has quit [Quit: Leaving]
for{} has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 265 seconds]
seangrove has joined #ocaml
nomicflux has joined #ocaml
kakadu has quit [Ping timeout: 252 seconds]
larhat has quit [Quit: Leaving.]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mengu has joined #ocaml
mengu has quit [Read error: Connection reset by peer]
slash^ has joined #ocaml
mengu_ has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
brunoro has quit [Ping timeout: 265 seconds]
brunoro has joined #ocaml
mengu_ has quit [Remote host closed the connection]
mengu has joined #ocaml
octachron has quit [Quit: Page closed]
brunoro has quit [Ping timeout: 244 seconds]
mengu has quit [Ping timeout: 256 seconds]
dhil has joined #ocaml
eh_eff_ has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 252 seconds]
for{} has joined #ocaml
nomicflux has quit [Ping timeout: 252 seconds]
nomicflux has joined #ocaml
brunoro has joined #ocaml
nomicflux has quit [Quit: nomicflux]
brunoro has quit [Ping timeout: 264 seconds]
tane has joined #ocaml
ggole has quit []
jao has quit [Ping timeout: 264 seconds]
roconnor has quit [Ping timeout: 244 seconds]
nomicflux has joined #ocaml
mengu has joined #ocaml
mengu has joined #ocaml
mengu has quit [Changing host]
orbifx has joined #ocaml
smondet has joined #ocaml
roconnor has joined #ocaml
mengu has quit []
ygrek_ has joined #ocaml
orbifx has quit [Ping timeout: 272 seconds]
Algebr` has joined #ocaml
roconnor has quit [Ping timeout: 265 seconds]
Sorella has quit [Quit: Connection closed for inactivity]
seangrove has quit [Ping timeout: 252 seconds]
AlexDenisov has joined #ocaml
xvw_ has joined #ocaml
orbifx has joined #ocaml
brunoro has joined #ocaml
seangrove has joined #ocaml
nomicflux has quit [Quit: nomicflux]
brunoro has quit [Ping timeout: 256 seconds]
xvw_ has quit [Quit: xvw_]
roconnor has joined #ocaml
nomicflux has joined #ocaml
pyon has joined #ocaml
kamog has quit [Remote host closed the connection]
kamog has joined #ocaml
rgrinberg1 has quit [Ping timeout: 272 seconds]
eh_eff_ has quit [Ping timeout: 264 seconds]
rgrinberg has joined #ocaml
seangrove has quit [Ping timeout: 265 seconds]
malina has quit [Remote host closed the connection]
kakadu has joined #ocaml
dhil has quit [Ping timeout: 252 seconds]
eh_eff_ has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
eh_eff_ has quit [Ping timeout: 272 seconds]
fraggle_ has quit [Ping timeout: 252 seconds]
fraggle_ has joined #ocaml
for{} has quit [Remote host closed the connection]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 244 seconds]
octachron has joined #ocaml
fraggle_ has quit [Ping timeout: 265 seconds]
jao has joined #ocaml
eh_eff_ has joined #ocaml
pyon has quit [Quit: Reality is multi-dimensional. More precisely, two-dimensional.]
eh_eff_ has quit [Ping timeout: 272 seconds]
rand__ has quit [Quit: leaving]
fraggle_ has joined #ocaml
seangrove has joined #ocaml
eh_eff_ has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 265 seconds]
myst|fon has quit [Ping timeout: 265 seconds]
_andre has quit [Quit: leaving]
myst|fon has joined #ocaml
fraggle_ has quit [Ping timeout: 265 seconds]
octachron has quit [Quit: Leaving]
AlexDenisov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 244 seconds]
shinnya has joined #ocaml
kakadu has quit [Remote host closed the connection]
sz0 has quit [Quit: Connection closed for inactivity]
Algebr` has quit [Ping timeout: 244 seconds]
pyon has joined #ocaml
rgrinberg has quit [Ping timeout: 256 seconds]
brunoro has joined #ocaml
brunoro has quit [Ping timeout: 252 seconds]
orbifx1 has joined #ocaml
<orbifx1>
Any window managers written in ocaml?
<companion_cube>
not that I know of
<orbifx1>
Do i have to do everything guys? :P
<companion_cube>
bah
<companion_cube>
I like i3
<companion_cube>
no need to change
<orbifx1>
there is always a need to change
<orbifx1>
I'll prove it
<orbifx1>
`i4`
<orbifx1>
orbifx -- out
<companion_cube>
meh :p
<Bluddy[m]>
also, window managers are only usable on linux, making them a very niche software product
<Bluddy[m]>
(those linux users who want a window manager)
<orbifx1>
so?
orbifx has quit [Ping timeout: 256 seconds]
<companion_cube>
eventually there will be as many WM as users
<Bluddy[m]>
it's already heavily populated. Simply makes no reason to start an OCaml WM
<orbifx1>
Bluddy[m]: that's like 89% of the people :P
<orbifx1>
companion_cube: that is utopia
<Bluddy[m]>
:)
<Bluddy[m]>
makes no reason = makes no sense
<Bluddy[m]>
my friend is using batteries' Enum heavily and bumping into edge cases, such as wanting to stream multiple copies of Enums (functional use of a pseudo-functional-but-really-imperative data structure)
<Bluddy[m]>
he's tried cloning, but cloning seems to be limited as well
<Bluddy[m]>
anybody have recommendations other than staying away from iterators?
<companion_cube>
living dangerously, apparently
<companion_cube>
staying away from Enum, maybe?
<companion_cube>
depends a lot on what he's trying to do
<Bluddy[m]>
companion_cube: so enum is like your gen, right? It's a generator
<companion_cube>
yes
<companion_cube>
(but much more complicated)
<Bluddy[m]>
and he'd experience the same problems with gen -- you can't have 2 data structures built out of the same gen stream
<companion_cube>
if you don't need to iterate stepwise on several iterators, sequence might help
<companion_cube>
indeed, although if the source of generators is immutable you can still do things
<companion_cube>
the hard case is if you want to fork during iteration
<companion_cube>
(still, he should probably give BatSeq a try)
<companion_cube>
and I'll give my bed a try, too; see you tomorrow if you want to discuss it further
<Bluddy[m]>
ok good night
<Bluddy[m]>
thanks
<Bluddy[m]>
I'm not sure what the advantages of a sequence are -- haven't used either one of these things too much myself
<Bluddy[m]>
Is it more functional-like? Anyone?
agarwal1975 has quit [Ping timeout: 244 seconds]
<Drup>
faster, less flexible, can be used on any datastructure that provides an iter function, which is all of them
<Bluddy[m]>
but does it give you any advantages in terms of allowing for semantics closer to functional data structures?
<Bluddy[m]>
it seems like when using iterators, you need to be thinking about the fact that the semantics are imperative
<Bluddy[m]>
even while you want to compose data and functions functionally
<Drup>
for gen and sequence, that's not much of an issue when simply composing things