Click here to Skip to main content
14,389,126 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralRe: Parsing is fun Pin
Sander Rossel3-May-19 0:45
professionalSander Rossel3-May-19 0:45 
GeneralRe: Parsing is fun Pin
honey the codewitch3-May-19 2:59
Memberhoney the codewitch3-May-19 2:59 
GeneralRe: Parsing is fun Pin
Sander Rossel5-May-19 21:43
professionalSander Rossel5-May-19 21:43 
GeneralRe: Parsing is fun Pin
honey the codewitch6-May-19 1:49
Memberhoney the codewitch6-May-19 1:49 
GeneralRe: Parsing is fun Pin
honey the codewitch6-May-19 1:50
Memberhoney the codewitch6-May-19 1:50 
GeneralRe: Parsing is fun Pin
Sander Rossel6-May-19 1:57
professionalSander Rossel6-May-19 1:57 
GeneralRe: Parsing is fun Pin
honey the codewitch6-May-19 2:12
Memberhoney the codewitch6-May-19 2:12 
GeneralRe: Parsing is fun Pin
Marc Clifton3-May-19 3:58
mvaMarc Clifton3-May-19 3:58 
codewitch honey crisis wrote:
How often do you get to declare nasty things like this?


Often enough. It can be quite fun. You can use the using statement to declare a name for a more complex type, example:

using ThreadPool = 
System.Collections.Concurrent.ConcurrentBag<System.Tuple<System.Threading.Semaphore, 
System.Collections.Concurrent.ConcurrentQueue<System.Action>, System.Action<System.Exception>>>;


but it's cumbersome, and this is where F# really shines[^]

Example from my article I linked above:

type Work = unit -> unit
type ThreadExceptionHandler = Exception -> unit

type ThreadGate = Semaphore
type ThreadQueue = ConcurrentQueue<Work>
type AThread = ThreadGate * ThreadQueue * ThreadExceptionHandler
type ThreadPool = ConcurrentBag<AThread>

Latest Article - A 4-Stack rPI Cluster with WiFi-Ethernet Bridging

Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

Artificial intelligence is the only remedy for natural stupidity. - CDP1802

GeneralRe: Parsing is fun Pin
honey the codewitch3-May-19 4:02
Memberhoney the codewitch3-May-19 4:02 
GeneralInterested in music, learning and/or guitar? Pin
raddevus2-May-19 9:56
mvaraddevus2-May-19 9:56 
GeneralRe: Interested in music, learning and/or guitar? Pin
Rick York2-May-19 11:07
mveRick York2-May-19 11:07 
GeneralRe: Interested in music, learning and/or guitar? Pin
raddevus2-May-19 11:16
mvaraddevus2-May-19 11:16 
GeneralRe: Interested in music, learning and/or guitar? Pin
Rick York2-May-19 11:57
mveRick York2-May-19 11:57 
GeneralRe: Interested in music, learning and/or guitar? Pin
Paul Kemner6-May-19 5:12
MemberPaul Kemner6-May-19 5:12 
GeneralRe: Interested in music, learning and/or guitar? Pin
Christian Graus2-May-19 13:41
protectorChristian Graus2-May-19 13:41 
GeneralRe: Interested in music, learning and/or guitar? Pin
Munchies_Matt3-May-19 1:42
MemberMunchies_Matt3-May-19 1:42 
GeneralRe: Interested in music, learning and/or guitar? Pin
raddevus3-May-19 2:44
mvaraddevus3-May-19 2:44 
GeneralRe: Interested in music, learning and/or guitar? Pin
Munchies_Matt3-May-19 3:00
MemberMunchies_Matt3-May-19 3:00 
GeneralRe: Interested in music, learning and/or guitar? Pin
raddevus3-May-19 3:16
mvaraddevus3-May-19 3:16 
QuestionMy friend's project is stuck between half AngularJS & Angular 4...and they're now completely stuck. Any advice? Pin
Goalie352-May-19 7:43
MemberGoalie352-May-19 7:43 
AnswerRe: My friend's project is stuck between half AngularJS & Angular 4...and they're now completely stuck. Any advice? Pin
OriginalGriff2-May-19 7:44
mveOriginalGriff2-May-19 7:44 
AnswerRe: My friend's project is stuck between half AngularJS & Angular 4...and they're now completely stuck. Any advice? Pin
jeron12-May-19 8:02
Memberjeron12-May-19 8:02 
AnswerRe: My friend's project is stuck between half AngularJS & Angular 4...and they're now completely stuck. Any advice? Pin
GuyThiebaut2-May-19 8:25
professionalGuyThiebaut2-May-19 8:25 
GeneralRe: My friend's project is stuck between half AngularJS & Angular 4...and they're now completely stuck. Any advice? Pin
Christian Graus2-May-19 13:43
protectorChristian Graus2-May-19 13:43 
GeneralRe: My friend's project is stuck between half AngularJS & Angular 4...and they're now completely stuck. Any advice? Pin
GuyThiebaut2-May-19 19:49
professionalGuyThiebaut2-May-19 19:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.