« first day (190 days earlier)      last day (3334 days later) » 

01:35
constructor functions++... man reading that really makes me want more people to start coding in F#
My boss would actually allow F# if it weren't for the fact that he believes he couldn't hire people to maintain any of it in the long term
> Normalized collections modules
this is a good step, but I would really like these as floating functions, or at least attached to the same type, no more List.Map and Array.Map and Seq.Map -> they should make a normalized Seq.Map<'a> x f = match x with | List<'a> -> List.Map x f | Array<'a> -> Array.Map x f etc so I only have to ever reference one Bla.Map and it works across all types finding the correct Map function and returning the appropriate type as such
I really don't understand why those aren't floating functions to begin with...they floated printf, why not all the list functions too?
Does anybody know why they chose that route to begin with? Perhaps there's a good reason I'm just not seeing
02:00
not terribly thrilled about the implicit ambiguation of mutable with ref in F# 4.0
02:12
big hopes for faster generics comparison, tho
02:46
@BryanEdds so long as the compiler is very conservative about when it starts heaping, I'm fine with it.
the problem with the proliferation of new little features is that it makes it harder to introduce big features down the line
while opening F# lang dev will make it a very cozy language, it will probably, IMO, making it not a very evolving one
@BryanEdds y'think? Iduno... these things aren't much change to the language, more underlying stuff and some normalization to be more consistent which I would think would make codebases more adaptable to changes down the road
@BryanEdds fine by me if it get's more use so I might actually be able to get away from C# in industry...
each additional feature is a constraint on each successive feature
mark these words
makes sense
we may come to regret this
well, in language design, we KNOW we will come to regret this; it's inevitable
02:52
@BryanEdds this is precisely why SPJ is famous for saying of Haskell that their goal is to "Avoid success at all costs" - a bit tongue in cheek, but it's just recognition of why it's been able to evolve so significantly
Presumably Don is aware of this fact; I hope he manages to not lost sight of it
(it's easy to do so)
03:20
after all, F# still desperately needs grand features like macros, edit-and-continue, and perhaps a more refined type system
(someone - @JimmyHoffa? - please star that statement for visibility)
03:38
Speaking of which, we apparently need to go on a social campaign to support Edit and Continue here - visualstudio.uservoice.com/forums/121579-visual-studio/…
04:23
I wonder if I should default to making a 'make' function for each of my new record types in F#...
honestly, this type of thing should come generated for free, but...
bloody boilerplate
heh, some people call it 'mk'...
please don't call it 'mk'.
MORTALLL KOMBATTTTT!!! is all I see when I read that :)
then I rip the screen off my laptop and yell FATALiTY11!
so ya
 
4 hours later…
08:30
good morning, I am trying to use TextWriter from f# to read from a network stream - anyone got a hint - I usually use in C# TextWriter textWriter = new StreamWritter(tcpClient.GetStream()), but get no straight f# aequivalent!
 
3 hours later…
11:40
Hi, all: need some guidance in order to speed up the process of documenting a F# project. Something like funscript.info/samples/tutorial/index.html, that I could deploy from github repo to github.io but that I also would like to generate locally. How many things do I need?
have you looked at project scaffold github.com/fsprojects/ProjectScaffold - maybe this gives you an idea
great. thanks @weismat
unfortunately we have TFS, I hope we can pass control to FAKE somehow
12:06
Afternoon all
hi there!
12:28
How goes?
not too bad - looking forward to seeing Mathias Brandewinder in two weeks
Nice. In Germany, or you travelling somewhere?
in Frankfurt
no real travel required
Where in Germany are you again? Munich?
Frankfurt
12:33
Oh, so no travel required at all
no...can not really travel right now with a 4 month old baby at home
Ahhh. That's a good reason.:P
Hi guys, is there an operator I can use to make this code simpler?
let generateAllShifts s = [ 0.75m .. 0.25m .. 2.00m ]
|> List.map modifyStressByShift
|> List.map (fun f -> f s)
where modifyStressByShift is (decimal -> 'a -> 'b) and the argument to generateAllShifts is of type 'a
The (fun f -> f s) seems sort of clunky
@kreutz, I can't think of a simpler way.
All right, i'll leave it as is :)
I'm playing around with declarative computation expressions at the moment. It's pretty amazing how readable you can make stuff.
Porting stuff from unreadable data in excel spreadsheets that needed to be custom parsed into a neat dsl that almost reads like plain english
12:45
yes - helps so much when you do not need brackets and commas
you do need a lot more parentheses though!
take this for example, which is a statement inside one of my comp exprs
multiply (trend (Active => Dead)) { ``By a constant`` with Value = 0.94 }

it would have been nice to be able to omit the four parens in the beginning, but it's unable to because "trend" and "=>" are function invocations
oh and pardon the morbid constants, but this is for a modeling language for actuaries
 
1 hour later…
13:51
@kreutz: the two mappings can at least be shortened: List.map (modifyStressByShift >> ((|>) s))
Dunno if you prefer that for readability though. I tend to prefer short
It's generally a good idea to merge consecutive maps, but full point-free style is a bit too much in this case IMO. List.map (fun x -> modifyStressByShift x s) isn't even longer.
14:07
Matter of taste. It declares an extra variable. If declaring a variable anyway, why not:
[for x in 0.75m .. 0.25m .. 2.00m -> modifyStressByShift x s]
Actually, thinking about it, I like this best. 10 symbols shorter and fits in a single line of good size.
Yes I think I prefer the last form too. Thanks!
14:28
You're welcome. Yay, collaborative code shortening :]
Different topic: will standard structural equality checks run at full cost even when the compared objects are equal by reference? In principle, someone could implement an equality where this early-out isn't valid; but is it omitted to cover such a nonsensical case?
14:50
@Vandroiy I'm not clear on your question. "Standard" structural equality, like for int types, etc.?
If you look at the source of int32, then there's no reference checking, referencesource.microsoft.com/#mscorlib/system/…
Oh wait sorry, I was looking at the compare methods
Hmm, Int32.Equals reference checks, but I think that's just because Int32 is the object version of the native int type
in c# implementing/overwriting equals for a struct is always a performance improvement
15:14
Well, it wouldn't make sense to early-out an int32 check for reference, since the reference is at least as long as the whole int. I mean, for example, a huge string or a large DU tree without any custom equality
Take the extreme example: I generate a gigantic string and compare it with itself. Will it compare the entire memory with itself, or short-cut "troll, it's obviously equal since it's the same reference"?
A little less extreme would be a custom record or DU that contains no types with custom equality. Again, logically, it is clear that they are equal if the reference is equal, since no contained type is ever unequal with itself.
The weird part is if it is an F# type with standard structural equality but components with custom equality. I would say, the short-cut is still valid, since an implementation where it isn't wouldn't be a correct implementation of equality. But I wonder whether the F# team thinks the same way and in which cases it implemented this optimization, if any
Don's article on [<StructuralEquality>] and [<ReferenceEquality>] doesn't say anything about using both at the same time, however there is a [<CustomEquality>] which could be implemented with the short-circuit comparison of which you speak.
...You'd typed faster than I. :)
15:30
I'm wondering if any types have it by default and, if not, why. Are there any examples of a correct, structurally compared type where it would be wrong? (Correct as in: using a sane definition of equality)
You mean like a duplicated type?
16:12
let generateAllShifts s f = [ 0.75m .. 0.25m .. 2.00m ]
|> List.map modifyStressByShift
|> List.map f
@kreutz --^
(I think?)
no that applies each stress to f (which wasn't a parameter in the original), the original applied s to each element of the list produced by mapping modifyStressByShift
I think @Vandroiy got it well with
[for x in 0.75m .. 0.25m .. 2.00m -> modifyStressByShift x s]
@Ibasa applied s to each element of the list? it applied f...
oh I see n/m
 
3 hours later…
19:01
I have an immutable random number generator
should Rand.next be -
Rand -> int * Rand, or
Rand -> RandResult // where RandResult = { Number : int; Rand : Rand }
In other words, a pair or a record?
@BryanEdds I'd go with pair
I'm leaning that way too
Any idea why System.Random.Next () won't return Int.MaxValue?
because it's documented not to? I assume so that it can be implemented internally as Next(0, int.MaxInt)
and Next(min, max) is an exclusive max
19:49
@BryanEdds yeah Next is an exclusive max
upper bound is not included in possibilities
20:16
@BryanEdds this is basically the state monad
20:36
err writer monad rather
Has anyone ever ran into issues where a Binding Redirect wasn't being honored
> The Control.Monad.Writer module provides the Writer monad, which allows information to be collected as a computation progresses. Writer w a is isomorphic to (a,w), where the output value a is carried along with an annotation or “log” of type w, which must be an instance of Monoid (see section Monoid); the special function tell performs logging.
@pblasucci ?
oh runtime binding
presumably it's not being overridden? config files have a hierarchy
@JimmyHoffa yeah. Assembly Redirect from FSharp.Core.dll v4 to v4.3.1
It's currently in the config for the executing application
I'd take a look at the fusion log, anytime I have binding issues I've learned that's the best place to look
@pblasucci whether machine or applicationHost configs override a section is defined per-section, some sections the hierarchy of overrides flows one way, other sections otherwise...check your applicationHost and machine configs if fusion log doesn't give you a better idea
Well, that maybe not be possible... It's a remote machine in a test environment
@JimmyHoffa Thanks!
20:53
@pblasucci you could listen to app domain events for resolution attempts and either add one at runtime or log information about what's going on to help diagnose github.com/ImaginaryDevelopment/config/blob/master/…
@pblasucci or add your binding redirect at runtime =)
21:38
Thanks, @maslow
I may go down that road... First trying some other things
 
2 hours later…
23:27
@Maslow fusion log is precisely this, logging all the resolution attempt events, you can turn it on in a few ways but easiest is reg key where you turn it on and specify where to write the file log
there's even some tools out there for turning on/off/viewing the fusion log
> Alternatively, just set the Registry keys your self. (I just memorized them, as I set them all the time.) Set HKLM\Software\Microsoft\Fusion\ForceLog registry value to 1 and HKLM\Software\Microsoft\Fusion\LogPath registry value to C:\FusionLogs or some path that exists.
super handy to know about if you're not familiar with it

« first day (190 days earlier)      last day (3334 days later) »