« first day (2170 days earlier)      last day (2773 days later) » 

much like your face
 
user1804599
Gnuplot is awesome.
 
user1804599
Lol, it supports HTML <canvas>.
 
user1804599
omg and ASCII art :O
 
I don't particularly like gnuplot. Much to hard to actually control data series and axes IME
(much like your face)
 
1:18 PM
@rightfold neat.
 
user image
2
I thought it would be great to post a png of that
 
That looks dope af
Go to C room
 
@набиячлэвэли I'd be curling up in a corner if I had to read that
 
@sehe Maybe it's not particularly great to read/use at low res, but it looks great from the purely visual standpoint
 
user1804599
 
user1804599
1:26 PM
super rad
 
super deg
Also, way too big x-domain to make the point there
 
user1804599
 
1:43 PM
New article about incrementing Gray codes /o/
 
@Morwenn Eugh, gray codes.
Reminds me of hardware stuff. >.<
 
I almost describe them from a mathematical point of view.
Almost because I'm no mathematician.
 
1:59 PM
@Morwenn you mean, you wrote it? links?
 
@Morwenn I seem to remember something about them changing only by 1 with neighboring...uh.... wait. Nvm its all too fuzzy (been 6 yrs already)
 
Time to make my first string -> int map in OCaml
 
Ven
Like, parsing a string? Hf
 
No, I get a crapload of strings,
and then I count things like occurences
Should be easy enough...
I think
 
2:18 PM
Ssssoooo
Getting a value out of OCaml's map
and just... updating that value
is incredibly difficult
 
Ven
Meh...
 
because you don't really "update" the value :P
 
2:46 PM
@ScarletAmaranth So I'm slowly and painfully learning. <_>
 
Ven
2:58 PM
@ScarletAmaranth 'a cell MyMap
You can totally update the value :3
 
user1804599
Making a benchmarking tool :)
 
user1804599
 
Xeo
3:18 PM
> What does option -s in operator = map, in c++?
dat English
 
Ven
c++ -s map
 
so visual studio has just arbitrarily decided to encrypt a single autorecover file
 
@Xeo link? IDGI
@ScarletAmaranth how can you tell?
 
Xeo
5
Q: What does option -s in operator = map, in c++?

throwerI recently take a look at my old code and i can't figure out what this option, if it's really an option, do. the code is something like: map<string, string> map; map[string1] = ("s", string2);

 
Ven
lol what angular? I can't ng-show="0" on a div. sorry what
 
user1804599
3:30 PM
 
user1804599
Hamdog, Australian guy patented this.
 
user1804599
@Ven lol Angular
 
Ven
actually it seems to be because of some bootstrap/angular mismatch
 
user1804599
lol Bootstrap
 
@Rakete1111 For extra fun, throw exceptions along the way! coliru.stacked-crooked.com/a/9545d950832569besehe 7 secs ago
 
3:41 PM
@Ven Use React noob
 
Ven
@Puppy school decides, not me
 
tell your teacher "Use React noob"
 
user1804599
Use Halogen, noobs.
 
a collection of loading spinners for React?
 
3:50 PM
nah
 
4:22 PM
@sehe windows prompted me to backup my encryption keys and certificates, I queried all encrypted files (should be none) and found a temporary "autosave" of VS - encrypted; a bit of google even found an SO question with a guy encountering the same thing - stackoverflow.com/questions/35491441/…
@sehe so it's a really strange VS bug unless there's malicious ransomware on my hard drive going after my antlr grammar
 
@sehe new riddle posted to c++1z tag!
honest riddle. I don't know the answer
:p
 
4:39 PM
Hello, Cruel World!
 
damn YouTube runs ads in the mdidle of videos now?
 
Xeo
Uploader decides that
 
user1804599
Use uBlock Origin noob
 
Has it not always
 
it thought you would like it
 
4:42 PM
@rightfold I 'm pretty sure that I do. Maybe I turned it off by accident
 
or you wanted to read Bild and disabled it "temporarily"
 
Guys how do I interpert this line of code (it is to assign a value of a register in a micro controller):

`#define CLK_DIV *(unsigned char*)0x5011
int main() { CLK_DIV = 0x18; return 0; }

I guess it is a dereference of a unsigned char pointer? what is the correct way to exaplain that define statement?
 
user1804599
That doesn't work.
 
user1804599
It must be volatile.
 
user1804599
Otherwise the compiler will optimize it away.
 
user1804599
4:52 PM
Also don't use a cast for that and don't use a macro.
 
user1804599
Use memcpy or inline assembly.
 
Ven
@JohannesSchaub-litb i kinda want to know the answer of your question
@SaeidYazdani use volatile to tell the compiler assignments to it are meaningful
 
user1804599
5
A: Automated field re-ordering in C structs to avoid padding

sigjuiceThere is a Perl script called pstruct that is usually included with Perl installations. The script will dump out structure member offsets and sizes. You could either modify pstruct or use its output as a starting point for making a utility that packs your structures the way you want. $ cat foo...

 
user1804599
WHAT
 
user1804599
PERL
 
Ven
5:03 PM
Perl is great.
@rightfold have you seen CPerl?
by the Parrot guy
 
@rightfold @Ven the compiler works fine (I use SDCC and it knows wat it is)
 
Ven
@SaeidYazdani huh?
 
I mean I dont need to add volatile to it in case of SDCC compiler (it is not GCC/MSVC etc)
but I want to know how can I exapain that line of code
explain*
 
Ven
any reason you're not use a static(/global) variable?
 
user1804599
@SaeidYazdani that doesn't matter. It's UB
 
5:07 PM
whats UB?
 
Ell
undefined behaviour
 
Universally Bad.
@Ell What happened to you being green?
 
Ell
@SaeidYazdani (unsigned char*)0x5011 casts the integer literal 0x5011 to a unsigned char* and the outside * dereferences that pointer
@Nooble idk, gravatar fucked up I think
^ :(
 
Oh do you use one of those tiling thingies
 
Ell
yeah, i3
 
5:13 PM
me 3 thanks
 
I am
mildly annoyed.
 
@ScarletAmaranth It's likely a feature
 
Ven
@ThePhD why?
 
@Ven OCaml's way of, like.
Handling data structures.
 
Ven
@ThePhD as in?
 
5:23 PM
If I'm doing "return new Vec2(this->position_vector->get_x(),this->position_vector->get_y());" where Vec2 is a class I made, who's responsibility is it to delete the object? I'm doing this so the class's position_vector can't be modified. Is there a better way of doing this? Could I return a pointer of this->position_vector but have it be unmodifiable?
 
Trying to write something that counts occurrences of words.
@francium const Vec2 do_not_modify () {return Vec2(..., ...)};
Also, use Eigen or glm.
 
@francium Rather than dealing with "who should delete it", just return it by value and keep your sanity.
 
You can also just have Vec2, and then at the call site do const Vec2 pos = get_pos();
 
Ell
@francium just do return this->position_vector
and return by value
 
Oh, now I understand what you mean.
Yea, what @JerryCoffin and what @Ell said: return by value, it makes a copy.
 
5:27 PM
0
A: Prevent Visual Studio from encrypting files

seheI suspect this is a feature that project templates/extensions can enable: From: http://www.visualmicro.com/forums/YaBB.pl?num=1362001590/0 In summary, a number of machinations of Win32 code produced .sln recovery files, none encrypted. A creation of an independent arduino project c...

 
@Ell Would that allow me to ignore memory management? Does the caller have to delete it?
 
Ell
When there is no new, there is no delete
you aren't returning a pointer, so nobody has to delete anything
 
@Ell, cool. Just to help me understand, what is going on at the stack level? When that function, that has the call to MyObject->get_pos(), gets called, does it allocate enough storage on the stack to allow the reference to Vec2 to be stored?
 
have you used int variables and values before?
it works more or less the same
 
Ell
5:31 PM
^ let's reduce to this
do you understand how:
int meaning_of_life() {
    return 42;
}
works?
 
user1804599
@ThePhD lol
 
the function's data get pushed to stack, it stores 42 in one of the return registers
the function data gets popped
 
@sehe That's rather surprising.
 
Ven
lol stack legalese
 
Ell
@francium well, it depends on the calling convention and target architecture I think vOv
 
5:32 PM
and the caller, which as storage in its part of the stack, store the register's value?
 
Ven
@ThePhD recursion, recursion, recursion? :)
 
Ell
but the point is, you don't need to think about the stack
 
Ven
@ThePhD have you seen fun yet?
 
Ell
You are not writing assembly :)
 
user1804599
@ThePhD
 
5:33 PM
@Ven fun ?
 
user1804599
module StringMap = Map.Make (String)
let count_words (text : string) : int StringMap.t =
    let rec go acc = function
        | [] -> acc
        | w :: ws ->
            let n =
                try StringMap.find w acc with
                | Not_found -> 0
            in go (StringMap.add w (n + 1) acc) ws
    in go StringMap.empty (Str.split (Str.regexp "\\s+") text)
 
go ??
Oh, go is a funciton
That almost looked like a keyword
 
user1804599
A go keyword?? This isn't Go.
 
Ven
:P
 
user1804599
go is a typical name for a helper function used to implement tail recursion.
 
5:34 PM
Wait
function
|  ...
| ...
 
Ven
@ThePhD the function keyword, which is lambda + match basically
 
What is that all about?
 
user1804599
function is short for fun x -> match x with.
 
Ven
see my previous message :c
 
<_>
This is all very confusing...
 
user1804599
5:35 PM
No, it's not confusing. It's syntactic sugar.
 
Ven
@ThePhD you understand how match works?
pattern matching; switch on steroid.
 
user1804599
You could have written let rec go acc xs = match xs with instead, it would be the same.
 
Ell
@rightfold do you know the name of it?
the syntax
 
user1804599
Except I don't want xs in scope, because then I could accidentally use xs.
 
user1804599
@Ell No.
 
5:35 PM
Yes... so function just default the name of the argument and starts a pattern match on that argument?
 
user1804599
Yes.
 
Ell
ah
I think they're called guards
 
user1804599
You can literally s/function/fun __x -> match __x with/.
 
Ell
oh no
 
user1804599
@Ell A guard is a Boolean condition on a match case.
 
5:36 PM
Wait
 
@PatrickM'Bongo I think I forgot to tell you that Lena left anet in August
 
How does function know the argument is w ?
It just... guesses from usage?
Can you have multiple arguments to that lambda by specifying multiple things?
 
Ell
@ThePhD that's the... destructuring?
 
user1804599
let f x y z is equivalent to let f = fun x -> fun y -> fun z ->.
 
Ell
hmm what is it called :V
 
user1804599
5:37 PM
That's called currying.
 
Oh, wait, you cna declare your own variables and stuff in match patterns
Right, right.
Okay, now I can... sort of read this.
 
user1804599
Patterns can introduce new variables, yes.
 
user1804599
In this case, w and ws are declared and reference the head and tail of the list respectively.
 
user1804599
I want to write a JIT compiler.
 
I have the class's vectors for position, acceleration, velocity as pointers, Vec2 a*, s*, v*

Should these be pointers? Or just regular variables, Vec2 a, s, v

My constructor:
...
this->s = new Vec2(...);
 
user1804599
5:41 PM
Don't ever use new.
 
user1804599
It's an obsolete language feature.
 
user1804599
It exists only for backwards compatibility with ancient code.
 
@rightfold so how should I proceed? How should object's be created dynamically (I know very little c++, even less about using it correctly)
 
user1804599
Just write Vec2 a, s, v; and all memory management will happen automatically.
 
Ell
@francium regular values
 
user1804599
5:49 PM
@Ven I'm gonna write a JIT compiler in Rust!
 
@francium Don't create objects dynamically unless you need to.
 
Ell
@rightfold JIT llvm ir
pls
 
user1804599
no
 
@PatrickM'Bongo moar gw2 prettiness
 
and in basically every case, even if you do want dynamic objects, it's better to use some sort of existing container like std::vector, or a per-object container like std::unique_ptr
using new directly is a bad, bad, bad choice
 
5:54 PM
@Puppy No, that's delete
there's legit reasons to use new
 
name one
 
private/protected ctors -> unique_ptr
 
pretty sure you can friend the specific instantiation of make_unique you want
although for that case I might just flat out favour a dedicated factory instead
 
@Puppy the Standard doesn’t specify in which context the constructor will be called, so that might not be enough
 
yeah, it's an unfortunate omission I think, but it's simple enough to write your own make_unique
 
5:59 PM
> "Develop and deliver appication source code"
 
user1804599
> appication
 
That... really has to be a bullet point in your job listing for a senior dev?
Like.
"Write code, pls"
 
Ven
@rightfold go ahead
 
user1804599
:3
 
user1804599
I'll learn so much from this project!
 
6:46 PM
@rightfold I have a solution for that:
#define new
auto x = new string("hello");
 
user1804599
:D
 
@LucDanton The eagle has landed. Repeat: the eagle has landed.
@ThePhD not many of us have successfully written appication code
@fredoverflow UB
Hi sehe, my brain must have really wanted relevance for that null terminator so I miss read the link. I've removed that update as it is wrong. Thanks again. — lakeweb 1 hour ago
Sometimes it actually happens. It may take a while, but hey!
I know. I must be fun at parties. Ciao
 
> This guy has worked hard to produce something that has real results and he is just getting beat up after the talk by people who weren't addressing the problem. 1 person working is better than a million bikeshedding.
words of wisdom
 
maybe
but those people can also be totally right and his solution isn't good enough
I'm not saying that it's true or not since I haven't watched the video, but it's not impossible that they're totally right.
 
7:05 PM
Bikeshedding is neither wrong nor right. So it can't be "totally right"
 
well, to be honest, I pretty much read the bikeshedding as the commenter complaining that their complaints had no substance
rather than necessarily that they were actually bikeshedding
 
interesting
 
I mean, bikeshedding is always a matter of degree
it's obvious that the difference between programming in assembly and programming in Haskell isn't bikeshedding, but calling it Haskell or Haskel probably is, but there's a world of grey area in the middle
 
@sehe Still not free?
 
Not a chance
 
7:11 PM
ugh :(
 
user1804599
7:33 PM
Can calling C from Rust benefit from LTO?
 
yes.
whether or not it actually will is another matter.
 
user1804599
nice
 
hey bois
1 week old computer fried
just yesterday got the warranty one
 
how did you fry it
 
i don't really know
i can't tell
 
7:41 PM
@sehe olive oil
 
i think i fried the charging circuit by connecting in a charger in the wrong polarity
case is, the computer kept charging after i did that and reversed polarity back to good
it suddenly stopped and that's about it for the old computer
didn't even turn back on
the poor thing
 
@ChemiCalChems Your clumsiness has long bypassed that of [Puppy vs. Linux] and [Robot vs, {knives, bycicles, public transport}] combined
Aug 13 at 16:36, by sehe
You have a real knack of choosing tools with ample support and at the focal point of community attention
 
@sehe oh well
it'll be forever a mystery
 
Seems you're not new to this then
 
@sehe to what? frying computers? i'm quite new to that
 
7:45 PM
Don't worry. You'll get the hang of it soon enough
 
@sehe it's a pretty nice experience to suddenly see your computer not charging any longer
 
It is?
 
well, no
it's nice to learn from
but it's a pain in the ass at least
and i lost 1 month worth of work on my game because i didn't have backups of it, and the technicians were even clumsier than me
they couldn't fucking understand i don't care if the partition was corrupt, i just wanted the partition and that's it
 
So you lost a month of work on a 1 week old PC that you fried
 
well, it's not that they couldn't
@sehe yep
that's quite it
because i transfered my linux distro to the new one
and deleted the old copy
 
7:49 PM
That's. Quite an achievement. How on earth did you not /accidentally/ have a backup 1 week old
 
and suddenly, pinapples
 
idontbelieveyou.jpeg
 
@sehe because i didn't think hardware would fail, so i used the drive for something else
and if linux fails, it's recoverable
so that's the story of my life
 
right
 
if software ever fails, it's not impossible to recover
if hardware fails, something can yet be done
but not if fucking technicians refuse to work
 
7:50 PM
You screwed up, that's the long and short of it.
 
@sehe pretty much
 
user1804599
I'm bored.
 
In machining, boring is the process of enlarging a hole that has already been drilled (or cast), by means of a single-point cutting tool (or of a boring head containing several such tools), for example as in boring a gun barrel or an engine cylinder. Boring is used to achieve greater accuracy of the diameter of a hole, and can be used to cut a tapered hole. Boring can be viewed as the internal-diameter counterpart to turning, which cuts external diameters. There are various types of boring. The boring bar may be supported on both ends (which only works if the existing hole is a through hole), or...
So much to learn about boring
 
@sehe no thanks, I know the drill
5
 
user1804599
super rad
 
@rightfold was about to see it, does it break like the glass one did? i hope not
 
8:09 PM
> History pro tip: If you burn down buildings, make sure you burn enough. At some point people start to call you "the great" and it matters no longer if you get caught.
3
 
So, I tried to convert my Adaptec RAID5 to RAID6, I got some error that told me to contact customer support, now it appears the controller is not responsive. In principle hardware RAID sounds like a good idea, but the implementations are completely fucked.
 
@rightfold completely ruined after 10 minutes of (intensive) skating
 
user1804599
Oh you should see the other glass skateboard video.
 
user1804599
It shattered on the first drop-in.
 
It was kinda hard to miss
 
8:14 PM
I did not see it
linky plix
 
About halfway through, and the anticipation is building
 
it's pretty unspectacular
 
8:38 PM
$ git diff
diff --git a/.gitignore b/.gitignore
old mode 100644
new mode 100755
wut
Maybe I should not store git repository backups on NTFS partitions :)
 
"We get about 1500 watts an hour"
cry
 
@Puppy sighs poor brain
 
@rightfold I haven't touched my codebase in 3 months, and after installing the latest IntelliJ IDEA with Kotlin plugin, everything compiles without even a single error or warning. That has never happened before. Kotlin seems to have become quite stable by now!
 
I'm gonna do the Typescript upgrade at work
 
2.0 or something?
Any huge changes?
 
Ven
8:52 PM
No
 
Any small changes?
 
For starters, they changed the version number...
 
:)
 
I feel like I lost brain cells
I went over to Teenage Territory
 
Ell
8:56 PM
I watch watching that 20 minutes ago
I quit after half an hour though
 
> watch watching
 
@wilx Is using namespace std; always necessary? For example, when I'm gonna do the IEEE Xtreme I'm considering using it
 
@VermillionAzure u w0t m8
 
@milleniumbug Is using namespace std; always necessary? For example, when I'm gonna do the IEEE Xtreme I'm considering using it
 
u w8t m0
 
8:57 PM
@Ell reason?
 
Ell
@fredoverflow not technical
I don't know why I thought it was going to be technical
 
@Ell I thought it was a little boring, but it was effective: for the rest of CppCon I heard many people say "if you're arguing, you're losing"
 
9:13 PM
5
Q: MS-DOS how to save a file opened with "edit"?

mric750I'm trying to open a file from the command with this line: "edit file_name" And I would like to save it after I have modified it. Do you know the way to do this ? Cheers

Timetravel confirmed
 
user1804599
My serialization library vs a JSON library:
 
user1804599
 
user1804599
Very fast #badware.
 
user1804599
or using linear instead of exponential input size: i.imgur.com/AlUZujz.png
 
any units on those axis?
 
9:27 PM
@rightfold Is that time on the y-axis?
 
user1804599
Horizontal is input size (unitless), vertical is microseconds
 
@sehe "You need the DOS mouse driver installed. (Goes in Config.sys, generally as some form of LOAD statement.)"
 
@rightfold ...But what is the input?
 
@rightfold It is not unitless, it's N and the unit is [stuffs]
 
And is it just me or does the JSON looks exponential?
while yours looks linear?
 
9:32 PM
That's probably just you.
 
9:44 PM
With windows moving towards mandatory automation, I may join the linux crowd for my next computer. If I hate the anniversary update enough, I'll look into converting this computer to linux...
 
Can't use Linux because Optimus is poorly supported
 
user1804599
Pattern matching > parser combinators:
 
user1804599
 
Same units, y = amount, x = milliseconds?
@Mikhail Yeah... It's reliable access to gpu features and game support that I'll miss so much. Pretty much everything else works fine on linux.
 
user1804599
Yeah.
 
9:56 PM
@rightfold Very nice! Good numbers to see for sure
 
user1804599
All the outliers are due to GC I think.
 
I think the reason pattern matching works so well is that it naturally defers processing. With a parser, you constantly ask yes/no questions. Pattern-matching just scans ahead and changes state as it catches data, which works really well when you expect the data to match a pattern.
 
10:10 PM
@rightfold Should run each test separately in its own process I think
 
10:29 PM
@Mikhail What is Optimus?
 
user1804599
@fredoverflow nice
 
@Aaron3468 Isn't asking yes-no questions already in changing state as it catches data means that it needs to examine the data to determine which state to transition into
 
@VermillionAzure You're correct in a sense. Parsers tend to be hierarchical, so you might have 3 or more layers of reasoning. Pattern-matching is usually just one level; data comes in and it either matches the next expected token, or it doesn't.
 
@CaptainGiraffe Some NVIDIA bullshit
Something something power efficiency something switching something
Common in laptops.
 
@Nooble Ah gaming stuff. I'm plenty happy with the CUDA support.
 
10:39 PM
@Aaron3468 So what you're saying is that pattern matching is just a 1-level parser?
They're both parser types, right?
 
your collective faces
 
@VermillionAzure Pattern-matching is really fast, but it isn't as great for reasoning about how symbols relate to eachother. Tree-like languages, such as JSON lend themselves well to a pattern-matcher. They're very closely related, but I think parsers are a different beast because they can branch execution in a lot more places.
 
@Aaron3468 I'm still quite confused
 
Ven
10:54 PM
@Aaron3468 more like, there's no way with pattern matching to write rule (rule2)+ or somesuch
 
@VermillionAzure Parsers see all the symbols at once. Pattern-matchers only see one at a time. The advantage of pattern-matching is that it only needs one pass to understand data, but a parser can do the equivalent of 3 passes by transforming the data in steps.
@Ven That's a good example I think; it shows that a pattern-matcher may need to keep memory of its state until it hits the + and knows that the brackets are the add operation. A parser can just apply rules in small chunks at a time and discard memory really quickly
 

« first day (2170 days earlier)      last day (2773 days later) »