« first day (85 days earlier)      last day (3439 days later) » 

4:08 PM
@toyvo Haskell has unsafeAt for performance reasons. Default is exception.
Which is nice—performance-critical code should look like performance-critical code.
 
yeah it's the same in OCaml, there's Array.unsafe_get
 
Having an android-specific issue but seems specific with XS-F#. I can't seem to add a ViewFragment-inherited object to an empty container.
However putting it in the layout XML will keep me from replacing it.
 
4:25 PM
@Marcin Check out the room!
 
Why is there so many people here? :D
 
Want us to leave? ;)
 
no :)
 
@MarcinJuraszek Reed tweeted :)
 
Meh memory leak :-(
 
4:27 PM
I'm just a little surprised :)
 
I think you have to get used to it, numbers will probably keep rising
 
If you feel like it please come and visit us in chatJohan Larsson 2 days ago
 
@MarcinJuraszek F#ers are normally scattered over different places
 
I put out an ~ad~ no idea if anyone saw it.
 
I'm usually on Jabbr
Previous time I visited this room it was quite empty
 
4:29 PM
Same here
 
I wonder how long before the starred section gets pushed out.
 
I used to join the F# irc until recently
 
@JeroldHaas The pinned messages stay on top for two weeks, the starred is a stack, you can see all starred messages if you click show all
 
@7sharp9 do you have a min?
 
@JeroldHaas I probably dont know the answer
unless its 42?
 
shoot
 
ACE wrecked my lovely formatting...
 
@JeroldHaas All I can suggest is ensure the generated resources exist
 
@7sharp9 have tried clean & rebuild over and over
Resource.designer.fs has the entry.
Are there any files not seen in XS I should look for?
 
@JeroldHaas Do the ids's mentioned exist?
0x7f070001 etc
 
4:37 PM
@7sharp9 yes
 // aapt resource value: 0x7f070001
static member contentArea = 2131165185
 
I would probably try comparing a C# reference app to see where the issue is, I don't know off hand. It could be a resource codegen issue or something else entirely.
 
@7sharp9 Curious if this is simply a "doingitwrong" with Android or how F# is handling the addition of the fragment, as the Java example I've seen works fine when handled this way.
 
The F# codegen is quirky, so I would check a reference app to see the difference
Mind you, Android is quirky, I dont find it pleasant
 
I'm quickly learning this. So many side-effects inherent.
Almost as if there needs to be a layer between F# and Android to sterilise some of the interactions.
 
If you put MonthView.axml in C# do you get comparable generated code?
 
4:43 PM
I haven't even ventured into a C# prototype.
 
@7sharp9 how long does it usually take Xamarin to respond to an application for licenses?
 
@AshtonKJ No idea
 
Damn. Sent them a mail asking about it for non-profits
 
@7sharp9 The 'not found' ID isn't in MonthView.axml it's in Main.axml, that's what's confusing me.
Perhaps I cannot reference the outermost container at OnCreate()?
MainActivity.fs:38
 
@JeroldHaas Could it be similar to this: bugzilla.xamarin.com/show_bug.cgi?id=17390
 
4:53 PM
@7sharp9 Let me re-run and check the log.
 
Thats a subclass of a TestSuiteActivity referenced in main but it could be related...
 
@7sharp9 Doesn't appear related:
[AndroidRuntime] java.lang.RuntimeException: Unable to start activity ComponentInfo{UConferStarter.UConferStarter/uconferstarter.MainActivity}: java.lang.IllegalArgumentException: No view found for id 0x7f070001
 
@AshtonKJ I got mine after 5 days (back in May)
 
@ChristophRüegg cool. Thanks :)
@ChristophRüegg was that for open source? Or non-profit?
 
@AshtonKJ open source
 
5:09 PM
I wasn't aware of the NPC & OS licences...
 
@7sharp9 I'm working on full stack F# support for Xamarin.Forms - that's why the TP questions :)
as far as I can tell, XS doesn't support xaml from F# at the moment - but I should be able to make that work with a modified FsXaml type provider
 
5:45 PM
@ReedCopsey I'm trying to run FsXaml and I'm getting "The debugger cannot continue running the process. Unable to start debugging." when I try to start debugging. heard of this before?
(happened after successful build)
oh, the demos aren't in this solution >.<
just kidding, can't run the demo's either
 
you've built the main solution?
what project in the demos do you have as the startup project?
@toyvo BTW - Was thinking about our chat a bit more last night - do you have a way to handle collections in UI.Next well? that's another thing XAML does in a pretty slick manner...
 
Datatemplates are nice overall, dunno if they make sense in html
 
not as-is - but some manner of handling that conceptually would be really interesting
 
I'll throw in a tab with listboxes in the sample, any requests?
I'm thinking same source different templates & different itemspanels
 
@NETscape Figure out how to get it running?
 
6:03 PM
@ReedCopsey we have some rudimentary support for collections yes. simplest is - one can package up "coarse-grained" collection, so you get something like View<seq<'T>>. We then have some functions to recover finer-grained changes out of those coarse-grained changes, which turns out to be convenient. How does XAML do it?
 
just restarted
 
@toyvo sample in 5
 
@toyvo so - there, the view is done very differently in general - if you take step back
 
@ReedCopsey nope, can't run debugger...
 
there is no hardcoded way to view data in xaml
the default is- you can view any object, nad it's displayed by x.ToString() in a TextBlock (basically - a label with foo.ToString()'s results in it visually)
all of the visuals are handled by something called a DataTemplate - basically, the template for how to present a specific type of data
that's true through the entire stack - so you can have a custom type displayed directly in the view, and if there's a data template for that type defined in "scope" - it'll get used
 
6:05 PM
Anyone here any good at FAKE?
 
@AshtonKJ Maybe a little... what's up?
 
got it
 
@pblasucci wait. I might have figured it out. I was just being stupid
 
@toyvo when you break it up liek that - collections become fairly easy - you just have a type that binds to a collection (can be seq<'a> - though INotifyCollectionChanged is used for "two way" updates)
and each item is displayed based on the data templates
 
@AshtonKJ Ah, no worries.
 
6:07 PM
@ReedCopsey, sure, all that's fairly simple in UI.Next as well
@ReedCopsey interesting things happen when you throw in dynamism and objects/processes with encapsulated state
so basically, you had a collection [1, 2, 3] and then it changed to [2, 4]
 
was just wondering- that lets you make an editor for data in the collection,too?
or just output-only?
 
2 was retained, 1 removed, and 4 added - if you have identity on your items, you can use this information in a useful way
sure, you can construct an editor, but most composition happens in the direction of output
so, erm, suppose you have Model object, with .Add : 'T -> unit; .Remove : 'T -> unit; and .View : View<seq<'T>>
then you can compose multiple UI views out of that, by composing the .View in various ways, and using .Add/.Remove to edit
 
but you can't edit the collection - only a single input portion, in that case, right?
ie: no "data grid" style editing
 
why not? :)
so a sample with "data grid" editing - sounds like it would be useful :)
 
yeah, probably ;)
tough to visualize in my head given the view mechanism
(but TBH I havne't spent much time playing with the samples other than looking at them online)
 
6:14 PM
right
maybe i'm over-simplifying, but I think sharing the Model object among multiple views basically does the trick. Both single items and item collections can be editable/bound.
we def. should work out a grid sample though
here's a TodoList sample - github.com/intellifactory/websharper.ui.next/blob/master/src/… - if you haven't seen already, that's a variation of using a collection of items
we should use some kind of sample viewer that shows types :) it's pretty annoying to read source code without the inferred types
 
mmm
so the only way to get this to work is to build Var<'a> into your model?
is ListModel part of the UI.Next types, too?
 
not the only way, but it's pretty natural sometimes
ListModel is a convenience, thin wrapper on something like ResizeArray, with access checked for reactivity
an alternative style is when your model is a seq<T> where T is an immutable record, for example here -github.com/intellifactory/websharper.ui.next/blob/master/src/… - this is a data point about a U.S. state coming from some CSV
 
6:30 PM
@toyvo Updated the sample perhaps dumb to bloat it with collections stuff.
 
@JohanLarsson oh, cool, thanks!
 
I did the absolute minimum change in the datatemplates, just changed border color. Different templates could render the same data completely different. Master detail style.
Threw in a datagrid now.
 
@toyvo I guess I was saying there's no way to have editable data without using the types in the model?
 
@JohanLarsson I'll check it out, thanks!
@ReedCopsey mm, not sure i 100% understand
@ReedCopsey whatever in your model is editable, is in the end a Var<_> ...
 
@toyvo that's what I don't like
basically, you're forcing a pollution of the model to include types from the view framework
 
6:42 PM
whoah
 
so it's not really a pure "model"
because you can't build an editable model without having Var<_> in there, from what you're saying
(sorry - that probably came across harsh ;) not intended)
 
but isn't that an obvious statement? if your model is a "pure" type, it can never change
no no, keep it coming :) interesting perspective
 
different meaning of pure
 
i also did not consider Var/View to be part of the "view", as in, HTML, layer
 
well, it's only going to work in the context of websharper, right?
 
6:43 PM
the first iteration, yes. we might consider lifting it out
 
ie: if I want to reuse my model (all of my logic and core data types) in a xamarin app - they'd have to be redone completely...
that's what I mean by not pure
I'm having to build my core logic/types around the framework used to view
so they're not just my normal types anymore
 
so you want some vanilla mutable classes to serve as a model
 
well - I want anything to serve as the model
the view tech. I use shouldn't dictate how I create the model
 
well, right, that's why we give you 'T :) that's called polymorphism
 
by definition, the model should be completely unaware of the view/framework/tech/etc that's going to use it
 
6:45 PM
well, exactly
 
but in this case - your model is being created using Var<'a> for types - so it's not "vanilla" types anymore
 
hold on there
in the case of WPF, don't you use some magic, like C# events, INotifyPropertyChanged, etc?
if i give you F# record, type Person = { name: string; age: int }
there's nothing you can do with it since it can't <change> by definition
 
yeah - so, if you do that, the middle layer does something to present/allow portions to be edited
but I don't (necessarily) have to duplicate my types there
 
well, exactly
so Var/View is the functional "middle" layer for marking things as editable and computed
 
6:48 PM
I guess the main difference is WPF standardized on INotifyPropertyChanged,etc - which means that middle layer can also be reusable, since the types are "core" types, and work in other frameworks...
 
that's rather a silly argument :) the reason they are "core" is because Microsoft controls how they are marketed/distributed. Let's not disparage IntelliFactory for not being Microsoft, that's a little unfair
Var/View layer can definitely serve as a dataflow foundation in any CLR lib. So far, our focus is on WebSharper so we haven't bothered with some essential things like thread-safety for multi-threaded GUIs, which are not an issue in JS environment, but it's theoretically possible
to elaborate a bit on type design:
instead of { mutable P : int } properties you can have equivalent { P : ref<int> } - so in our framework, you're basically substituting ref<_> for Var<_> and obtaining implicit dataflow synchronization
 
@toyvo Yeah - I get it - it's actually similar to how I do my WPF middle layer in FSharp.ViewModule - the backing implementation effectively does the same thing, but takes care of all of the INPC issues
conceptually similar approach there
 
oh, that's cool!
i haven't checked it out yet but certainly will
 
It's simplified - and a bit of a mess in some ways - mainly because the notification has to plumb up to the containing type
 
do you have View<View<'T>> -> View<'T>? allowing things like let! notation on computed values.
 
6:53 PM
because INotifyPropertyChanged works off the property name but is done on the type level, not as a "first class value" with notification
no - haven't bothered with anything like that
 
ah, okay, so you just need a little setup per class, and that handles all properties in that class
 
yeah
(my stuff there is doing a lot less - because it's trying to be more XAML/MVVM idiomatic in a lot of ways - I was more referring to the Var<_> concept, which is very similar to how I handle the backing storage...)
 
that works though, that's the only thing that really matters :)
we're coming way off the "functional/ML" angle, so more natural for programmers who (almost) never write classes, and totally weird for programmers who write classes all the time
 
Can you use PropertyChanged?
Also models that have properties that are bound to make sense to be mutable imo.
 
right, so in F# you say type Model = { P1 : Var<int>; P2 : Var<string> } ...
 
6:58 PM
Can you link the code for Var?
 
you mean how Var is implemented?
 
mmm
 
re: PropertyChanged - it would be doable to plug it into Var layer, but would require some plumbing. Haven't really tried something like this
@JohanLarsson unfortunately I can't atm, we want to submit a paper to IFL this year including some details on the change-propagation algorithm, will likely OSS after that
also implementation would be not very easy to understand without much commentary :) it's not really rocket science, but not entirely trivial
 
propertychanged is not supernice but it is built in and used by wpf and silverlight (I guess)
 
7:01 PM
it's used by a lot of things now
 
we aim for nice properties such as efficient <latest> change propagation, GC-friendliness, dynamic views (let!)
 
mainly because it got pushed into the BCL and portable libs, etc
 
you can do things like View.Do { let! x = someView; if ok x then .. else .. }
 
@ReedCopsey I have started using it for many things, have a sweet extension method that filters it with and expression and turns it into an observable then rx away on it.
 
oh, Rx, the abomination :)
 
7:04 PM
Idea for the Var guy: what about having Independent<T> Dependent<T>?
 
View<_> effectively becomes a dependent<T>, I believe
 
disclaimer - i don't like Rx maybe I'm just too stupid for it, but totally respect people who use it effectively :)
 
Var<_> would be independent by its nature
 
I mean like Firstname LastName FullName
 
@JohanLarsson yeah - View combinators handle that, if I understand correctly
 
7:06 PM
let FullName : View<string * string> = View.Map2 (fun fn ln -> (fn, ln)) FirstName.View LastName.View
given FirstName : Var<string> and LastName : Var<string>
 
ok, I think it could make some sense in the model, making degrees of freedom clear. Downside is pollution :)
 
mmm, pollution? :)
 
I should probably read more and write less
 
you mean having Var<_> invade your types
but at least you don't have INotifyPropertyChanged invade your types ;)
 
yeah I agree with Reed that the model knowing about the View is not supernice.
 
7:08 PM
hm, heh
i feel like a View word is just a bad word to describe this concept
it we named it something else, you might feel completely fine about it :)
 
@toyvo inpc is different imo, cos it does not open the door for other stuff leaking from view > model
 
@toyvo I agree- View is the wrong term there
 
we'll def consider renaming
 
@toyvo well, it also depends a bit on how deployment works, and how reusable it would be
 
View is typcially xaml only in wpf
 
7:09 PM
"View" has a different meaning here - but it sounds too much like other stuff
that wasn't my problem, though ;)
 
in Model-View terms, you're talking about View if you have values that mention HTML or other presentation types, like View<Doc>, or Doc
otherwise you're describing your model in terms of dataflow, you're just saying that some parts are computed
like in a spreadsheet
there's data cells and there're formula cells
 
yeah - it's almost like View<_> here is more of Computed<_> - though not sure what the right term would be
 
what Var/View layer really is, you can think of it as a spin on Rx IObservable, only well-behaved (well, simpler to use). View<'T> is a time-varying, typically computed, 'T. Unlike Rx, how many times it changes does not matter, what matters is the <current> value
right, Computed sounds better. we'll have to brainstorm
 
I do think View is going to confuse people - because the term, while correct in many ways, is actually going to have the wrong connotation
 
yea
 
7:13 PM
and once you do View.Map - it's not purely a view of the original - as much as a transformation of it
 
right
 
@7sharp9 sorted
 
7:59 PM
@toyvo is View.Sink effectively like an event?
 
almost, it guarantees it will push out the latest value, like an event
with dataflow it's common that your dataflow system is floating inside an imperative soup. so it has to have input signals and output signals to interact with the environment, View.Sink is output, and Var<_> are inputs
in UI.Next, we end up not using View.Sink much, instead we construct reactive documents (HTML-ish) with Doc.EmbedView : View<Doc> -> Doc
View.Sink is used once in the app to "run" the document
 
I was just wondering if that would be the main place where you coul dhook into changes in a view
 
8:14 PM
indeed, that's the only part currently exposed
 
ListModel only exposes changes as an entire collection, then?
 
yes
 
how do you avoid recreating the entire view when there's an add/remove?
(not trying to be a pain - just trying to think of how I'd use this in practice if I built my stuff around it...)
 
sure - please keep this qns coming :)
you are right that a list-model could have a more effective way to propagate deltas
for small collections, however, a very basic solution works well, which diffs two seq<'T> values using identity on 'T
there's a View.Convert* family of functions for this currently
 
So, I've had some folks tell me that if you're doing proper FP, you don't need Dependency Injection. Anyone care to comment?
 
8:25 PM
isn't the statement more "you don't need a container"?
 
maybe? how're we defining container?
 
folks who use ML functors claim it's pretty nice for this sort of thing. not having those in F#, hyper-parametric code becomes quite cumbersome. so i guess if DI works for you, why not..
Scala has a its own unique brand of craziness around this topic with traits/mixins. I looked at it briefly, not really sure about it at all
 
Fair. That's similar to how Rust handles things
 
@pblasucci I've read that statement as well
 
Though Rust traits feel more like TypeClasses than Scala traits
 
8:29 PM
anyone have FSharp.ViewModule open?
maybe you @ReedCopsey?
 
@pblasucci partial application is supposed to "replace" DI but I haven't yet made the connection in my head.
 
I mean, I'm only thinking about it b/c I'm doing stuff with SignalR and it basically forces my hand
@JeroldHaas If that's true, I fear I've greatly misunderstood partial application and DI
:-)
 
@pblasucci using the search terms 'dependency injection partial application' comes up with a good number of blog entries
 
ah
thanks. Will research
as an aside, SignalR has some ugly API non-sense in it
 
@pblasucci are you stuck on the ED library?
 
8:35 PM
ED ?
 
Or, does it seem the most acceptable of the event driven libraries?
 
@JeroldHaas I'm not sure I understand the question
 
For some reason I recall a library similar to signalR, but the name escapes me at the moment.
 
Ah
Mostly, I've got some data I want to stream to the browser
 
So, using it solely for websockets?
 
8:38 PM
although, "stream" might more realistically mean "push"
 
anyone have problems with doing a Find All in VS2013?
 
My understanding was that signalR was much more involved than that.
 
in f# project
 
@NETscape I've had problems doing find all in VS for years.
No matter the language.
 
@JeroldHaas It has lots of fallbacks in case WebSockets aren't supported on the client
 
8:39 PM
not responding --> vs restarts
?
 
Exactly what happens to me @NETscape.
 
I also didn't really look for a server-side WebSockets server that slots in OWIN
 
@pblasucci starting to sound like you're working on a trading platform :)
 
@JeroldHaas Funnily enough... It's a fake trading platform
Actually, it's over-glorified demo code
 
@NETscape What's up?
 
8:42 PM
nevermind sounds like its common
 
but the example domain is trading
 
I was trying to do a find all on "EntityErrors" and VS was crashing
 
@NETscape it happens more often for larger projects.
 
@NETscape Do you have vs power tools installed?
 
@JeroldHaas I've got something working. And I'm not super fussed by it. But it needed a bit of DI to glue everything together
Now I'm just trying to see if that's SignalR's fault, OWIN's fault, or my fault
:)
 
8:44 PM
uhhmmmm
I don't think so
 
1st Xamarin crash of the day. Not bad for beta stream.
I suppose I should have checked for updates earlier... :)
@pblasucci since you're trying to wire in a "normally C#" library, DI may be your only choice
 
arg
I'm trying to implement a specific delegate type with a function
and the framework has 2 versions (wtih the same name) - one generic, and one non-generic
ie: delegate Foo and delegate Foo<'a>
 
@JeroldHaas yup. that's the realization I'm slowly coming too
 
How do I force the type system to pick the non-generic version? It keeps giving me a type mismatch because it's pick the generic one :(
 
It's also the reason why I've got a method which returns null to indicate no further action needs to be taking. C# APIs get a little sickening
 
8:50 PM
type alias?
 
not sure how to type alias it either
 
@ReedCopsey type myDelegate = delegate of Foo -> whateveritoutputs
Fill in your own signature ;)
I have to say delegates are my least favourite thing in F#
They come off messy to me
 
mmm -= yeah - I'm really confused - I suspect I'm doing something stupid, but mainly because I almost never use delegates from F#
type ChangedDelegate = delegate of BindableObject * obj * obj -> unit

type public ViewController() =
    static let customChanged (bindable:BindableObject, oldValue:obj, newValue:obj) =
        ()

    static let changed : ChangedDelegate = new ChangedDelegate(customChanged)
I've got that - and it's erroring out creating the delegate
nevermind - figured i9t out - I'm just being stupid
 
Was it currying vs. tupling?
Inquiring minds...
 
yeah
 
8:57 PM
nods
 
never a problem until I start trying to interface with C# libs :p
 
Blame C# for your woes, it makes using F# better. :)
 
but I'm not sure why this works and the other didn't - since I was calling a C# function...
 
Are there any C# libraries that support currying? I thought that was a .NET & F# thing.
 
@JeroldHaas So I skimmed some materials on PA as DI. Seems like the main premise is: "An HOF obviates DI".
But this only holds if you're designing with HOFs
So maybe DI is best view as HOF for classes
???
 
9:01 PM
@JeroldHaas no - which is why I'm confused at the moment
 
Which is consistent with @toyvo mentioning ML functors
 
@pblasucci I think with classes, yes, you'd have to use DI - classes aren't pure FP
@ReedCopsey You mean currying is the one that works?
 
@JeroldHaas yeah :S
 
HOF obviates DI in the same way as every language is equivalent to a Turing machine
that is, it's theoretically true, but in practice can be very cumbersome
 
@toyvo Agreed
 
9:03 PM
@ReedCopsey And if you change the alias's signature to tupled, does it work?
 
@JeroldHaas or at least, its the only one that compiles - when I do it tupled, it fails
 
o.O
That is rather confusing.
 
So, revisiting my code with this new perspective, I'm left with a design decision: an interface (plus DI), or a bunch of little functions passed to a ctor
 
yeah - look at the code above - it's tupled, and it won't compile - but if I make customChanged curried, it works
 
But if you make ChangedDelegate tupled it won't?
 
9:06 PM
@JeroldHaas It is tupled - you can't make a delegate specification that's curried
if you do - you get error FS0950: Delegate specifications must not be curried types.
hence my confusion
 
@ReedCopsey

// Delegate1 works with tuple arguments.
type Delegate1 = delegate of (int * int) -> int
// Delegate2 works with curried arguments.
type Delegate2 = delegate of int * int -> int
...But even in MSDN the example isn't 100% clear to me...
They have an invocation function.
 
tha'tll make the first part work - but I need it to work with this C# defined delegate
and it wants it the other way around
which is just odd
 
Oh, well! Square peg, square hole! :D
 
it's compiling now - hopefully it won't blow up when I go to use it :p
 
May want to put a comment in there in case it does...
Hah! April dashed off while I wasn't looking.
@ReedCopsey Are you finding from your work with UI elements that there's an awful large amount of use of ignore?
 
9:20 PM
@JeroldHaas Not too awful - I do end up ignoring a fair bit though ;)
 
I can't figure out a way of formatting that ugly chad so it's not bothersome to me.
 
I tend to pipe it most of the time
 
I may end up using currying
still trying to decide which I like, aesthetically
I'll follow left-most importance rule and use the pipe
 
9:53 PM
@JeroldHaas What fixed your issue?
 
@7sharp9 inner container object inside main container
I guess I can't assign Fragments to outermost for some reason
 
I ha to dash away to watch compilers build many times :-\
 
I looked into an example online and saw a FrameLayout was used inside the LinearLayout
So, was my ignorance to Android, after all. :)
 
Android is a bit wonky
iOS is loads better to program
 
Well good I'll be much happier getting the Android version complete first, then!
 
9:56 PM
CAnt believe its almost August
 
still four minutes
 
64
CAnt believe Im still working
 
You are up rather late.
 
@7sharp9 you cubed me
 
Heh.
 
9:58 PM
I never go to bed before midnight
 
I do when I have help.
 
Problem is Im building things that are both cool and really hard
 

« first day (85 days earlier)      last day (3439 days later) »