|
c thread s: look like they should be workin and they compile but then i run it and it just pegs 1 cpu instead of many cpus UPDATE: is now segfaulting when the thread is joined UPDATE: everything is awful Bloody fucked around with this message at 05:32 on Sep 4, 2013 |
# ? Sep 4, 2013 04:58 |
|
|
# ? Jun 6, 2024 06:00 |
|
im the artisanal bespoke threads
|
# ? Sep 4, 2013 05:46 |
|
dont worry theyre terrible
|
# ? Sep 4, 2013 05:59 |
|
just use Grand Central Dispatch aka libdispatch. easy multithreading for the majority of what people use threads for.
|
# ? Sep 4, 2013 06:27 |
|
i like the part where nobody reads any words i say except for "thread"
|
# ? Sep 4, 2013 06:33 |
|
any actual progress is p definitely gonna require more serious refactoring though and gently caress that for now
|
# ? Sep 4, 2013 06:35 |
|
Bloody posted:i like the part where nobody reads any words i say except for "thread"
|
# ? Sep 4, 2013 06:37 |
|
heres the basic outline of your code if you would just stop being ridiculous and use c++11code:
|
# ? Sep 4, 2013 06:38 |
|
keep in mind if you're using std::async that the stdlibc++ version will always choose to execute in the same thread unless you actually give it the std::launch::async policy
|
# ? Sep 4, 2013 13:44 |
|
if it's truly embarrassingly parallel use openmp
|
# ? Sep 4, 2013 15:21 |
|
use python. the GIL means python is inherently thread-safe
|
# ? Sep 4, 2013 15:29 |
|
Nomnom Cookie posted:use python. the GIL means python is inherently thread-safe use stackless python
|
# ? Sep 4, 2013 18:21 |
|
but no really stackless python is hells of sweet, you run functions as tasklets and they perform work and you can "yield" or "imbalance" that tasklet at any time and it'll halt execution and move on to the next one it don't seem like much but it's neat for game programming because you can have an AI's think() function just run in an infinite while true: loop and yield() after it's done thinking, or if it needs to think more you just dont yield and keep looping, and you can set some watchdog parameters that dont let a tasklet run for more than X instructions before forcing execution onto the next thread so its a good way to say, like, some_result = watchdog.run( game_object.solve_path_to(some_point) ) and maybe that solve_path_to will just run for a while without making all your poo poo lag EVE uses it to make their servers run less like poo poo edit: babby's first concurrency model
|
# ? Sep 4, 2013 18:25 |
|
i thought stackless wasn't maintained anymore?
|
# ? Sep 4, 2013 18:26 |
|
wouldn't surprise me if it isn't still had a lot of fun when i used it for some nerdlinger game project test engine thingy
|
# ? Sep 4, 2013 18:27 |
|
Mido posted:but no really stackless python is hells of sweet, you run functions as tasklets and they perform work and you can "yield" or "imbalance" that tasklet at any time and it'll halt execution and move on to the next one Yay coroutines
|
# ? Sep 5, 2013 06:49 |
|
you should just use node then. does the same poo poo and is actually maintained, unlike python
|
# ? Sep 5, 2013 14:05 |
|
hey can anyone recommend a good babbys first sql book?
|
# ? Sep 16, 2013 18:38 |
|
http://www.amazon.com/gp/aw/d/1593271905
|
# ? Sep 16, 2013 20:48 |
|
im going to allow this
|
# ? Sep 16, 2013 20:52 |
|
wtf
|
# ? Sep 16, 2013 21:42 |
|
hey guys i am thinging of writing a uefi-enabled x86_64 hobby os (NOT SEROIOUS!!). what's a good free resource for os dev information? i need info on how to interface with the hardware. i know that hal, acpi,... are things but i don't know how to begin to work on implementing them i looked at osdev.org and it's full of outdated/wrong information and lovely alpha nerds. help a brother out PS: i am looking at the linux kernel and while it's very helpful it has a long history and i am kinda looking at the end result without any sense of context
|
# ? Sep 16, 2013 21:49 |
|
Mido posted:but no really stackless python is hells of sweet, you run functions as tasklets and they perform work and you can "yield" or "imbalance" that tasklet at any time and it'll halt execution and move on to the next one actually eve is running away from python as fast as they can because they want the servers to not run like poo poo
|
# ? Sep 16, 2013 21:52 |
|
I recommend using basic. It's nice and simple and low level because it's so basic
|
# ? Sep 16, 2013 21:53 |
|
uh that looks like anime to me, i'm not sure i want that on my bookshelves
|
# ? Sep 16, 2013 21:54 |
|
Nomnom Cookie posted:actually eve is running away from python as fast as they can because they want the servers to not run like poo poo the eve client is also written mostly in python (with all the low level rendering engine etc. written in c++ master race) it's possible to run the entire client through a decompiler and modify it people making all those mining bots just build upon the autopilot code and make their own ingame configuration UIs etc. basically lol eve online ----------------
|
# ? Sep 16, 2013 22:58 |
|
Zlodo posted:the eve client is also written mostly in python (with all the low level rendering engine etc. written in c++ master race) ask me about my successful career as an eve online automation enthusiast
|
# ? Sep 16, 2013 23:00 |
|
Nomnom Cookie posted:actually eve is running away from python as fast as they can because they want the servers to not run like poo poo oh i know and they should i just really enjoyed it
|
# ? Sep 16, 2013 23:03 |
|
dur posted:hey can anyone recommend a good babbys first sql book? not trying to be snarky but what could a beginner sql book teach you that isn't already immediately intuitive and anyway just use an ORM
|
# ? Sep 17, 2013 01:58 |
|
~Coxy posted:not trying to be snarky but what could a beginner sql book teach you that isn't already immediately intuitive are orms a good idea if you're working on something where the database performance becomes important?
|
# ? Sep 17, 2013 13:31 |
|
orms are always a good idea bc if you let your coworkers have a raw connection they'll never do anything but stringbuilder some sql
|
# ? Sep 17, 2013 13:34 |
|
~Coxy posted:not trying to be snarky but what could a beginner sql book teach you that isn't already immediately intuitive i don't know, i guess that's kind of part of why i'm asking? i don't know what an ORM is but i guess i'll google it.
|
# ? Sep 17, 2013 14:43 |
|
does anyone use a (osx) program to manage code snippets? i, terrible programmer, find myself wanting to reuse bits of code more and more these days. i've heard good things about Dash and Snippets, and i'e seen Codebox on the app store which looks alright. tell me the proest choice, yospos.
|
# ? Sep 17, 2013 14:44 |
|
Nomnom Cookie posted:orms are always a good idea bc if you let your coworkers have a raw connection they'll never do anything but stringbuilder some sql
|
# ? Sep 17, 2013 14:44 |
|
you need a program for reusing bits of code?
|
# ? Sep 17, 2013 14:45 |
|
prefect posted:are orms a good idea if you're working on something where the database performance becomes important? no. use a statement mapper
|
# ? Sep 17, 2013 14:47 |
|
Impromptu Flip posted:does anyone use a (osx) program to manage code snippets? i, terrible programmer, find myself wanting to reuse bits of code more and more these days. i've heard good things about Dash and Snippets, and i'e seen Codebox on the app store which looks alright. tell me the proest choice, yospos. i use google docs and have a text file with code bits each under a heading that describes the code so i can generate a table of contents and easily jump to the one i want
|
# ? Sep 17, 2013 14:51 |
|
uG posted:you need a program for reusing bits of code? going through projects to find things i want is getting cumbersome, there's got to be a better way!!! searching throug snippets seems like it would be easy & convenient dur posted:i use google docs and have a text file with code bits each under a heading that describes the code so i can generate a table of contents and easily jump to the one i want that sounds p ghetto but the toc is a good idea i'll try out dash, i looks like it just nags you if you don't pay
|
# ? Sep 17, 2013 15:00 |
|
Impromptu Flip posted:does anyone use a (osx) program to manage code snippets? i, terrible programmer, find myself wanting to reuse bits of code more and more these days. i've heard good things about Dash and Snippets, and i'e seen Codebox on the app store which looks alright. tell me the proest choice, yospos. text expander
|
# ? Sep 17, 2013 15:04 |
|
|
# ? Jun 6, 2024 06:00 |
|
comedy option: some lovely vim plugin that takes years to become useful
|
# ? Sep 17, 2013 15:04 |