|
Krankenstyle posted:gonadic jo denial monadic jo is principled jo, you can't escape out of it only >>= it unless you use unsafePerformJo of course
|
# ? Nov 30, 2018 21:02 |
|
|
# ? Apr 19, 2024 23:22 |
|
gonadic io posted:monadic jo is principled jo, you can't escape out of it only >>= it That's how David Carradine died.
|
# ? Nov 30, 2018 21:05 |
|
Sagebrush posted:i'm working on a project that needs to be able to detect the presence of one specific object in a video stream. imagine like jian-yang's hot dog/not hot dog software, essentially, but maybe even simpler because i'm looking for literally the same object over and over again instead of a general category of hot dogs. however, the object has a fairly complex shape and i need to be able to detect it from any angle. probably a small python script with keras or something? https://developers.google.com/machine-learning/practica/image-classification/ i haven't used the fast.ai library but from their posts they try to make it very easy to get something working with sensible defaults https://yashuseth.blog/2018/03/05/hotdog-or-not-hotdog-image-classification-in-python-using-fastai/
|
# ? Nov 30, 2018 22:02 |
|
Asleep Style posted:That's how David Carradine died. i thought that was with some sort of multithreaded jo loop?
|
# ? Nov 30, 2018 22:32 |
|
Powerful Two-Hander posted:i thought that was with some sort of multithreaded jo loop? java.awt.HeadlessException
|
# ? Nov 30, 2018 22:45 |
|
Krankenstyle posted:java.awt.HeadlessException runtime error: <<loop>> (that's a legit GHC error message btw)
|
# ? Nov 30, 2018 22:55 |
gonadic io posted:runtime error: <<loop>> bröther...
|
|
# ? Nov 30, 2018 23:39 |
|
cinci zoo sniper posted:bröther... oh man that reminds me of that game developer brøderbund. i used to like playing Wings of Fury but then one of my friends said "propaganda piss" and i was like yea obviously and i kinda figured he had heard his dad say it or something. Anyway he's a racist now so also even though broderbund merely means brother-association, there is a fairly nazi odor about it https://www.youtube.com/watch?v=YWsNqJ6YP88&t=115s
|
# ? Dec 1, 2018 00:46 |
|
Krankenstyle posted:oh man that reminds me of that game developer brøderbund. Whoa that's way better looking than the version I used to play on Apple IIc.
|
# ? Dec 1, 2018 05:48 |
|
Finster Dexter posted:Whoa that's way better looking than the version I used to play on Apple IIc. tbf the amiga1000 is like 4 years newer than the appleiic
|
# ? Dec 1, 2018 06:54 |
|
and also Apple II video was an amazing hack in 1977 when a literal few kilobytes of RAM was common, but by 1980 was laughably baroque and terrible chunky pixels where the palette to use is influenced by the high bit of the byte with different lines in different areas of memory, what the hell Woz
|
# ? Dec 1, 2018 11:30 |
|
yeh, as long as you didnt have the amiga with the bad ram lol
|
# ? Dec 1, 2018 11:51 |
|
https://www.youtube.com/watch?v=vFh07lXfxTY
|
# ? Dec 1, 2018 11:54 |
|
Finster Dexter posted:Is this why game engines are written in c++? because they're literally programs that are generating specific game programs? that, and the zero/predictable overhead. if c++ didn't have templates, game engines would be written in c Asleep Style posted:This is a really interesting post. Gonna have to think hard about if these are the type of problems I would like to have at my job. if you ask me, c++ the language is perfect for any job. development is front-loaded with type system trickery and it tends to be pretty bottom up as a result, so you won't see your program come together for a long time, but letting the type system do most of the correctness work, I've written literally bug-free code under crazy time constraints and without the benefit of automated testing. I used to love c++ as a sort of intellectual game, but I've used it professionally for years now, and I've come to appreciate it as a unique and (currently) irreplaceable language its weakest point is actually third party libraries: there isn't a standard anything. no standard build system, no standard library format, no standard repository, not even consistent coding conventions, and setting it all up is so hard and outside of most programmers' skills that a lot of libraries will have misguided "simplified" build systems or binary distributions. it's a lot of work setting up a project with several external dependencies hackbunny fucked around with this message at 23:05 on Dec 1, 2018 |
# ? Dec 1, 2018 23:01 |
|
lol 50fps
|
# ? Dec 1, 2018 23:15 |
|
gently caress yeah, procedural Copper lists. I'm so totally over demoscene music, though.
|
# ? Dec 2, 2018 00:19 |
|
Glorgnole posted:does anyone around here work with CUDA? i figured this out eventually, meaning that i found someone who had run into the same problem and then did what they did (here, if you're curious), which boils down to representing the contents of each voxel as short2 on newer architectures and ushort2 on older ones. my big takeaway is that CUDA device code is a giant flaming heap of "#if defined __CUDA_ARCH__ >= XXX" to work around the radically different behavior between different compute capabilities and releases
|
# ? Dec 2, 2018 02:02 |
|
hackbunny posted:if you ask me, c++ the language is perfect for any job. development is front-loaded with type system trickery and it tends to be pretty bottom up as a result, so you won't see your program come together for a long time, but letting the type system do most of the correctness work, I've written literally bug-free code under crazy time constraints and without the benefit of automated testing. I used to love c++ as a sort of intellectual game, but I've used it professionally for years now, and I've come to appreciate it as a unique and (currently) irreplaceable language yeah, but you're a bit of a special case because you extremely know your poo poo and have also internalised all the dark corners of c++ etc etc. i guarantee that if you set me or most of my coworkers loose on a c++ project that we wouldn't be able to write "bug-free code under crazy time constraints", even given a longass ramp-up time. what about c++'s type system do you find so powerful? i personally haven't heard anything special about it, but that may just be because it's not new + cool. what makes c++ different to any other compiled, statically-typed language in this respect? why couldn't you do the same thing in e.g. java?
|
# ? Dec 2, 2018 04:25 |
|
compile-time safety in most languages means type safety. in c++, you have a whole metaprogramming layer above the type system that can encode arbitrary constraints.
|
# ? Dec 2, 2018 05:09 |
redleader posted:yeah, but you're a bit of a special case because you extremely know your poo poo and have also internalised all the dark corners of c++ etc etc. i guarantee that if you set me or most of my coworkers loose on a c++ project that we wouldn't be able to write "bug-free code under crazy time constraints", even given a longass ramp-up time. IMO one of the most interesting (and unique within mainstream languages) aspects of C++ types is allowing constants as template arguments. For example you can have a template representing an NxM element matrix, and then instantiate that with specific N and M values giving you e.g. a type representing a 2x3 matrix. Then, you can do compile-time operations on those arguments, like making it so a 2x3 matrix times a 3x1 matrix gives a 2x1 matrix. This enables all sorts of neat type-level programming, like ensuring that matrices have the correct dimensions, physical quantities have the correct units, etc. This can be pretty easy to abuse and write yourself into corners with (e.g. what if you need to incorporate a matrix whose size is determined at runtime?), but occasionally it is very useful.
|
|
# ? Dec 2, 2018 05:22 |
|
what tends to trip me up with c++ are all the subtle details you need to know that aren't warned about at all (at least when I was using msvc 5 years ago) like, when you don't have a constructor it will autogenerate not 1 but 5 different ones for you. if you write one constructor yourself, well....better also write the 4 other ones because if you don't then things will behave subtly incorrectly at some point later in your program, etc
|
# ? Dec 2, 2018 09:57 |
|
redleader posted:what about c++'s type system do you find so powerful? i personally haven't heard anything special about it, but that may just be because it's not new + cool. what makes c++ different to any other compiled, statically-typed language in this respect? why couldn't you do the same thing in e.g. java? I can encode state in a variable's type. thanks to zero overhead, I can do it without actually adding any state. thanks to move semantics, I can enforce state transitions. you can encode state as statically checked type in java too, but you'll have overhead and no real equivalent of move semantics. heck I can't even enforce non-null pointers in java (except with nonstandard annotations I guess). you can add a c++ wrapper in front of a c library/api, and express lots of constraints that are left implicit in c, and make them explicit and enforced at compile time, again with zero overhead compared to handwritten code the irreplaceability of c++ comes from its ubiquity and the fact that it's largely binary-compatible with c. I think I already mentioned that my last big c++ job was a cross-platform application core that ran on three different operating systems (ios, android, windows) and implemented three different bridges to higher level languages (objective c++, jni, c++/cli), which no other language outside of c can realistically achieve biggest issue in c++ is the extremely poor support for pattern matching: compile-time only, and even then mostly a hack. I'm not hopeful for the future either
|
# ? Dec 2, 2018 15:08 |
|
hackbunny posted:the irreplaceability of c++ comes from its ubiquity and the fact that it's largely binary-compatible with c. rust has decent interoperability with c via the foreign function interface, but c++ isn't supported and you need rust bindings for whatever you want to use. libc has well supported "clean" bindings, but for other libraries it's a tossup. even if they exist, sometimes they will be someone's bespoke safe wrapper around the raw c library, which may or may not be documented, isn't guaranteed to be maintained and is certainly unsupported by the library authors if you run into bugs or need help
|
# ? Dec 2, 2018 16:56 |
|
hackbunny posted:you can add a c++ wrapper in front of a c library/api, and express lots of constraints that are left implicit in c, and make them explicit and enforced at compile time, again with zero overhead compared to handwritten code this sounds like a neat idea but I never encountered something like this, most of the time I see is just a shallow wrapper to make everything more OOP or something I'm familiar with a couple of instances where c++ forces you to be more explicit than c and I'm not sure how I feel about that. like you have to be a little more pedantic with casting and type signatures have to be more precise because of overloading
|
# ? Dec 2, 2018 16:57 |
|
The_Franz posted:rust has decent interoperability with c via the foreign function interface, but c++ isn't supported and you need rust bindings for whatever you want to use. libc has well supported "clean" bindings, but for other libraries it's a tossup. even if they exist, sometimes they will be someone's bespoke safe wrapper around the raw c library, which may or may not be documented, isn't guaranteed to be maintained and is certainly unsupported by the library authors if you run into bugs or need help also definitely less powerful type system, so stuff like borrowing is baked into the compiler instead of being a library which I imagine it could be in c++. does have good pattern matching and build tools though
|
# ? Dec 2, 2018 16:58 |
|
I like that C++ forces you to be way more implicit when casting. The reasoning is two fold: 1) In most cases, you shouldn’t be casting, you should be setting your variables correctly to begin with. 2) static_cast<int> is easy to search for vs (int)
|
# ? Dec 2, 2018 18:45 |
|
I have a terrible casting story: In my last job I noticed the ingress website would take numbers and cast them to floats and then decimals in sql. Most of the numbers where things like age, phone number and drivers license id numbers which meant a phone number like 123-4213-333 would get cast to 1234213333.0000000000001 and then recast as a decimal with very high precision but also 0 numbers are the decimal point. its all the way down
|
# ? Dec 2, 2018 19:38 |
|
Symbolic Butt posted:this sounds like a neat idea but I never encountered something like this, most of the time I see is just a shallow wrapper to make everything more OOP or something think unix, where file handles are simple ints, except there's nothing simple about them. not all files support all operations, some are special files that only work with a very specific set of functions (eg. ipc objects), and they represent resources that need to be managed somehow. not to mention how easily it is to pass an int around by mistake. on windows the situation is just as bad, as HANDLE is almost as vague as int (it's a typedef for void *), but it can represent dozens of different resources that have absolutely nothing to do with each other. with c++ you can wrap them in more agreeable types that can't be assigned by mistake, passed to the wrong functions by mistake, leaked by mistake etc. I tend to skip "official" c++ wrappers to popular libraries as they often are pretty misguided, eg. solving this issue with class hierarchies and virtual methods (pointless! it's not like the underlying c library lets you override the implementation so why bother with virtual?) c++ is not unique in this (some of it, with significantly more effort, can be done even in C), but it's the most comprehensive I know of
|
# ? Dec 2, 2018 21:06 |
|
"template metaprogramming is worth it to avoid a 16-byte overheard wrapping an int into an EpollFd"
|
# ? Dec 3, 2018 01:33 |
|
template metaprogramming is something i looked briefly into in college and decided to nope over to .net instead
|
# ? Dec 3, 2018 02:35 |
|
Kevin Mitnick P.E. posted:"template metaprogramming is worth it to avoid a 16-byte overheard wrapping an int into an EpollFd" C++ code:
|
# ? Dec 3, 2018 02:44 |
|
TheFluff posted:
did you just tell me to gently caress myself
|
# ? Dec 3, 2018 02:52 |
|
bob dobbs is dead posted:did you just tell me to gently caress myself parental advisory: explicit constructors
|
# ? Dec 3, 2018 03:01 |
|
akadajet posted:template metaprogramming is something i looked briefly into in college and decided to nope over to .net instead extremely same op
|
# ? Dec 3, 2018 03:04 |
|
TheFluff posted:
what the goddamn gently caress
|
# ? Dec 3, 2018 03:16 |
|
AggressivelyStupid posted:what the goddamn gently caress source it's from a class (in c++ a struct is a class but with all members default public) representing an endian-independent unsigned 48-bit integer. the template voodoo is there to select the correct constructor depending on the machine's native byte order, so if you pass it a native uint64 it'll do the right thing automatically without having to branch at runtime. the constexpr thing tells the compiler this code can be evaluated at compile time, so you can use this 48-bit int where a constant expression that is known at compile time is required. it also does this while being a "POD", plain old datatype, binary compatible with C interfaces. i think. i'm not actually good at this, i just know people who expose me to this while claiming it has legitimate uses in video processing. i need to share the pain, sometimes. TheFluff fucked around with this message at 03:42 on Dec 3, 2018 |
# ? Dec 3, 2018 03:38 |
|
The good thing about c++ is that someone who really understands it can write abstractions the are only a little bit leaky. This means that you, as the person writing code to actually do a thing, can just use them without caring what's under the hood too much. If you have someone who doesn't understand it that well or is just a little bit lazy writing your abstractions though, you're in for a bad time.
|
# ? Dec 3, 2018 03:42 |
|
yeah it's a sword with no handle but it doesn't cut you very much if you're really good at holding it
|
# ? Dec 3, 2018 03:45 |
|
TheFluff posted:source POD doesn't apply to classes I think. that's the other difference between structs and classes
|
# ? Dec 3, 2018 03:46 |
|
|
# ? Apr 19, 2024 23:22 |
|
are there many computers left whose native byte order isn’t little endian?
|
# ? Dec 3, 2018 09:04 |