|
Soricidus posted:not all of it, no sounds like somebody's got a port to swing to do
|
# ? Aug 6, 2017 15:09 |
|
|
# ? May 23, 2024 14:37 |
|
Great job, Luigi Thirty.
|
# ? Aug 6, 2017 15:12 |
|
Soricidus posted:not all of it, no if the problem is you're doing reflective access to technically-private things that got moved around in java 9... can't you just fall back to looking up the java 8 way if your code doesn't find the java 9 version? put that logic inside a convenience wrapper and that sounds (at least to me) like it makes everything work without maintaining two versions of the code
|
# ? Aug 6, 2017 15:58 |
|
Jabor posted:if the problem is you're doing reflective access to technically-private things that got moved around in java 9... can't you just fall back to looking up the java 8 way if your code doesn't find the java 9 version? the one I ran into is code that subclasses a built in skin, which is now in a different package. so I guess I could have two versions of that and try to load one and then load the other if it crashes but working round that I then run into a third party library that doesn't work in java 9 because it used the other dumb javafx thing, which is that there were a whole load of public methods that the javafx devs didn't want other people to use so they put "impl" in their names instead of using any form of encapsulation. surprise! everyone used them anyway. starting to think that rewriting the ui in swing might be less work
|
# ? Aug 6, 2017 16:53 |
|
JavaFX seemed so nice, too. After this, nobody will use it though. (And probably everyone will just switch to Node.js, lol. Thanks Oracle.) Luckily there's a lot of competition from Microsoft, which is doing a great job of providing a consistent and reliable development experience with the whole dotnet core thing.
|
# ? Aug 6, 2017 17:12 |
|
VikingofRock posted:So I have some C++ code that I'd like some feedback on, if someone has time to look at it. It's a class which handles concurrent memoization of the results of a function for various inputs, so that the function is only called once for each set of arguments. Here's what I've got: looks about right to me. phoneposting, but I think you can replace the verbose jumping through hoops bit with just calculation_flags_[key]; that's just personal preference though
|
# ? Aug 6, 2017 17:23 |
|
what's a good hosting provider for personal poo poo?
|
# ? Aug 6, 2017 18:21 |
|
Shinku ABOOKEN posted:what's a good hosting provider for personal poo poo? A qualified therapist
|
# ? Aug 6, 2017 18:24 |
|
Shinku ABOOKEN posted:what's a good hosting provider for personal poo poo? i use digital ocean. it's like 10 bucks per month for a needs suiting vps. never let me down and no bullshit
|
# ? Aug 6, 2017 18:24 |
|
use lightsail OP
|
# ? Aug 6, 2017 18:39 |
|
google cloud gives you an f1-micro for free forever, depending on what kind of hosting stuff you want still have to pay for bandwidth, but that's probably pennies for personal stuff
|
# ? Aug 6, 2017 19:07 |
|
Luigi Thirty posted:the sector nibblizer math was screwed up and offset $100 and nothing else was being miscalculated, causing the read’s checksum to fail make it write to a diff file so your disks are automatically versioned
|
# ? Aug 6, 2017 19:14 |
|
if its just static content then nearlyfreespeech is pretty cheap and they have some other stuff too https://www.nearlyfreespeech.net
|
# ? Aug 6, 2017 20:54 |
|
github pages does something for free
|
# ? Aug 6, 2017 20:59 |
|
there really needs to be a wikipedia that presents technical concepts in an accessible manner.
|
# ? Aug 6, 2017 21:00 |
MALE SHOEGAZE posted:there really needs to be a wikipedia that presents technical concepts in an accessible manner. yeah whenever i open some it concept page my eyes glaze over and i hastily retrat to drawing consensus from bunch of russian forums posts because these idiots abstract the language away too
|
|
# ? Aug 6, 2017 21:03 |
|
Luigi Thirty posted:holy poo poo i got my apple 2 emulator to boot a DOS 3.3 master disk i am a goddamn wizard that's really cool. I made a NES game for the SA summer game jam and of course the logical follow up to that is to write an emulator, but I kinda lost interest after doing the CPU
|
# ? Aug 6, 2017 21:21 |
|
Shinku ABOOKEN posted:what's a good hosting provider for personal poo poo? scaleway is decent
|
# ? Aug 6, 2017 22:22 |
|
MALE SHOEGAZE posted:there really needs to be a wikipedia that presents technical concepts in an accessible manner. What you don't want a jumbled explanation with whatever mathematical notation they might have learned interspersed throughout?
|
# ? Aug 6, 2017 22:25 |
|
Ala I don't really understand this so im just going to blind you with math
|
# ? Aug 6, 2017 22:26 |
|
I'll get the monad article going on simple english wikipedia
|
# ? Aug 6, 2017 23:29 |
Fergus Mac Roich posted:I'll get the monad article going on simple english wikipedia Shouldn't be too difficult, "burrito" is definitely among my most commonly used English words.
|
|
# ? Aug 6, 2017 23:43 |
|
in a fit of frustration, i have decided to propose a "lang-shitlang continuum", which i shall illustrate with the following examples: langs: java, python, dare i say go. langs have established conventions and anybody can join a project written in a lang and contribute by adhering to them. shitlangs: c++, javascript. a shitlang is a dialect construction kit. every fucker has to invent their own dialect before they can get any work done. that's not to say go is a good lang, but at least it's not a shitlang. it at least has that going for it. not all langs are good but all shitlangs are poo poo.
|
# ? Aug 7, 2017 00:04 |
|
Shinku ABOOKEN posted:what's a good hosting provider for personal poo poo? aws s3
|
# ? Aug 7, 2017 00:08 |
|
Sapozhnik posted:in a fit of frustration, i have decided to propose a "lang-shitlang continuum", which i shall illustrate with the following examples: python is a *solid* shitlang, and go is actually good. c++ probably belongs in the middle, not that I would want to ever, ever write any of it.
|
# ? Aug 7, 2017 00:19 |
|
python is almost as fucky as javascript, but the syntatic white space thing i think makes people forget how loving looseygoosey it plays with everything else
|
# ? Aug 7, 2017 00:20 |
|
VikingofRock posted:Shouldn't be too difficult, "burrito" is definitely among my most commonly used English words. this is a valid excuse to repost: http://emorehouse.web.wesleyan.edu/silliness/burrito_monads.pdf posted:The advent of fast-casual Mexican-style dining establishments, such as Chipotle and Qdoba, has greatly improved the productivity of research mathematicians and theoretical computer scientists in recent years. Still, many experience confusion upon encountering burritos for the first time.
|
# ? Aug 7, 2017 01:03 |
shitlangs are freedom
|
|
# ? Aug 7, 2017 01:22 |
im getting really tired of monad meme
|
|
# ? Aug 7, 2017 01:26 |
|
lancemantis posted:if its just static content then nearlyfreespeech is pretty cheap and they have some other stuff too Been using them for most of my websites on the side. If you barely get visits it's very cheap. As your usage (see: visits and bandwidth usage) grows, it gets a bit more expensive, but so far I've stuck with them anyway.
|
# ? Aug 7, 2017 01:56 |
|
VOTE YES ON 69 posted:python is a *solid* shitlang, and go is actually bad. ftfy
|
# ? Aug 7, 2017 02:01 |
|
go feels like they got bored halfway through making the language or something at least it did
|
# ? Aug 7, 2017 02:04 |
|
VikingofRock posted:So I have some C++ code that I'd like some feedback on, if someone has time to look at it. It's a class which handles concurrent memoization of the results of a function for various inputs, so that the function is only called once for each set of arguments. Here's what I've got: your concurrency is correct but really you might as well use a single lock and map. look up the map entry optimistically and if you don't find one call the function and do an insertion. if you actually care about parallelism between keys just store a std::optional and drop the lock temporarily, you'll need to add a condition variable though and there's some risk of priority inversion. but you're literally acquiring up to three locks here per lookup, two in the steady state
|
# ? Aug 7, 2017 02:08 |
|
cinci zoo sniper posted:im getting really tired of monad meme it's been years since i first heard of a monad, and i've read many people try to explain it, and i still do not understand what a monad is
|
# ? Aug 7, 2017 02:53 |
|
CommunistPancake posted:it's been years since i first heard of a monad, and i've read many people try to explain it, and i still do not understand what a monad is A monad is just a monoid in the category of endofunctors.
|
# ? Aug 7, 2017 02:56 |
Illusive gently caress Man posted:looks about right to me. phoneposting, but I think you can replace the verbose jumping through hoops bit with just rjmccall posted:your concurrency is correct but really you might as well use a single lock and map. look up the map entry optimistically and if you don't find one call the function and do an insertion. if you actually care about parallelism between keys just store a std::optional and drop the lock temporarily, you'll need to add a condition variable though and there's some risk of priority inversion. but you're literally acquiring up to three locks here per lookup, two in the steady state Thank you both very much for the feedback. Yeah, I thought my design was a little lock heavy, but my thinking was that each lock is only going to be held for the length of a lookup so it's not too bad. I think rjmccall your design with the std::optional is better though (although I am stuck on C++14 so I'll be using boost::optional). I'll give that a shot tomorrow.
|
|
# ? Aug 7, 2017 02:58 |
CommunistPancake posted:it's been years since i first heard of a monad, and i've read many people try to explain it, and i still do not understand what a monad is Think about types that depend on other types. Like a List<T> or a Nullable<T> or a Tuple<int, T>. Let's call that first type M, so we have an M<T>. Okay, now picture we have a way of turning a T into an M<T>. So if we have a T called t, we can turn our T into a List<T> by just making a List containing only t. So our t becomes [t]. Similarly, we can turn a T into a Nullable<T> by just saying "this T is nullable, but isn't actually null at the moment", and we can turn a T into a Tuple<int, T> by just making it (0, T). Okay, so now imagine you have a way of taking an M<T>, and a function which takes a T and returns an M<V>, and you can combine that M<T> and that function to get an M<V>. So for a List<T>, if we have a function f which takes a T and gives us a List<V>, we can make a new List<V> by applying that function to every element in the first list and concatenating the resulting Lists. For a Nullable<T>, we take our function (which takes a T and gives a Nullable<V>), and apply it to the T from the original Nullable<T> to get a Nullable<V>. If the original Nullable<T> was null, we keep it null, except now it's a null V instead of a null T. For a Tuple<int, T>, we could do something like take our function (which takes a T and gives a Tuple<int, V>), and apply it to the T from the original tuple to get a Tuple<int, V>. We could then (say) add the ints from the original Tuple and the new Tuple to get a Tuple<int, V>, or we could just keep the old int or the new int and ignore the other one. Okay, so if you can do those things to your type, and those two things behave pretty intuitively together, you have a monad. In this case, Lists, Nullables, and Tuple<int, ...>s are monads. The real question is why are monads interesting, and the answer to that is that they can be used to model various things like non-determinism, state, and stuff like that. But that's for another post.
|
|
# ? Aug 7, 2017 03:20 |
|
do people actually make their own monads? because it seems like most/all of the useful ones (lists, maybe, async, state, whatever idk) have been written already, and any new useful ones would be far beyond the abilities (or imagination) of anyone reading a 'what is a burrito' tutorial
|
# ? Aug 7, 2017 03:22 |
|
redleader posted:do people actually make their own monads? because it seems like most/all of the useful ones (lists, maybe, async, state, whatever idk) have been written already, and any new useful ones would be far beyond the abilities (or imagination) of anyone reading a 'what is a burrito' tutorial you don't "make a monad" by starting with the concept of monads and then aiming at a specific goal, you write code that solves a problem and realize after the fact that it has monadic characteristics. lots of code people write probably is "monadic" in some sense but they don't realize it because they didn't need to try to generalize it.
|
# ? Aug 7, 2017 03:31 |
|
|
# ? May 23, 2024 14:37 |
|
Conceptually, understanding what makes something monadic and how you'd create one is really useful for understanding. But in practice yeah, most things you typically come across that make useful monads are fairly common, and someone else has already done the implementation work for you. Either that or, even though it's monadic, you don't actually need it to be a monad for your specific use case.
|
# ? Aug 7, 2017 03:33 |