|
ExcessBLarg! posted:C, which has very little of a runtime doesn't mask these at all and so "foists" the problems on the programmer. Managed languages tend to hide these to the benefit of the programmer, but which otherwise may have consequence in being able to write low level systems code. This, but more words: Threads Cannot Be Implemented As a Library
|
# ? Feb 9, 2015 18:42 |
|
|
# ? May 24, 2024 22:08 |
|
Suspicious Dish posted:Python exposes fork, heavily uses it (multiprocessing), also exposes threads, and can use threads behind your back, and also exposes libraries incompatible with fork (ctypes). Python is an awful language for doing both of those things though. The runtime just wasn't designed with parallelism in mind.
|
# ? Feb 9, 2015 18:51 |
|
Suspicious Dish posted:Python exposes fork, heavily uses it (multiprocessing), also exposes threads, and can use threads behind your back, and also exposes libraries incompatible with fork (ctypes).
|
# ? Feb 9, 2015 19:04 |
|
I wish I could fork this thread
|
# ? Feb 9, 2015 19:54 |
|
MALE SHOEGAZE posted:I wish I could fork this thread You can.
|
# ? Feb 10, 2015 00:01 |
|
code:
|
# ? Feb 10, 2015 00:23 |
|
ExcessBLarg! posted:So unless the library is a thread library, it shouldn't ever call pthread_create(3) or clone(2) behind my back. Any API call that does need to prominently state in its documentation that, that's the behavior. Ideally is should also be obvious by the function name alone that it's likely to spawn a thread. Yes, on Unix/Linux. On non-garbage platforms a library creating threads for its own internal use is a perfectly fine thing to do.
|
# ? Feb 10, 2015 00:29 |
|
KaneTW posted:
Is there anyone running a message board by abusing Git commit/merge/clone/message behavior yet? That would qualify for this thread.
|
# ? Feb 10, 2015 00:33 |
|
pseudorandom name posted:Yes, on Unix/Linux. Agreed, all Unix operating systems are garbage and should not be used at any time.
|
# ? Feb 10, 2015 00:51 |
|
ErIog posted:Is there anyone running a message board by abusing Git commit/merge/clone/message behavior yet? That would qualify for this thread. Not exactly, but
|
# ? Feb 10, 2015 01:45 |
|
ErIog posted:Is there anyone running a message board by abusing Git commit/merge/clone/message behavior yet? That would qualify for this thread. I kinda want to do that now.
|
# ? Feb 10, 2015 03:01 |
|
Cryptographically verified shitposting.
|
# ? Feb 10, 2015 04:46 |
|
Qwertycoatl posted:Not exactly, but That's just an HR person not understanding the directions they were given, right? Please?
|
# ? Feb 10, 2015 05:05 |
|
More like a business founder I think but yeah, just a non-technical person guessing wrong about things
|
# ? Feb 10, 2015 06:41 |
|
KaneTW posted:
I so want a like button for this - this is Awesome and brilliant!
|
# ? Feb 10, 2015 07:49 |
|
ErIog posted:That's just an HR person not understanding the directions they were given, right? Please? No. Some posts may come at an inopportune moment, so to give them the notability they deserve it's critical to have an online experience where posts can be relocated to the optimal context. This is a thus far unexplored community building mechanism which it has now become possible to implement thanks to the novel git rebase technology. For example: code:
|
# ? Feb 10, 2015 09:41 |
|
ErIog posted:Is there anyone running a message board by abusing Git commit/merge/clone/message behavior yet? That would qualify for this thread. If you don't look so closely, you could do it with https://ikiwiki.info/. It's a blog/wiki engine that's backed by git. Comments posted on articles in the web UI get turned into commits, but you can pull/push content as git commits.
|
# ? Feb 10, 2015 09:43 |
|
So that's eh.... the icky wiki? e: vvvvv That'd be terrible! Who'd mod this? I know! Either autistic sperglords, or just punish the shitposters by prescribing them a period of moderation duty, where they cannot post, but only read shitposts. That's bril... oh wait. Karate Bastard fucked around with this message at 10:01 on Feb 10, 2015 |
# ? Feb 10, 2015 09:49 |
In the git forums posts are submitted by pull request; thus they must be moderator approved before being merged into the forums. No more shitposts!
|
|
# ? Feb 10, 2015 09:55 |
|
Karate Bastard posted:So that's eh.... the icky wiki? Yup, that's how you pronounce it.
|
# ? Feb 10, 2015 10:05 |
|
TheresaJayne posted:I so want a like button for this - this is Awesome and brilliant! Surely you mean you wish to star and fork this idea.
|
# ? Feb 10, 2015 15:45 |
|
Internet Janitor posted:Surely you mean you wish to star and fork this idea. If you like this repository, don't forget to star, fork, watch, and file an issue!
|
# ? Feb 10, 2015 18:23 |
|
ErIog posted:That's just an HR person not understanding the directions they were given, right? Please? it is posted:More like a business founder I think but yeah, just a non-technical person guessing wrong about things
|
# ? Feb 10, 2015 18:31 |
|
The business is in the ideation stage.
|
# ? Feb 10, 2015 18:40 |
|
I'm ~80% sure I've seen someone using GitHub as a blogging platform before and actually using a source control system to version a wiki makes a lot of sense to me JawnV6 posted:Er, and y'all are just giving a pass to the technical person who couldn't sit down for a few minutes to actually check the language being used? Nontechnical people say the darndest things! Isn't it cwute
|
# ? Feb 10, 2015 19:31 |
|
To be less flippant, Github+jekyll+pandoc is a fantastic way to do web.
|
# ? Feb 10, 2015 19:35 |
|
Jsor posted:This is really just a newbie mistake and not a terrible horror, but it's such a basic memory bug it's kind of cute. The instructor just made this same mistake on the answer sheet to the midterm. Which I think sends this from to horror.
|
# ? Feb 10, 2015 21:20 |
|
Jsor posted:The instructor just made this same mistake on the answer sheet to the midterm. Which I think sends this from to horror. I was once wary of doing things like sizeof *v because I thought "what if v is null?" Then someone pointed out that sizeof is a compile-time thing and all was well. I don't think it helps that people usually put the parentheses after sizeof like it's a function call. I'm not saying that's a bad idea, just that it added to my confusion.
|
# ? Feb 10, 2015 22:57 |
|
pokeyman posted:I was once wary of doing things like sizeof *v because I thought "what if v is null?" Then someone pointed out that sizeof is a compile-time thing and all was well. When I still wrote C for work I'd see a lot of: code:
in some later code relating to v, and I would always suggest sizeof(*v), and get pushback for that exact reason. I also always get a chuckle out of sizeof(char)
|
# ? Feb 11, 2015 04:18 |
|
Steve French posted:When I still wrote C for work I'd see a lot of: I think the latter is fine. It's just avoiding magic numbers.
|
# ? Feb 11, 2015 05:32 |
|
LeftistMuslimObama posted:I think the latter is fine. It's just avoiding magic numbers. Yeah, really don't get why people scoff at that. You, the compiler and I all know it's equal to 1. Sometimes I put sizeof(char) to show the units are "bytes" or for symmetry with other statements. It doesn't make my code any less correct or efficient. The Laplace Demon fucked around with this message at 06:00 on Feb 11, 2015 |
# ? Feb 11, 2015 05:57 |
|
It's not a magic number, that is how sizeof is defined by the C spec. I'm not saying it is a horror to write it, just that I find it mildly amusing.
|
# ? Feb 11, 2015 06:15 |
|
Steve French posted:It's not a magic number, that is how sizeof is defined by the C spec. I'm not saying it is a horror to write it, just that I find it mildly amusing. I think what he meant was using the literal 1 is a magic number in comparison to using sizeof(char) even if you know they are the same thing.
|
# ? Feb 11, 2015 06:49 |
|
Similarly spelling out 4 * 1024 * 1024 for 4MB, or 60 * 60 * 24 for seconds-in-a-day. Express the significance of something, not just the resulting value.
|
# ? Feb 11, 2015 06:52 |
|
I always type out pi to an arbitrary precision rather than utilize a constant.
|
# ? Feb 11, 2015 06:54 |
shodanjr_gr posted:I always type out pi to an arbitrary precision rather than utilize a constant. I always write a constexpr function which calculates pi to arbitrary decimal places, the number of which are specified at compile time.
|
|
# ? Feb 11, 2015 08:39 |
|
VikingofRock posted:I always write a constexpr function which calculates pi to arbitrary decimal places, the number of which are specified at compile time. I'll only respect that if the precision is expressed using sizeof some random struct.
|
# ? Feb 11, 2015 08:51 |
|
VikingofRock posted:I always write a constexpr function which calculates pi to arbitrary decimal places, the number of which are specified at compile time. same, but binary places
|
# ? Feb 11, 2015 10:14 |
|
Anonymized code:code:
|
# ? Feb 11, 2015 12:22 |
|
|
# ? May 24, 2024 22:08 |
|
TZer0 posted:Anonymized code: I worked on a Bukkit Plugin once and EVERY and i mean EVERY! line had casting so it went something like this code:
|
# ? Feb 11, 2015 13:11 |