Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
clappski
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
31.
▲
by
clappski
5y ago
>I did not wanted to fiddle with openssl directly It's actually fairly simple to use openssl directly if you have a good handle of sockets in general, it's basically just a case of doing some initialisation and using SSL_write&
32.
▲
by
clappski
5y ago
C++ has a great array story - `std::array<char, N>`. `fopen` is a C API, so yeah you have to pass it C-strings. Note that Rust has to do the exact same thing (albeit calling `open64` rather than `fopen`), you can see it in the source
33.
▲
by
clappski
5y ago
There's lots of individual data points in time series data, so having a high file:data point ratio would cause issues including running out of inodes, the identifying handle of a file at the OS level.
34.
▲
by
clappski
5y ago
Pretty sure that raw new has been a smell since C++11, 10 years ago, since the introduction of smart pointers that aren't terrible. Maybe longer than a few years since last time you looked at it!
35.
▲
by
clappski
5y ago
Isn't understanding how to use your tools part of being effective at getting work done? Sure, recloning and cp your changes to a fresh local repo will _work_, but what happens on the day you don't have access to the remote? What h
36.
▲
by
clappski
5y ago
Thanks, that last bit clears it up for me. I've never touched Rust but write C++ everyday so don't really know much about what is guaranteed vs. what is less likely due to borrow checking/compiler verifaction
37.
▲
by
clappski
5y ago
I suppose that depends on your definition of normal everyday work though, if you're developing device drivers or something that needs to write into shared mmap'd memory or whatever `unsafe` is something you're going to need a
38.
▲
by
clappski
5y ago
100mbps is much much faster than a the majority of consumer broadband connections, I don’t think that’s a particularly realistic figure. Don’t these games have to support a lowest common denominator type speed rather than a fantastic one? I
39.
▲
by
clappski
5y ago
At the client, trust me when I say that basically everyone else didn't want us to be there apart from my immediate line manager! Wasn't a fun experience getting grilled by the adjacent team lead, my boss's boss and the other
40.
▲
by
clappski
5y ago
But a char[] could be binary data for all the tool knows, do you want it to do a buffer overflow and end up bricking your computer? std::string etc. exist exactly because char[] is unsafe for holding strings unless you carry around a size.
41.
▲
by
clappski
5y ago
> the chances for triggering a buffer underflow / overflow exploit are zero Doesn't the mere existence of unsafe make this untrue? From a quick google I can see at least one[1] so the chances are definitely a lot higher than ze
42.
▲
by
clappski
5y ago
Pretty sure that the C compiler writers, writing their C compiler in C++, probably don't feel the same way. Especially as they're also the same people as the C++ compiler writers.
43.
▲
by
clappski
5y ago
I imagine if you printed an actual string it would look as you expect, issue is that you're printing a char array and not a C++ std::string/_view
44.
▲
by
clappski
5y ago
3440 x 1440 isn't 4k, it's an ultrawide 1440p monitor
45.
▲
by
clappski
5y ago
Yeah, similar story from Western Europe - graduate consultancy gave me 3 months of Java programming material to essentially self-teach myself straight out of university with 0 programming experience. 3 months later I was starting a C# role
46.
▲
by
clappski
6y ago
> I don't want to live in a world without American freedom of speech - where we can't be blunt and speak our minds. Freedom of speech isn't the freedom to not be publicly judged about what you say.
47.
▲
by
clappski
6y ago
JIRA tickets are used by everyone managing every sort of project. Development teams, recruitment pipelines, long term strategy - thinking that it's just for 'IT' is silly.
48.
▲
by
clappski
6y ago
Adding custom comparators is trivial with lambdas; std::sort( begin( c ), end( c ), []( const auto& lhs, const auto& rhs ) { /* some comparison impl for the value_type */ } ); Same for everything that take a compa
49.
▲
by
clappski
6y ago
I'm not sure that peaceful sit ins are comparable to calling for the deaths of those working in the building that you're currently ransacking, especially after you've murdered one of the security staff. A group of people viol
50.
▲
by
clappski
6y ago
With a name like 'FASTER' I would have hoped that I could find some benchmarks against other persistent key-value stores, anyone else have any luck?
51.
▲
by
clappski
6y ago
It's the first page I try when I think I'm having connection issues at least, to verify it's some service that's broken rather than my local network
52.
▲
by
clappski
6y ago
Probably fairer to say that the virtual inheritance architecture is idiomatic to GUI libraries rather than any particular language? You even mention GTKmm, a C++ wrapper around a C library that leverages inheritance.
53.
▲
by
clappski
6y ago
A lot of NIC manufactures provide either some hooks into something like DPDK or simple LD_PRELOADable libraries that offload the network syscalls (socket, poll, recv, etc.) into a library that talks to the NIC directly using mmap'd IO
54.
▲
by
clappski
6y ago
What you said resonates with me a lot, you’re not alone in how you feel. I find myself losing my temper irregularly over things that wouldn’t normally irritate me. I normally chalk it up to some secondary affect of other stressors or whatev
55.
▲
by
clappski
6y ago
The issue isn’t anything to do with copying - the issue is that a string_view is a non-owning reference, and that std::string on the right side is an rvalue. Meaning that when you deref the char* in the string_view you’ll segfault or summon
56.
▲
by
clappski
6y ago
You have to add special handling for the case that T == std::reference_wrapper<T> so you can call .get() on it to expose the underlying value. In the case of std::optional vs a pointer type (raw or smart) you can consistently use oper
57.
▲
by
clappski
6y ago
I agree that the language in general is more complex mainly due to additions to the STL, but what has changed in the syntax that you think make it weirder? > The pace of change has been crazy for such a old and widely used language. Not
58.
▲
by
clappski
6y ago
Really sorry about the people you lost, that really sucks. Also gutted that you missed Maceo Plex and Honey Dijon - I've had plans to see Bicep and a bunch of others cancelled/moved, it's understandable why but still so frust
59.
▲
by
clappski
6y ago
> all I could think in my first month in central London was "wow it's so cheap here". I think you're possibly the first and last person to have that thought ;)
60.
▲
by
clappski
6y ago
As someone else from the UK, we're so far removed from anything that the Romans did that I doubt anyone has an emotional response to it (as you point out). I wouldn't even consider it correct to say that we're ethnically or c
More ›