|
Bloody posted:lol nvm figured it out use new Task(() => { FlingThePoo(butts, yourMom); viewModel.status = "Done"; }).Start(); or (preferentially) Task.Factory.StartNew(() => { FlingThePoo(butts, yourMom); viewModel.status = "Done"; }) tasks draw from a thread pool so a) you can amortize the cost of instantiating a thread and b) you won't suffer thread starvation if you start spawning them left right and center also whenever you modify a thing asynchronously be very careful. if the modification involves a single write that's the size of a native pointer or smaller (like setting viewModel.status to point to a different string), you're safe. if you want to do more writes or larger writes, it's time to do some reading on concurrency.
|
# ? Aug 21, 2014 16:36 |
|
|
# ? Jun 6, 2024 14:09 |
|
coffeetable posted:also whenever you modify a thing asynchronously be very careful. if the modification involves a single write that's the size of a native pointer or smaller (like setting viewModel.status to point to a different string), you're safe. if you want to do more writes or larger writes, it's time to do some reading on concurrency. do the reading anyway. unless the CLR provides stronger ordering guarantees than the underlying hardware, writes and reads may not be visible to each other the way you expect.
|
# ? Aug 21, 2014 16:40 |
|
Subjunctive posted:do the reading anyway. unless the CLR provides stronger ordering guarantees than the underlying hardware, writes and reads may not be visible to each other the way you expect.
|
# ? Aug 21, 2014 16:55 |
|
as long as the writes occur in order inside the task they should be fine, right? or better yet don't design a viewmodel that requires things to be updated in a certain order.
|
# ? Aug 21, 2014 17:09 |
|
Shaggar posted:as long as the writes occur in order inside the task they should be fine, right? i could've sworn the CLR offers stronger guarantees than that but i can't find where i read it. the closest is a SO post that says the CLR doesn't do write reording on most architectures, but it's not written into the spec
|
# ? Aug 21, 2014 17:18 |
|
if the CLR made that guarantee then it would have to use green threads on any architecture except x86, because otherwise every heap load/store would have to do a read/write barrier respectively ARM makes a really neat memory ordering guarantee about address dependence that enables a lot of lock-free algorithms to avoid barriers on the read side, but it is not at all sufficient to emulate x86-style guarantees about store reordering
|
# ? Aug 21, 2014 18:39 |
|
coffeetable posted:use ya i know ive done real parallel poo poo in c++ before () and if theres more than one copy of this task running at any time i have bigger problems my real issue was remembering how the gently caress to write the delegate correctly and it took me an embarrassingly long time + lot of googlin
|
# ? Aug 21, 2014 19:08 |
|
you know how prototype code doesnt exist and its always in production so do it right the first time? im utterly disregarding that and its a near certainty that it will screw me over in like 3 months oh well
|
# ? Aug 21, 2014 19:09 |
|
Bloody posted:you know how prototype code doesnt exist and its always in production so do it right the first time? of course it took a couple of years of the prototype being slow and inadequate and impossible to fix for management to admit something needed to be done, but it happened!
|
# ? Aug 21, 2014 19:57 |
|
yeah i started rewriting the prototype id built over the last two months for production this week but then again our "salesman" deliberately underpromised by a huge margin, so there's two impossibilities for you
|
# ? Aug 21, 2014 19:59 |
|
any scala nerds here? gimme a jdbc wrapper that 1) makes querying simple (i should just give it some SQL and it should just do the thing and give me result without billion lines of boilerplate). i dont want automagically created queries, and i don't want to create special classes or whatever for the sake of querying. 2) is updated this year (unlike this https://github.com/jpersson/prequel/) i know i can use straight jdbc but i want someone else to have already written the irrelevant crap i dont want to write
|
# ? Aug 21, 2014 23:34 |
|
Bloody posted:ya i know ive done real parallel poo poo in c++ before () and if theres more than one copy of this task running at any time i have bigger problems and then the user changes the view model while your task is running then yo haveu twproblemso
|
# ? Aug 22, 2014 02:45 |
|
Brain Candy posted:and then the user changes the view model while your task is running thats why you disable inputs that can impact the parts of the viewmodel your long running task is working on. Shinku ABOOKEN posted:any scala nerds here? you might as well use straight jdbc cause its just as stupid as writing a pointless "wrapper" around it.
|
# ? Aug 22, 2014 04:24 |
|
what's the best c++ ide? don't say visual studio
|
# ? Aug 22, 2014 04:59 |
|
Shaggar posted:thats why you disable inputs that can impact the parts of the viewmodel your long running task is working on. this is where reactiveui really shines quote:In GitHub for Windows, the Sync Command is an invocation of the Pull Command followed by the Push Command - how can I create a Command whose CanExecute turns off until the Pull then the Push completes? code:
|
# ? Aug 22, 2014 07:18 |
|
the talent deficit posted:what's the best c++ ide? don't say visual studio the jetbrains c++ ide isnt out yet so probably vim
|
# ? Aug 22, 2014 11:37 |
|
the talent deficit posted:what's the best c++ ide? don't say visual studio Netbeans Not even kidding
|
# ? Aug 22, 2014 12:08 |
|
coffeetable posted:this is where reactiveui really shines that is very pleasant.
|
# ? Aug 22, 2014 14:28 |
|
netbeans loving blows
|
# ? Aug 23, 2014 21:08 |
|
i am trying scala and i am stuck can someone help me pls Shinku ABOOKEN posted:What's so wrong with this code that it actually crashes the compiler?
|
# ? Aug 24, 2014 15:20 |
|
i don't have any experience but i remember reading that slick connects to the database when things compiling against it get compiled. see if plain jane jdbc works.
|
# ? Aug 24, 2014 16:33 |
|
crazysim posted:i don't have any experience but i remember reading that slick connects to the database when things compiling against it get compiled. what no way
|
# ? Aug 24, 2014 16:37 |
|
plain jane jdbc workscrazysim posted:i don't have any experience but i remember reading that slick connects to the database when things compiling against it get compiled. a whaaaaaaaaaaaaaaaaaaaaaaaaat???????????
|
# ? Aug 24, 2014 16:47 |
|
slick is alpha quality software at best Try squeryl or hibernate
|
# ? Aug 24, 2014 17:01 |
|
Notorious b.s.d. posted:slick is alpha quality software at best i thought the typesafe company was built on scala therefore there product would be the best available gonna try squeryl next
|
# ? Aug 24, 2014 17:07 |
|
Shinku ABOOKEN posted:plain jane jdbc works idk. im sure there's more documentation elsewhere about how this is invoked and used but i don't know where to find it. https://github.com/slick/slick/issues/347
|
# ? Aug 24, 2014 17:21 |
|
crazysim posted:idk. im sure there's more documentation elsewhere about how this is invoked and used but i don't know where to find it. why??
|
# ? Aug 24, 2014 17:51 |
|
Sweeper posted:why?? idk. my best guess is that it uses info from a live DB connection to produce more strongly typed things rather than building up/compiling database info/queries at runtime. still don't know where in the documentation it talks about this though.
|
# ? Aug 24, 2014 19:21 |
|
ahmeni posted:the jetbrains c++ ide isnt out yet so probably vim i used jetbrains rubymine for a week and it made me hate programming so much that i got nothing done and suddenly started to think i couldnt do my job until i stopped using it and everything got better
|
# ? Aug 24, 2014 19:25 |
|
your problem was using ruby, not the ide.
|
# ? Aug 24, 2014 19:29 |
|
if hibernate is much like nhibernate, stay far away.
|
# ? Aug 24, 2014 19:33 |
|
fart simpson posted:your problem was using ruby, not the ide. if you'd read my post you would know that i still continued to use ruby after abandoning rubymine so that eliminates that theory. i considered it at the time. but no, the problem was rubymine. did i mention it has a button you have to press to make the garbage collector go?
|
# ? Aug 24, 2014 19:33 |
|
MALE SHOEGAZE posted:if you'd read my post you would know that i still continued to use ruby after abandoning rubymine so that eliminates that theory. if it makes anyone feel any better, that button is no longer present by default.
|
# ? Aug 24, 2014 19:35 |
|
crazysim posted:if it makes anyone feel any better, that button is no longer present by default. but it should be, because it was basically unusable until i turned it on
|
# ? Aug 24, 2014 19:39 |
|
MALE SHOEGAZE posted:but it should be, because it was basically unusable until i turned it on fyi if you have antivirus running it will scan the contents of every jar file that jetbrains' software tries to load i use pycharm occasionally and it was garbage until i set an exception for the jetbrains folder and now it works splendidly
|
# ? Aug 24, 2014 19:42 |
|
Blinkz0rz posted:fyi if you have antivirus running it will scan the contents of every jar file that jetbrains' software tries to load On a Mac. Unless rubymime has some sort of built in Antivirus which would not surprise. me.
|
# ? Aug 24, 2014 19:59 |
|
just remembered the nock/hoon guy invented a bunch of single syllable names for punctuation including ace for space and lus for +
|
# ? Aug 24, 2014 21:33 |
|
ConanTheLibrarian posted:just remembered the nock/hoon guy invented a bunch of single syllable names for punctuation including ace for space and lus for + https://www.youtube.com/watch?v=8SkdfdXWYaI&t=684s
|
# ? Aug 24, 2014 22:12 |
|
MALE SHOEGAZE posted:if you'd read my post you would know that i still continued to use ruby after abandoning rubymine so that eliminates that theory. i read your post but ruby's still bad
|
# ? Aug 25, 2014 00:52 |
|
|
# ? Jun 6, 2024 14:09 |
|
I'm going to be immortalized as a plush rabbit:quote:Those of you that were with the project when KJK was around might recall him and I creating something of an injoke wherein our secondary aliases, Hackbunny and ZWabbit, were in fact AIs. I expanded the idea a bit further in creating a kind of alternative story for the project wherein ReactOS was trying to create an AI, not an operating system. A few of you have seen various drafts of that story, but I never really finished writing them and let it go by the wayside after KJK left. The Hackbunny plush (it's going into production by the way, the person I've contracted has received initial down payment and will be sending me a picture of the prototype before doing the remaining ones) was something of a throwback to those stories, except that I'm pretty sure the majority of the present developers either don't know about those stories or have long forgotten them, nevermind the fact that the community at large never really picked up on the injoke. To introduce them, and potentially set them up as an "official" mascot fallback to beat off further attempts by the community to impose one on us, I thought we probably need to reintroduce the bunnies and their backstory in some way, shape, or form. sorry for invading the thread but wtf PS: the plushies are terribad: quote:Here's the prototype that the others will be based off of. The nose will see some adjustment but beyond that this will be what the rest look like.
|
# ? Aug 25, 2014 01:33 |