« first day (104 days earlier)      last day (3420 days later) » 

01:20
Hello @JamesD'Angelo - how's Portland?
still supplying good coffee and comically oversized donuts I hope?
 
2 hours later…
03:32
@Mathias all is well up here. Coffee, beer, and donuts are all intact! Planning on making another appearance?! =)
 
2 hours later…
05:52
Good morning everyone
good morning
Ah someone else is awake at this time :)
How are you?
ok - got totally wet 2nd in 5 days and have now a light cold :-(
and how are you?
I am all good. We had our first rains here on Sunday. Still a little bit cold, but it seems that spring is approaching
hello hello!
06:04
got a question - I am considering to redo some c# library parsing code - essentially it is parsing some nested structures with variable types. currently it is basically one big switch statement in c#- not sure how I should do pattern matching with different result types or just work with a boolean fake result?
what do you mean by "pattern matching with different result types"?
return value plus type - usually something which is tough to explain is a bad idea - so I might just work with a boolean return type
let me ask it differently - what are you parsing? Usually that involves discriminated unions and/or active patterns.
I am getting data from a system via a socket protocol which is similar to BNF syntax - for a few things the data is an enum where discriminated union fits well, but most is basic types like int, float, date, time
and where does the bool fit in?
06:12
if I pattern match, I would update the relevant field in the record, but then I need a return value, right?
maybe you can look at fsharp.data and the JSON parser for ideas / inspiration
06:25
cool idea - I am a bit surprised that it uses a class hierarchy
 
3 hours later…
09:02
just did my first xml type provider usage on sth more complex - remember a few years ago doing some xsd2code stuff and this is a much better experience
09:16
I still want the XSD TP. That would be so useful for what I am working on now
the xsd is nice for complettness if you do not have proper test data, or why do you need the xsd?
Because I don't have a full sample, but I do have a schema
The schema is over 20k lines
what I dislike about f# is the lack to add simple config parameters in f# - now I will need to add config xml on my own using the xml type provider ;-)
What do you mean simple config parameters?
e.g. a username, password, ftp server address and stuff like this
09:31
Why not just use app.config?
there is no editing support in a F# console project
how do you read app.config from f#
System.Configuration.ConfigurationManager, like you normally would
in a console app you get an x.exe.config and a x.Properties file is generated - this is what I usually do
10:07
AppSettings works fine
you can also use the app settings Type Provider if you want but it's not a problem to use configuration manager
weismat or are you referring to a strongly-typed application settings file?
10:57
looks good - I am spoiled by the C# way
anyone using sftp from f#?
Nope.
11:44
Hi. "Old" F# powerpack had ToLinqExpression and Compile for quotations.
How should this be done in F# 3.0.
11:54
ToLinqExpression in now in F#3.x
Namespace? I can't get it work in fsi
Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter.QuotationToExpressi‌​on
ok.
LeafExpressionConverter.EvaluateQuotation
Thanks
As long as you dont need speed :-)
aaargl, I read about slowness...
so nothing as improved in F# 3?
12:00
It can be 1000x slower
Its a mixture of reflection, expressions, its never going to be fast unless you compile up front
Ah, ok. I want to compile up front.
The linq expressions can be slow anyway
If you use unquote then perhaps a reduction or evaluation can be faster
Or you could compile to a DynamicAssembly and invoke it as a top level expression
Still reflection involved though
The plan was quotation |> transform |> verify |> compile.
And in runtime execute compiled code.
Theres a bit of a hole in the quotations API for that kind of thing, you have to boilerplate a lot of it.
Hey @7sharp9, can you tell me more about what will be replacing the SpanParsers in xs?
12:08
@AshtonKJ Ive not looked at the API in detail, dont know
@7sharp9 Do you know of any example that makes something similar. Take some quotation expression, use metadata to transform/add code to that expression and then compile the code so runtime speed is not very bad?
@jruizaranguren Not off hand, I was doing something similar a few weeks ago
Compile speed will be slow on the first hit
subsequent iterations will be faster
It depends what you are doing
Even a partial compiler of an addition to a dynamic assembly is likely to be 200ms
Don't mind, if runtime performance is acceptable
@7sharp9 need to log off. Any hint, link or source to help develop something like that will be much appreciated.
@jruizaranguren I think theres a nice space for a library to help with that
@7sharp9 is there anywhere I could find out more?
12:20
A mixture of unquote, type provider internals and compiler internals achieves most things in that area.
@AshtonKJ Not at the moment, the API is still internal
@AshtonKJ Theres an interface to explicitly support semantic highlighting now.
That's cool :)
Any hint on when we can see it?
IEnumerable<ColoredSegment> GetColoredSegments (ISegment segment)
@AshtonKJ I dont know when yet
I do know theres some breaking changes though
Maybe I should switch to the alpha channel so I get those changes early
I think the alpha is currently designated for early access to 64bit iOS
I just run from code in master.
12:38
Master of which?
Everything
12:53
Is there way to bind the elements of lists to values?
Say I have a list, x, that I know is 4 elements long, can do I something like:
let ele1,ele2,ele3,ele4 = x
?
I guess the problem is for the compiler to also know the list is 4 elements long
@kreutz looks very perlish ;-) I guess you could write a class with 4 properties and do it in a constructor or use a record type with a builder functio
Ehhh, yeah it's a bit messy. I'm parsing some csv into a function call, and that's why i need the variables separated. I'll just do it the naive way then.
consider to use the csv provider for this - it is convenient because it does type inference
Kit
Kit
Cross post from twitter: Writing a blog on #fsharp readability in conjunction with the launch of my new PluralSight course. What are your F# readability bug-bears?
13:13
@7sharp9 which repo? Is it a Xamarin internal one? Or is it the MD one?
Kit
Kit
If you know that number of elements at design time:
let list = [1; 3; 5; 9]
let e1, e2, e3, e4 =
match list with
| [a; b; c; d] -> a, b, c, d
| _ -> failwith "Invalid list"
Ah, thanks
Kit
Kit
$$$ Shameless commercial plug $$$ - My F# Functional Data Structures course is now live on PluralSight www.pluralsight-training.net (search for my name: 'Eason').
5
@Kit :)
@AshtonKJ Monodevelop, I pull the latest fsharpbinding in main/external/fsharpbinding
13:39
@kit is pluralsight's payment for author similar like spotify for music for artists?
JKS
JKS
Hello, I would like to write F# server, I haven't touched F# or C# before, but i have written some programs in Ocaml. Where should I begin?
@JKS F# Server for what?
JKS
JKS
Messenger + authentication
Kit
Kit
@JKS IMO - don't start with a server. Start by learning the languages and the .NET platform. Only then can you start with the decision making around something as ambitious as (any kind of) server.
JKS
JKS
13:54
I would like to start with a server, because my client wants server written in .NET, I would like to try out F#.
have a look at this example: gist.github.com/panesofglass/765088 - then consider how much you have understood or not understood - is this more a raw TCP server or based on Web Sockets or another protocol?
JKS
JKS
in short HTTP server
I would then look at the list here: fsharp.org/guides/web
JKS
JKS
I am analyzing the code now
Alright i'll have a look at your link
I personally would look especially at NancyFx github.com/NancyFx/Nancy - the super duper happy path as they advertise it
JKS
JKS
14:12
Will I sacrifice something when I use NancyFx?
I have to do rest asp.net mvc http server
you work with a very mutable target here
Kit
Kit
@weismat You win the award for the most Yoda-like comment of the day ;-)
JKS
JKS
well you are quite right
@JKS I think sacrificial offerings are optional.
2
maybe it is related to my own path from heaven to hell today - was trying to implement sftp via winscp today - got winscp working with ease, but totally failed in f# because the thrown exception is b..shit, but now I am locked from accessing the sftp - most likely they have blocked me - at least for a day
it was always complaining about the authentication method, but the real problem was that I mistyped the path for the private key - such a bugger
JKS
JKS
14:25
Sooooooo
I installed that pure F# ASP.NET MVC 5 template
And it runs!
Now I'll try to use this NancyFx
alright I have installed NancyFx templates and launched them, where should I go next
 
2 hours later…
16:42
@7sharp9 Yep, a nice library is what I need (clojure/plumbing |> fhsarpized) but still too amateur to start by myself. But If I manage to get a little POC working I may start one.
 
2 hours later…
18:36
So, this isn't really F#, per se, but does anyone know how to use System.Diagnostics.Process to launch a background job (a là appending an & in the terminal)?
Ignore my last question... it seems that's the default behavior on OS X
:-)
19:18
Does P/Invoke on OS X still require setting DYLD_* vars?

« first day (104 days earlier)      last day (3420 days later) »