Post 9jKuVkY35yiLdLzzcG by saper@word.builders
 (DIR) More posts by saper@word.builders
 (DIR) Post #9jKsAqNS1o6Lirwfo0 by 314@kawen.space
       2019-05-30T11:31:14.783680Z
       
       0 likes, 0 repeats
       
       you might be having problems hearing from me for the remainder of the weekI wrote half a server for the assignment and started writing a client only to realize I could've benefited greatly from more common codebaseso there we go, rewriting it from scratch 3 days from deadline
       
 (DIR) Post #9jKsAqVxWAuI9FvT4C by minus@cmpwn.com
       2019-05-30T11:58:05Z
       
       0 likes, 0 repeats
       
       @314 What's the assignment?
       
 (DIR) Post #9jKsAqfAxuHObqEpQu by 314@kawen.space
       2019-05-30T12:03:03.302786Z
       
       0 likes, 0 repeats
       
       @minus file transfer protocol, first you ask servers what files they have and how much space and "please give file" or "please let me upload file" over multicast udp, and transferring files over tcp. the protocol is defined in a markdown document in Polish. the client should be able to handle transfers in background while the user types in more commands
       
 (DIR) Post #9jKsAqp6N0Df6csku8 by minus@cmpwn.com
       2019-05-30T12:07:22Z
       
       0 likes, 0 repeats
       
       @314 Doesn't sound too hard. Nice to include multicast, though I'd have limited it to discovery and maybe status updates (new files) pubsub. I guess Python isn't a valid choice because that'd make a lot quicker to write. hfgl
       
 (DIR) Post #9jKsAqzNkmRVcVgxvc by 314@kawen.space
       2019-05-30T12:10:21.650326Z
       
       0 likes, 0 repeats
       
       @minus only C and C++ available
       
 (DIR) Post #9jKsAr8bCVoc560KIK by 314@kawen.space
       2019-05-30T12:10:39.029624Z
       
       0 likes, 0 repeats
       
       @minus oh and no libevent or boost::asio, those are banned
       
 (DIR) Post #9jKsArIsaI2SayoXJo by minus@cmpwn.com
       2019-05-30T12:11:17Z
       
       0 likes, 0 repeats
       
       @314 Plain sockets and select are easier anyway
       
 (DIR) Post #9jKsAraxV4V5V3GyUy by 314@kawen.space
       2019-05-30T12:11:57.739037Z
       
       0 likes, 0 repeats
       
       @minus i'm going for poll but yeah
       
 (DIR) Post #9jKsArjoy7abwXQ3JQ by 314@kawen.space
       2019-05-30T12:12:16.997326Z
       
       0 likes, 0 repeats
       
       @minus meanwhile almost everyone is trying to do it in C++ with threads
       
 (DIR) Post #9jKsArwEDzVwZ1DxeS by sir@cmpwn.com
       2019-05-30T12:17:48Z
       
       0 likes, 0 repeats
       
       @314 @minus seems like bad teachers
       
 (DIR) Post #9jKsPix7umTV2VjBQ0 by 314@kawen.space
       2019-05-30T12:18:44.658390Z
       
       0 likes, 0 repeats
       
       @sir @minus it's not teachers' fault that few people understand the beauty of poll and of lack of implicit allocations
       
 (DIR) Post #9jKsPj8TEbY5bh2F6G by sir@cmpwn.com
       2019-05-30T12:19:07Z
       
       0 likes, 0 repeats
       
       @314 @minus isn't it?
       
 (DIR) Post #9jKsbak8GPOn3LJCLY by jeff@social.i2p.rocks
       2019-05-30T12:23:07.720463Z
       
       0 likes, 0 repeats
       
       @314 @minus are you using PGM for data transfer?
       
 (DIR) Post #9jKsf4oAwEybAQrTdY by jeff@social.i2p.rocks
       2019-05-30T12:23:46.038956Z
       
       0 likes, 0 repeats
       
       @314 @minus nvm reading is hard, tcp for data.
       
 (DIR) Post #9jKslzqTmwivnoEsHw by 314@kawen.space
       2019-05-30T12:23:48.840679Z
       
       0 likes, 0 repeats
       
       @jeff @minus I don't know what you're talking about so presumably no
       
 (DIR) Post #9jKsm04IxXmaUghuq0 by jeff@social.i2p.rocks
       2019-05-30T12:25:00.283929Z
       
       0 likes, 0 repeats
       
       @314 @minus PGM is like tcp except multicast capable, would not recommend for anything unless you like gigabit NACK storms.
       
 (DIR) Post #9jKstRZn5Ht1ppz4Pw by jeff@social.i2p.rocks
       2019-05-30T12:26:21.373003Z
       
       0 likes, 0 repeats
       
       @314 @minus they are going to have a bad time.
       
 (DIR) Post #9jKtZxqFVpJi4DxR2W by 314@kawen.space
       2019-05-30T12:24:56.505270Z
       
       0 likes, 0 repeats
       
       @sir @minus fair, I'm not surestill 80% people just want to be done with it anyhow, and hate this university, perhaps because the classes are not trivial
       
 (DIR) Post #9jKtZy8KQbmKyIPsDg by sir@cmpwn.com
       2019-05-30T12:33:27Z
       
       0 likes, 0 repeats
       
       @314 @minus I suppose I ought to write an article on poll
       
 (DIR) Post #9jKtv8NxVRqgqhosjY by 314@kawen.space
       2019-05-30T12:34:13.268714Z
       
       0 likes, 0 repeats
       
       @sir @minus negative or non-negative?
       
 (DIR) Post #9jKtv8c8ejBvYgSCps by sir@cmpwn.com
       2019-05-30T12:37:25Z
       
       0 likes, 0 repeats
       
       @314 @minus encouraging readers to use it
       
 (DIR) Post #9jKuVjdKUrLOnRShCy by 314@kawen.space
       2019-05-30T11:34:47.988926Z
       
       0 likes, 0 repeats
       
       still haven't given up on doing it in C instead of C++and still haven't found any other student not doing it in C++
       
 (DIR) Post #9jKuVk7ofVjMJzj2jA by saper@word.builders
       2019-05-30T11:48:40.432095Z
       
       0 likes, 0 repeats
       
       @314 just moving stuff around into common .c files might help if your abstractions are rightDo not forget to remove some static keywords to make more stuff public
       
 (DIR) Post #9jKuVkJrwhN6vNMfVw by 314@kawen.space
       2019-05-30T11:49:59.595609Z
       
       0 likes, 0 repeats
       
       @saper umm, no, a rewrite is needed, this code doesn't have enough structure and has too much in main() to be reorganized nicely
       
 (DIR) Post #9jKuVkY35yiLdLzzcG by saper@word.builders
       2019-05-30T11:51:17.193370Z
       
       1 likes, 0 repeats
       
       @314 refactor, do not rewrite :)
       
 (DIR) Post #9jLQYbHfC2ykIqjnwO by pounce@cmpwn.com
       2019-05-30T18:39:28Z
       
       1 likes, 0 repeats
       
       @sir @314 @minus bleh, this is exactly what my university didthey told us to write a server in C and that we had to use threads to answer multiple socketsi went and asked the professor if we could use poll, since that's exactly what it's supposed to be used for, and he said i couldn't (because you need to benefit from "the performance of threads...)meanwhile 90% of the class ran into race conditions and didn't even complete the assignment.i mean, i can deal with threads because i have a lot of experience and know how to well define ownership using mutexes/semaphores, but the fact that most people couldn't do the assignment shows that it was a bad choice
       
 (DIR) Post #9jLQfTrtAB4rKYxkY4 by sir@cmpwn.com
       2019-05-30T18:40:31Z
       
       0 likes, 0 repeats
       
       @pounce @314 @minus haha, because threads == performance. Why is programming education so bad? (I know the answer)
       
 (DIR) Post #9jLQjVlq22mcOC3RpI by pounce@cmpwn.com
       2019-05-30T18:41:46Z
       
       0 likes, 0 repeats
       
       @sir @314 @minus it's so silly because the number of unnecessary locks/allocations that they made us do made it less performant than a single threaded implementation!the whole server depended on shared state, it's not like multi threading is going to speed it up
       
 (DIR) Post #9jLQwplN0nCg9wBjm4 by 314@kawen.space
       2019-05-30T18:44:38.904126Z
       
       0 likes, 0 repeats
       
       @sir @minus @pounce (is the answer "because people with work experience are working instead of teaching"?)
       
 (DIR) Post #9jLQwq2NzWoZ0i9KIS by sir@cmpwn.com
       2019-05-30T18:44:56Z
       
       0 likes, 0 repeats
       
       @314 @minus @pounce (yes)
       
 (DIR) Post #9jLRHMoDrCsaRQJUSO by 314@kawen.space
       2019-05-30T18:49:42.317473Z
       
       0 likes, 0 repeats
       
       @sir @pounce @minus for my assignment I think the recommended solution is poll, and it was said a few times during class before. people just mindlessly choose threads and futures (perhaps because the web applications class is in the same term)
       
 (DIR) Post #9jLRHN231nwF8ImX0S by sir@cmpwn.com
       2019-05-30T18:50:07Z
       
       0 likes, 0 repeats
       
       @314 @minus @pounce futures? what language is this
       
 (DIR) Post #9jLRMMmVO5hbnrtUoq by 314@kawen.space
       2019-05-30T18:51:25.425209Z
       
       0 likes, 0 repeats
       
       @sir @pounce @minus C++11
       
 (DIR) Post #9jLRMMvMr8n8FM2ZdI by sir@cmpwn.com
       2019-05-30T18:51:34Z
       
       0 likes, 0 repeats
       
       @314 @minus @pounce horrifying
       
 (DIR) Post #9jLRXLIbEtQ2OK8jFg by 314@kawen.space
       2019-05-30T18:53:28.290291Z
       
       0 likes, 0 repeats
       
       @sir @pounce @minus I presume you're not familiar with the advances of C++17 then?
       
 (DIR) Post #9jLRXLSAfJ4is0cNAe by sir@cmpwn.com
       2019-05-30T18:54:09Z
       
       1 likes, 0 repeats
       
       @314 @minus @pounce C++ advances in the same way a drowning swimmer advances away from shore
       
 (DIR) Post #9jM6VzVSsFKydNdDYu by minus@cmpwn.com
       2019-05-31T02:33:39Z
       
       0 likes, 0 repeats
       
       @pounce @sir @314 Does it count to open a listening socket and then fork? Gives a nice performance boost when you don't have interactions between connections