Tumgik
#bug fables div
vulturereyy · 10 months
Text
Tumblr media
I am not immune to mother hen old beetle
(just started BF - no spoilers please! :)
184 notes · View notes
timeturner-jay · 1 year
Note
Also, alternatively (or additionally, if you're okay with it) I'd like to see an Eetl story. Word: Friendship. Thanks a ton if you do either of my requests, have a great day!
He sees them come and go, and can’t help but feel a little wistful whenever he catches sight of them. Teams are often close, of course – by the very nature of the job, you need to rely on each other if you want to survive. But Team Snakemouth’s bond feels special in a way he can’t really describe; it’s in the gentle curve of Vi’s small, happy smile when she thinks no one is looking. It’s in the unapologetic confidence with which Leif drops his usual calm façade whenever he’s challenged to some silly game. It’s in the way Kabbu no longer recklessly charges into danger, and instead trusts the other two to stay safe and have his back. Eetl only knows as much as they’re willing to tell him, but he sees them often, and he’s seen how they’ve grown, with and around each other. He’s happy for them, but some part of him, silently, envies their closeness. He wonders, sometimes, where he went wrong with Div.
For all that Eetl is around a lot of bugs all the time, he doesn't seem to have that many close friends, does he? :')
19 notes · View notes
flame-shadow · 1 year
Text
Tumblr media
Bugaria Pier Bug Fables NPC Collab [6/23]
Background - @flame-shadow Editor - @flame-shadow
Character Credits Ship Captain - @flame-shadow Blue Sailor - @trapitorag Eyepatch Sailor - @flame-shadow Cook - @motheatencrow Cook Assistant - lamverykarpy Div - @lemmykirby Red Ant Diver - @lemmykirby
[click here to see the entire collection]
48 notes · View notes
kereruatbugaria · 2 years
Text
Tumblr media
Team Eetl (only my imagine)
96 notes · View notes
donein30minutes · 1 year
Text
Tumblr media
Bugust Challenge Day 16 Out on Holiday 8.16.23
Done in 30 minutes
12 notes · View notes
hustlecandy · 1 year
Text
And now the final part! Thanks for the nice comments on the last two posts, it rly means a lot!! ^ ^
Tumblr media
Day (technically 19 but) 21: Berry
(I know I accidentally skipped this one in the last post I am sorry. Anyway this is the result of me watching too many JimmyHere YLYL streams while drawing)
Tumblr media
Day 22: Fungal
"Ah... Our favorite. Fate has smiled upon us."
"The textures work so well together!"
"...A bit too savoury. We shoulda put honey in it!"
(Imma be honest. I didn't get this line on my first playthrough, so when I did on my second I about broke down crying. Fate has smiled upon them,,, ;v;)
Tumblr media
Day 23: Flight
"We can fly as high as our hearts wish to! Soar to UNSEEN HEIGHTS!"
(The fact that Kabbu is terrified of heights but loves bounceshrooms is very underrated imo. I think he wants to overcome his fear someday and maybe learn how to fly on his own...)
Tumblr media
Day 24: Plant Enchanter
(What did you guys name your Chompys? I named mine Amarylis, intentionally spelt wrong due to character limits. I just think it's a pretty word :>)
Tumblr media
Day 25: Lost
"Everyone left on the rescue ferry...but I chose to stay. There's such a soothing beat… How could I leave this place behind? I've gotta find where it comes from...I've...gotta..."
(You ever wonder what happened to the bug who left that note on the Peacock Spider's island? I mean, they're obviously dead, but...I still wonder.)
Tumblr media
Day 26: Alternate Universe
(You ever make an AU based on a single line of dialogue & some concept art that gets stuck in your brain and refuses to leave? Yeah, that's what this AU is. The placeholder title is 'The Upcoming Storm', and is an answer to two questions: What if the Roaches followed through with their plans for a Thunder cordyceps? And what if one of Leif's ancestors decided to look into their disappearance?
So this is Cerice, their ridiculously energetic lesbian daughter [who they don't know is their daughter yet; she doesn't remember that they're her parent either] and host of the Thunder cordyceps! Don't worry, Grandpa and Muze still exist - Grandpa's her son. However, Team Snakemouth is split into two teams - Team Snake and Team Mothden - but they still work together. I might make a separate post abt it if anyone wants me to ^^)
Tumblr media
Day 27: Song
(Who's a better character for this prompt than the composer's self-insert, lol)
Tumblr media
Day 28: Medal
(I am a very firm believer in Poisoned Leif supremacy. Sorry Poisoned Vi and Kabbu, smashing bosses over the head with glaciers is just so viscerally satisfying)
[I didn't have any ideas for Boss Rush, sorry]
Tumblr media
Day 30: Bee
"You know...I was about her age when I came to my first festival. Everything was so much cooler than the boring Bee Kingdom! It really made me want to see the world!"
(I really wish they elaborated more on Vi deciding to become an explorer after her first festival! It's a very cute motivation & had a lotta story potential ;^;)
Tumblr media
Day 31: Everlasting
"The Usurper, Grasping For Power..."
(Hoaxe is a fun final boss but god DAMN did he kick my ass a hundred times over. It's a good thing I decided to max my rank and stock up on Queen's Dinners, Berry Smoothies & Miracle Shakes the 5th time around)
14 notes · View notes
torentialtribute · 6 years
Text
Tiger Woods blunders over new regulation to drop out of contention at the Players Championship
Imagine being a bug on the telephone when former Open Champion David Duval rank his friend Tiger Woods on Friday night and informed him his first quadruple bogey in 1,229 career holes at the Players Championship need never have happened.
And that Woods had tossed no fewer than three shots away on the fabled island green 17th hole because he wasn't fully aware of the new rule regarding where he was allowed to drop the ball on that iconic par three.
No wonder the impact of being informed he should have been a manageable six shots behind the halfway leaders – Rory McIlroy and Tommy Fleetwood – rather than a distant nine strokes appeared to deflate Woods in yesterday's third round.
     Tiger Woods' first quadruple bogey in his 1,229 career holes need never have happened
with two bogeys in the first three holes.
If truth told, it disappeared with that phone call on Friday night.
But he did allow himself a broad smile when he got to the 17th –— and knocked it stiff. From a knockout seven one day to an easy two.
What a game.
Woods had caused shockwaves to ripple across the Florida venue when he ruined a good second round by putting two balls in the water on the 17th.
To give you an idea how straightforward the hole was on a day with little wind, no other player who went out in the morning put one ball in the drink.
     He tossed three shots away because he was unaware of where he could drop the ball
Kudos to Duval and his fellow analysts at the Golf Channel for observing that Woods should have only put one ball in as well. Because of where the flag was – towards the back of the green – and where his ball actually fell into the water, under the new rules Woods was perfectly entitled to drop the ball on the walkway to the green.
' It was probably the only pin on that green where you could keep the point where the ball went into the hazard between himself and the hole and not standing in the water, "explained PGA Tour rules official Mark Russell.
Woods should have had an easy chip, therefore, or just a putt to the flag, rather than the shot from the drop area that he took on and also put in the water.
At most, he would have got down in two more shots for a bogey.
He might as well have holed it from 30ft for an unlikely par. Either way, it would have been a dramatically different outcome to the seven he did write down. Instead of falling from tied 8th to tied 57th, he would still have been right in the hunt.
Duval said: "I reached out to Tiger on Friday afternoon and told me he didn't realize that it had leg an option. "
                   Just to make Woods' day, plum metering down the leaderboard meant a third round alongside Kevin Na, who might be the slowest player in golf.
He was certainly the slowest yesterday, as he dropped eight shots to par in his first 10 holes.
Woods did his best to entertain another mammoth gallery but under cool, cloudy conditions —and not for the first time this year – he struggled on the greens
it wasn't until he got to the driveable, par-four 12th that he mustered his first birdie and that was a two-putt.
Another birdie followed at the par five 16th
So to the 17th. What a contrast to the excitement when he had walked on to that tee a day earlier. What a contrast in the result as well.
Woods who finally carded a 72, will finish up today and then play one more event, the WGC Match Play in Texas next week, before the Masters next month.
Among the early finishers, Players debutant Matt Wallace shot 70 to move into the top 40 on four under, while Matt Fitzpatrick, runner-up in the Arnold Palmer Invitational last week, shot 72 to stand on three under.
     Woods looked deflated as he fell nine shots behind the midway leaders at Sawgrass
lAdri Arnaus and Guido Migliozzi share the lead going into the final round of the Kenya Open.
Arnaus fired a six-under-par 65 and Migliozzi carded a 64 to sit on the top of the leaderboard at 14 under.
Tiger Woods could have avoided a seven in his second round if only hey ' d leg aware of new rules.
Given where his first tee shot had crossed the yellow hazard beyond the green (1), Woods could actually have tasks a penalty drop within a club's length of that point (2) rather than heading to the drop zone.
The rules state that a player can drop a ball behind a hazard, keeping the point where the ball is crossed between himself and the hole.
Source link
0 notes
techscopic · 7 years
Text
Learning about the F# SAFE stack – Suave.io, Azure, Fable, Elmish
Last month I looked at a Functional Web with ASP.NET Core and F#’s Giraffe. Giraffe is F# middleware that takes ASP.NET Core’s pipeline in a new direction with a functional perspective. However, Giraffe isn’t the only F# web stack to choose from! There’s Freya, WebSharper, and there’s also a very interesting and quite complete story with The SAFE Stack.
The SAFE Stack is an open source stack, like LAMP, or WAMP, or other acronym stacks, except this one is all open source .NET with a functional perspective. From the announcement blog:
Suave model for server-side web programming
Azure for cloud-based systems
Fable for Javascript-enabled applications.
Elmish for an easy-to-understand UI programming mode
To be clear, while this is a prescriptive stack, it’s not a stack that forces you to do anything. You can swap bits out as you please.
Fable is particularly interesting as it’s an F# to JavaScript transpiler. Try Fable online here http://fable.io/repl and turn F# into JavaScript LIVE! Their Sudoku sample is particularly impressive.
Here’s two small – but interesting – examples where F# code ends up as JavaScript which ends up creating ReactJS components:
let words size message = R.span [ Style [ !!("fontSize", size |> sprintf "%dpx") ] ] [ R.str message ] let buttonLink cssClass onClick elements = R.a [ ClassName cssClass OnClick (fun _ -> onClick()) OnTouchStart (fun _ -> onClick()) Style [ !!("cursor", "pointer") ] ] elements
Then later in a Menu.fs that also turns into JavaScript eventually, you can see where they conditionally render the Button for logout, or links for for other Views for the Home Page or Wishlist. You can read lots more about Fable over at the Compositional IT blog.
let view (model:Model) dispatch = div [ centerStyle "row" ] [ yield viewLink Home "Home" if model.User <> None then yield viewLink Page.WishList "Wishlist" if model.User = None then yield viewLink Login "Login" else yield buttonLink "logout" (fun _ -> dispatch Logout) [ str "Logout" ] ]
Elmish for F# takes the Model View Update (MVU) architecture and brings it to F# and the browser. There’s a good breakdown of the value Elmish provides also at the Compositional IT blog.
Suave is its own cross platform Web Server. Here’s Hello World in Suave.
open Suave startWebServer defaultConfig (Successful.OK "Hello World!")
Suave has been around for while and gets better all the time. I blogged about it in 2015 and got it running on Azure. My blog post is not a best practice any more – it was a spike attempt by me – and fortunately they’ve moved on and improved things.
Here’s Suave getting set up within the sample app. Check out how they route HTTP Verbs and URL paths.
let serverConfig = { defaultConfig with logger = Targets.create LogLevel.Debug [|"ServerCode"; "Server" |] homeFolder = Some clientPath bindings = [ HttpBinding.create HTTP (IPAddress.Parse "0.0.0.0") port] } let app = choose [ GET >=> choose [ path "/" >=> Files.browseFileHome "index.html" pathRegex @"/(public|js|css|Images)/(.*)\.(css|png|gif|jpg|js|map)" >=> Files.browseHome path "/api/wishlist/" >=> WishList.getWishList loadFromDb ] POST >=> choose [ path "/api/users/login" >=> Auth.login path "/api/wishlist/" >=> WishList.postWishList saveToDb ] NOT_FOUND "Page not found." ] >=> logWithLevelStructured Logging.Info logger logFormatStructured startWebServer serverConfig app
Very interesting stuff! There are so many options in .NET open source. I’ll be doing podcasts on this stack soon.
Trying out the SAFE Stack
If you’re using Visual Studio Community 2017, make sure you’ve got F# support included. I double-checked under Individual components. You can run the VS2017 installer multiple time and add and remove stuff without breaking things, so don’t worry. If you are using other versions of VS, check here http://ift.tt/1fhIFeE to get the right download for your machine. If you’re using Visual Studio Code, you’ll want the Ionide F# plugin for Code.
Once I had node and yarn installed, it was easy to try out the sample app and get it running locally with “build run.” It uses DotNetWatcher, so you can just keep it running in the background and work on your code and it’ll recompile and restart as you go.
The complete “SAFE” stack demo website is LIVE here http://ift.tt/2fZ76H0 (login test/test/) and all the source code for the app is here: http://ift.tt/2g1BroF.
Sponsor: Do you know how many errors, crashes and performance issues your users are experiencing? Raygun installs in minutes. Discover problems you didn’t even know about and replicate bugs with greater speed and accuracy. Learn more!
© 2017 Scott Hanselman. All rights reserved.
      Learning about the F# SAFE stack – Suave.io, Azure, Fable, Elmish syndicated from http://ift.tt/2wBRU5Z
0 notes
just4programmers · 7 years
Text
Learning about the F# SAFE stack - Suave.io, Azure, Fable, Elmish
Last month I looked at a Functional Web with ASP.NET Core and F#'s Giraffe. Giraffe is F# middleware that takes ASP.NET Core's pipeline in a new direction with a functional perspective. However, Giraffe isn't the only F# web stack to choose from! There's Freya, WebSharper, and there's also a very interesting and quite complete story with The SAFE Stack.
The SAFE Stack is an open source stack, like LAMP, or WAMP, or other acronym stacks, except this one is all open source .NET with a functional perspective. From the announcement blog:
Suave model for server-side web programming
Azure for cloud-based systems
Fable for Javascript-enabled applications.
Elmish for an easy-to-understand UI programming mode
To be clear, while this is a prescriptive stack, it's not a stack that forces you to do anything. You can swap bits out as you please.
Fable is particularly interesting as it's an F# to JavaScript transpiler. Try Fable online here http://fable.io/repl and turn F# into JavaScript LIVE! Their Sudoku sample is particularly impressive.
Here's two small - but interesting - examples where F# code ends up as JavaScript which ends up creating ReactJS components:
let words size message = R.span [ Style [ !!("fontSize", size |> sprintf "%dpx") ] ] [ R.str message ] let buttonLink cssClass onClick elements = R.a [ ClassName cssClass OnClick (fun _ -> onClick()) OnTouchStart (fun _ -> onClick()) Style [ !!("cursor", "pointer") ] ] elements
Then later in a Menu.fs that also turns into JavaScript eventually, you can see where they conditionally render the Button for logout, or links for for other Views for the Home Page or Wishlist. You can read lots more about Fable over at the Compositional IT blog.
let view (model:Model) dispatch = div [ centerStyle "row" ] [ yield viewLink Home "Home" if model.User <> None then yield viewLink Page.WishList "Wishlist" if model.User = None then yield viewLink Login "Login" else yield buttonLink "logout" (fun _ -> dispatch Logout) [ str "Logout" ] ]
Elmish for F# takes the Model View Update (MVU) architecture and brings it to F# and the browser. There's a good breakdown of the value Elmish provides also at the Compositional IT blog.
Suave is its own cross platform Web Server. Here's Hello World in Suave.
open Suave startWebServer defaultConfig (Successful.OK "Hello World!")
Suave has been around for while and gets better all the time. I blogged about it in 2015 and got it running on Azure. My blog post is not a best practice any more - it was a spike attempt by me - and fortunately they've moved on and improved things.
Here's Suave getting set up within the sample app. Check out how they route HTTP Verbs and URL paths.
let serverConfig = { defaultConfig with logger = Targets.create LogLevel.Debug [|"ServerCode"; "Server" |] homeFolder = Some clientPath bindings = [ HttpBinding.create HTTP (IPAddress.Parse "0.0.0.0") port] } let app = choose [ GET >=> choose [ path "/" >=> Files.browseFileHome "index.html" pathRegex @"/(public|js|css|Images)/(.*)\.(css|png|gif|jpg|js|map)" >=> Files.browseHome path "/api/wishlist/" >=> WishList.getWishList loadFromDb ] POST >=> choose [ path "/api/users/login" >=> Auth.login path "/api/wishlist/" >=> WishList.postWishList saveToDb ] NOT_FOUND "Page not found." ] >=> logWithLevelStructured Logging.Info logger logFormatStructured startWebServer serverConfig app
Very interesting stuff! There are so many options in .NET open source. I'll be doing podcasts on this stack soon.
Trying out the SAFE Stack
If you're using Visual Studio Community 2017, make sure you've got F# support included. I double-checked under Individual components. You can run the VS2017 installer multiple time and add and remove stuff without breaking things, so don't worry. If you are using other versions of VS, check here http://fsharp.org/use/windows/ to get the right download for your machine. If you're using Visual Studio Code, you'll want the Ionide F# plugin for Code.
Once I had node and yarn installed, it was easy to try out the sample app and get it running locally with "build run." It uses DotNetWatcher, so you can just keep it running in the background and work on your code and it'll recompile and restart as you go.
The complete "SAFE" stack demo website is LIVE here http://fable-suave.azurewebsites.net (login test/test/) and all the source code for the app is here: https://github.com/SAFE-Stack/SAFE-BookStore.
Sponsor: Do you know how many errors, crashes and performance issues your users are experiencing? Raygun installs in minutes. Discover problems you didn't even know about and replicate bugs with greater speed and accuracy. Learn more!
© 2017 Scott Hanselman. All rights reserved.
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
0 notes
techscopic · 7 years
Text
Learning about the F# SAFE stack – Suave.io, Azure, Fable, Elmish
Last month I looked at a Functional Web with ASP.NET Core and F#’s Giraffe. Giraffe is F# middleware that takes ASP.NET Core’s pipeline in a new direction with a functional perspective. However, Giraffe isn’t the only F# web stack to choose from! There’s Freya, WebSharper, and there’s also a very interesting and quite complete story with The SAFE Stack.
The SAFE Stack is an open source stack, like LAMP, or WAMP, or other acronym stacks, except this one is all open source .NET with a functional perspective. From the announcement blog:
Suave model for server-side web programming
Azure for cloud-based systems
Fable for Javascript-enabled applications.
Elmish for an easy-to-understand UI programming mode
To be clear, while this is a prescriptive stack, it’s not a stack that forces you to do anything. You can swap bits out as you please.
Fable is particularly interesting as it’s an F# to JavaScript transpiler. Try Fable online here http://fable.io/repl and turn F# into JavaScript LIVE! Their Sudoku sample is particularly impressive.
Here’s two small – but interesting – examples where F# code ends up as JavaScript which ends up creating ReactJS components:
let words size message = R.span [ Style [ !!("fontSize", size |> sprintf "%dpx") ] ] [ R.str message ] let buttonLink cssClass onClick elements = R.a [ ClassName cssClass OnClick (fun _ -> onClick()) OnTouchStart (fun _ -> onClick()) Style [ !!("cursor", "pointer") ] ] elements
Then later in a Menu.fs that also turns into JavaScript eventually, you can see where they conditionally render the Button for logout, or links for for other Views for the Home Page or Wishlist. You can read lots more about Fable over at the Compositional IT blog.
let view (model:Model) dispatch = div [ centerStyle "row" ] [ yield viewLink Home "Home" if model.User <> None then yield viewLink Page.WishList "Wishlist" if model.User = None then yield viewLink Login "Login" else yield buttonLink "logout" (fun _ -> dispatch Logout) [ str "Logout" ] ]
Elmish for F# takes the Model View Update (MVU) architecture and brings it to F# and the browser. There’s a good breakdown of the value Elmish provides also at the Compositional IT blog.
Suave is its own cross platform Web Server. Here’s Hello World in Suave.
open Suave startWebServer defaultConfig (Successful.OK "Hello World!")
Suave has been around for while and gets better all the time. I blogged about it in 2015 and got it running on Azure. My blog post is not a best practice any more – it was a spike attempt by me – and fortunately they’ve moved on and improved things.
Here’s Suave getting set up within the sample app. Check out how they route HTTP Verbs and URL paths.
let serverConfig = { defaultConfig with logger = Targets.create LogLevel.Debug [|"ServerCode"; "Server" |] homeFolder = Some clientPath bindings = [ HttpBinding.create HTTP (IPAddress.Parse "0.0.0.0") port] } let app = choose [ GET >=> choose [ path "/" >=> Files.browseFileHome "index.html" pathRegex @"/(public|js|css|Images)/(.*)\.(css|png|gif|jpg|js|map)" >=> Files.browseHome path "/api/wishlist/" >=> WishList.getWishList loadFromDb ] POST >=> choose [ path "/api/users/login" >=> Auth.login path "/api/wishlist/" >=> WishList.postWishList saveToDb ] NOT_FOUND "Page not found." ] >=> logWithLevelStructured Logging.Info logger logFormatStructured startWebServer serverConfig app
Very interesting stuff! There are so many options in .NET open source. I’ll be doing podcasts on this stack soon.
Trying out the SAFE Stack
If you’re using Visual Studio Community 2017, make sure you’ve got F# support included. I double-checked under Individual components. You can run the VS2017 installer multiple time and add and remove stuff without breaking things, so don’t worry. If you are using other versions of VS, check here http://ift.tt/1fhIFeE to get the right download for your machine. If you’re using Visual Studio Code, you’ll want the Ionide F# plugin for Code.
Once I had node and yarn installed, it was easy to try out the sample app and get it running locally with “build run.” It uses DotNetWatcher, so you can just keep it running in the background and work on your code and it’ll recompile and restart as you go.
The complete “SAFE” stack demo website is LIVE here http://ift.tt/2fZ76H0 (login test/test/) and all the source code for the app is here: http://ift.tt/2g1BroF.
Sponsor: Do you know how many errors, crashes and performance issues your users are experiencing? Raygun installs in minutes. Discover problems you didn’t even know about and replicate bugs with greater speed and accuracy. Learn more!
© 2017 Scott Hanselman. All rights reserved.
      Learning about the F# SAFE stack – Suave.io, Azure, Fable, Elmish syndicated from http://ift.tt/2wBRU5Z
0 notes
techscopic · 7 years
Text
Learning about the F# SAFE stack – Suave.io, Azure, Fable, Elmish
Last month I looked at a Functional Web with ASP.NET Core and F#’s Giraffe. Giraffe is F# middleware that takes ASP.NET Core’s pipeline in a new direction with a functional perspective. However, Giraffe isn’t the only F# web stack to choose from! There’s Freya, WebSharper, and there’s also a very interesting and quite complete story with The SAFE Stack.
The SAFE Stack is an open source stack, like LAMP, or WAMP, or other acronym stacks, except this one is all open source .NET with a functional perspective. From the announcement blog:
Suave model for server-side web programming
Azure for cloud-based systems
Fable for Javascript-enabled applications.
Elmish for an easy-to-understand UI programming mode
To be clear, while this is a prescriptive stack, it’s not a stack that forces you to do anything. You can swap bits out as you please.
Fable is particularly interesting as it’s an F# to JavaScript transpiler. Try Fable online here http://fable.io/repl and turn F# into JavaScript LIVE! Their Sudoku sample is particularly impressive.
Here’s two small – but interesting – examples where F# code ends up as JavaScript which ends up creating ReactJS components:
let words size message = R.span [ Style [ !!("fontSize", size |> sprintf "%dpx") ] ] [ R.str message ] let buttonLink cssClass onClick elements = R.a [ ClassName cssClass OnClick (fun _ -> onClick()) OnTouchStart (fun _ -> onClick()) Style [ !!("cursor", "pointer") ] ] elements
Then later in a Menu.fs that also turns into JavaScript eventually, you can see where they conditionally render the Button for logout, or links for for other Views for the Home Page or Wishlist. You can read lots more about Fable over at the Compositional IT blog.
let view (model:Model) dispatch = div [ centerStyle "row" ] [ yield viewLink Home "Home" if model.User <> None then yield viewLink Page.WishList "Wishlist" if model.User = None then yield viewLink Login "Login" else yield buttonLink "logout" (fun _ -> dispatch Logout) [ str "Logout" ] ]
Elmish for F# takes the Model View Update (MVU) architecture and brings it to F# and the browser. There’s a good breakdown of the value Elmish provides also at the Compositional IT blog.
Suave is its own cross platform Web Server. Here’s Hello World in Suave.
open Suave startWebServer defaultConfig (Successful.OK "Hello World!")
Suave has been around for while and gets better all the time. I blogged about it in 2015 and got it running on Azure. My blog post is not a best practice any more – it was a spike attempt by me – and fortunately they’ve moved on and improved things.
Here’s Suave getting set up within the sample app. Check out how they route HTTP Verbs and URL paths.
let serverConfig = { defaultConfig with logger = Targets.create LogLevel.Debug [|"ServerCode"; "Server" |] homeFolder = Some clientPath bindings = [ HttpBinding.create HTTP (IPAddress.Parse "0.0.0.0") port] } let app = choose [ GET >=> choose [ path "/" >=> Files.browseFileHome "index.html" pathRegex @"/(public|js|css|Images)/(.*)\.(css|png|gif|jpg|js|map)" >=> Files.browseHome path "/api/wishlist/" >=> WishList.getWishList loadFromDb ] POST >=> choose [ path "/api/users/login" >=> Auth.login path "/api/wishlist/" >=> WishList.postWishList saveToDb ] NOT_FOUND "Page not found." ] >=> logWithLevelStructured Logging.Info logger logFormatStructured startWebServer serverConfig app
Very interesting stuff! There are so many options in .NET open source. I’ll be doing podcasts on this stack soon.
Trying out the SAFE Stack
If you’re using Visual Studio Community 2017, make sure you’ve got F# support included. I double-checked under Individual components. You can run the VS2017 installer multiple time and add and remove stuff without breaking things, so don’t worry. If you are using other versions of VS, check here http://ift.tt/1fhIFeE to get the right download for your machine. If you’re using Visual Studio Code, you’ll want the Ionide F# plugin for Code.
Once I had node and yarn installed, it was easy to try out the sample app and get it running locally with “build run.” It uses DotNetWatcher, so you can just keep it running in the background and work on your code and it’ll recompile and restart as you go.
The complete “SAFE” stack demo website is LIVE here http://ift.tt/2fZ76H0 (login test/test/) and all the source code for the app is here: http://ift.tt/2g1BroF.
Sponsor: Do you know how many errors, crashes and performance issues your users are experiencing? Raygun installs in minutes. Discover problems you didn’t even know about and replicate bugs with greater speed and accuracy. Learn more!
© 2017 Scott Hanselman. All rights reserved.
      Learning about the F# SAFE stack – Suave.io, Azure, Fable, Elmish syndicated from http://ift.tt/2wBRU5Z
0 notes
techscopic · 7 years
Text
Learning about the F# SAFE stack – Suave.io, Azure, Fable, Elmish
Last month I looked at a Functional Web with ASP.NET Core and F#’s Giraffe. Giraffe is F# middleware that takes ASP.NET Core’s pipeline in a new direction with a functional perspective. However, Giraffe isn’t the only F# web stack to choose from! There’s Freya, WebSharper, and there’s also a very interesting and quite complete story with The SAFE Stack.
The SAFE Stack is an open source stack, like LAMP, or WAMP, or other acronym stacks, except this one is all open source .NET with a functional perspective. From the announcement blog:
Suave model for server-side web programming
Azure for cloud-based systems
Fable for Javascript-enabled applications.
Elmish for an easy-to-understand UI programming mode
To be clear, while this is a prescriptive stack, it’s not a stack that forces you to do anything. You can swap bits out as you please.
Fable is particularly interesting as it’s an F# to JavaScript transpiler. Try Fable online here http://fable.io/repl and turn F# into JavaScript LIVE! Their Sudoku sample is particularly impressive.
Here’s two small – but interesting – examples where F# code ends up as JavaScript which ends up creating ReactJS components:
let words size message = R.span [ Style [ !!("fontSize", size |> sprintf "%dpx") ] ] [ R.str message ] let buttonLink cssClass onClick elements = R.a [ ClassName cssClass OnClick (fun _ -> onClick()) OnTouchStart (fun _ -> onClick()) Style [ !!("cursor", "pointer") ] ] elements
Then later in a Menu.fs that also turns into JavaScript eventually, you can see where they conditionally render the Button for logout, or links for for other Views for the Home Page or Wishlist. You can read lots more about Fable over at the Compositional IT blog.
let view (model:Model) dispatch = div [ centerStyle "row" ] [ yield viewLink Home "Home" if model.User <> None then yield viewLink Page.WishList "Wishlist" if model.User = None then yield viewLink Login "Login" else yield buttonLink "logout" (fun _ -> dispatch Logout) [ str "Logout" ] ]
Elmish for F# takes the Model View Update (MVU) architecture and brings it to F# and the browser. There’s a good breakdown of the value Elmish provides also at the Compositional IT blog.
Suave is its own cross platform Web Server. Here’s Hello World in Suave.
open Suave startWebServer defaultConfig (Successful.OK "Hello World!")
Suave has been around for while and gets better all the time. I blogged about it in 2015 and got it running on Azure. My blog post is not a best practice any more – it was a spike attempt by me – and fortunately they’ve moved on and improved things.
Here’s Suave getting set up within the sample app. Check out how they route HTTP Verbs and URL paths.
let serverConfig = { defaultConfig with logger = Targets.create LogLevel.Debug [|"ServerCode"; "Server" |] homeFolder = Some clientPath bindings = [ HttpBinding.create HTTP (IPAddress.Parse "0.0.0.0") port] } let app = choose [ GET >=> choose [ path "/" >=> Files.browseFileHome "index.html" pathRegex @"/(public|js|css|Images)/(.*)\.(css|png|gif|jpg|js|map)" >=> Files.browseHome path "/api/wishlist/" >=> WishList.getWishList loadFromDb ] POST >=> choose [ path "/api/users/login" >=> Auth.login path "/api/wishlist/" >=> WishList.postWishList saveToDb ] NOT_FOUND "Page not found." ] >=> logWithLevelStructured Logging.Info logger logFormatStructured startWebServer serverConfig app
Very interesting stuff! There are so many options in .NET open source. I’ll be doing podcasts on this stack soon.
Trying out the SAFE Stack
If you’re using Visual Studio Community 2017, make sure you’ve got F# support included. I double-checked under Individual components. You can run the VS2017 installer multiple time and add and remove stuff without breaking things, so don’t worry. If you are using other versions of VS, check here http://ift.tt/1fhIFeE to get the right download for your machine. If you’re using Visual Studio Code, you’ll want the Ionide F# plugin for Code.
Once I had node and yarn installed, it was easy to try out the sample app and get it running locally with “build run.” It uses DotNetWatcher, so you can just keep it running in the background and work on your code and it’ll recompile and restart as you go.
The complete “SAFE” stack demo website is LIVE here http://ift.tt/2fZ76H0 (login test/test/) and all the source code for the app is here: http://ift.tt/2g1BroF.
Sponsor: Do you know how many errors, crashes and performance issues your users are experiencing? Raygun installs in minutes. Discover problems you didn’t even know about and replicate bugs with greater speed and accuracy. Learn more!
© 2017 Scott Hanselman. All rights reserved.
      Learning about the F# SAFE stack – Suave.io, Azure, Fable, Elmish syndicated from http://ift.tt/2wBRU5Z
0 notes