« first day (2177 days earlier)      last day (2764 days later) » 

user1804599
12:01 AM
@ThePhD some ideas, mimicing what some languages do: lpaste.net/1773754019311779840 This is very easy to parse and type check.
 
user1804599
12:16 AM
I don't know what kind of code you want to generate.
 
user1804599
Do you want to generate shaders?
 
From what I've gathered, LePix will be doing image manipulation (not shading). So it'll be similar to shader-langs, but more alike to general computing languages with a rich set of types and syntactic sugars.
 
user1804599
Make it a lisp and get infinite syntactic sugar.
 
user1804599
 
user1804599
look at my beautiful code
 
12:25 AM
Very nice. What messages is port 6379 being used to share?
 
user1804599
Redis commands and results.
 
Very cool. So then you can use it for interprocess communication and long-term storage for your code?
 
user1804599
I use it for associating things with slave addresses.
 
@rightfold Your name is still rightfold on github, right?
 
user1804599
yes
 
12:38 AM
Did my mention of you in my repo ping you?
 
user1804599
No.
 
RIP.
 
user1804599
Oh, yes.
 
user1804599
It did.
 
BIKESHED: filename extension?
.lpx is used by Microsoft's LaTeXPic editor.
 
user1804599
12:39 AM
.lepix
 
Works for me. vOv
 
user1804599
lepra
 
user1804599
haha RIP
 
@Mysticial I had trouble reading that
 
Wow, seriously?
.-.
The Professor's not gonna read our goddamn issue request pages, ffs, and we're allowed to get help from TAs and other people. I don't see why we can't have others give helpful comments. .-.
Well, whatever. Now the issue page is locked to collaborators. =/
@rightfold Sorry. :<
 
user1804599
12:55 AM
pub fn command(&mut self, parts: &[&[u8]]) -> io::Result<()> {
    let c_parts: Vec<*const c_char> =
        parts.iter().map(|p| p.as_ptr() as *const c_char).collect();
    let c_part_lens: Vec<size_t> =
        parts.iter().map(|p| p.len()).collect();
    unsafe {
        redisCommandArgv(
            self.0,
            parts.len() as c_int,
            c_parts.as_ptr(),
            c_part_lens.as_ptr()
        );
    }
    Ok(())
}
 
user1804599
Absolutely amazing.
 
Ell
Rust?
 
Yeah, that's rust.
 
user1804599
Rust 💘
 
user1804599
Rust ftw
 
1:11 AM
:) I'm very happy with how well-designed Rust is. A lot of the tradeoffs that usually come with leaving C++ for a smaller, more expressive language aren't there.
 
user1804599
Rösti
 
Ell
Roti
 
I think Lisp and Rust are the only full alternatives to C++ I could find. The rest I looked at carried some tradeoff that left a bitter taste; laziness, less performance, forced paradigm, etc.
 
Ell
Lisp? :V
Which one?
 
1:27 AM
ANSI Common Lisp at least.
 
user1804599
ATS
 
2:29 AM
Welp.
I've sent more e-mails than I've ever wanted to.
 
2:42 AM
    bm_section:
        process(stuff);
        process(other_stuff);

    bm_section:
        cleanup(stuff);
        cleanup(other_stuff);
Label syntax is kinda nice.
^ idea for instrumentation directives using label syntax
It would trigger periodic code measurements. Each bm_section starts a new measurement and also ends the previous one. So in the end you can see which part of the code takes most time.
Samples for start_impl:
    main.cpp:72-77: 1698 us
    main.cpp:77-82: 415 us
    main.cpp:82-87: 59 us
    main.cpp:87-end: 823 us
I should try improving it.
 
Ven
3:36 AM
@StackedCrooked you macro-abusing monsters?
@Aaron3468 lol
Common Lisp is missing a LOT of stuff (like, idk, threads?)
@ThePhD "can't have external input"? Rip u
@rightfold that's not enough. You're using hiredis right? You need to cleanup the replyPtr, and check reply->integer
 
Lisp for the most part isn't quite competitive with C++ but a few franken-lisps or special libraries can make it
In other words, C++, Rust, franken languages, resurrected languages, or gtfo I guess.
And only two of those require significantly less boilerplate
 
anyone in here know any jquery?
 
@Ven in-code measurements are very effective in finding the hot spots. This has helped me a number of times.
Especially in a large code base written mostly by other persons.
 
@Ven E-mailing the professor to ask if suggestions from sources outside the group / class.
 
3:52 AM
@ThePhD I had an Adventure today. actually I've not finished it yet, but it's definitely winding down
I'll probably tell the tale tomorrow afternoon, when I rouse from my post-Adventure coma
it is too long for mobile
 
@jaggedSpire Neato. Stop by the voice chat tomorrow, then! I'll be there (maybe), since I'm taking a bus to get home.
 
How to jquery hard
 
 
1 hour later…
user3295818
5:07 AM
Hi dudes I need help.....
 
user3295818
anybody ter?
 
user3295818
 
user3295818
Need logic for this
 
5:39 AM
@raghunath hello mate, and be sure to read the rules first: loungecpp.net/the-law/the-rules
@raghunath the question AFAIU the Stack Overflow scope doesn't even belong to the site, rather Programmers S.E. or Maths S.E.
@raghunath so, i really advise you to post on one of those, you'll get more attention, and it's going to work as the site was designed
@Mysticial hello! could we discuss a profile run tonight or better tomorrow? i've catastrophically overslept you see :)
 
Lmao.
This optional implementation is trash.
What the fuck.
Why didn't I vet this code before.
He relies on a union with an unsigned char as the first dummy item to prevent initialization
rather than just using a fucking placement new like a regular human being.
 
6:08 AM
"dereferencing type-punned pointer will break strict aliasing" that's the point, you ding dong, it's char[] storage.
 
Nobody in my calculus study group is mathematically gifted :laugh: It's not much of a study group unfortunately
 
"invalid static_cast from char* to sol::error*" I hate you, gcc.
 
@Aaron3468 Of course it's a study group. The question is whether it's studying calculus, or (for example) emptying beer mugs.
 
"dereferencing a type-punned pointer will break strict aliasing rules" What if that's what I WANT since it's supposed to be a meaningless blob of storage, gcc.
Hm? HM??
 
@ThePhD It sounds as if you may want a reinterpret_cast instead of a static_cast (but it's hard to say without looking at the code).
 
6:13 AM
@JerryCoffin I tried both static and reinterpet. GCC doesn't seem to care and warns no matter what (and with -Werror, it's fatal).
And there's no constexpr memcpy.
Sigh. Of course, the ever-helpful chorus of answers on SO: "Don't type-pun, memcpy!"
*reinterpret_cast<T*>(&storage_[0]); // char storage_[sizeof(T)];
 
@ThePhD I started to ask what you're doing, but on second thought, I'm pretty sure I don't want to know.
 
@JerryCoffin I'm implementing optional<T>, it's not like I'm going mad!
union picks the first member variable and just fires off the constructor for that one, right?
I guess I now understand why this dev used the dummy variable approach with a union. Of course, this breaks the stupid Unreal 4 engine, because the UE4 devs are fucking nightmares on legs.
 
@JerryCoffin Haha, that is true. It seems our fields of specialization are dubious algebra, caffeinated beverages, and friendly conversation
 
... And I can't have an unnamed union, because GCC will fucking throw another warning.
FfFfFfff.
 
Boost.Optional?
 
6:19 AM
> No, the warning is gone from all releases that are still maintained.
Fucking liars.
There's gotta be a way to shut off at least clang and GCC warnings for this...
 
gcc is open-source, right?
 
Yeah.
 
Maybe you can fork it and smother that error forcefully. If you have (lots of) spare time, you could probably even figure out a bug fix.
 
:l
I'm... just gonna look at you for a bit.
 
:3
 
6:27 AM
Phfew.
There, now it compiles cleanly.
But only after..
#if defined __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif
I honestly don't know how GCC expects people to use things like std::aligned_storage_t and crap.
If it's going to shove that error down their throat all the time.
 
Keep that snippet because I feel like you'll be using it in many of your projects
 
Hopefully it's just GCC that does this and clang isn't a PoS.
> error: constexpr constructor does not have empty body
Hoooo
leeeee
FUCK.
I guess it's time to officially drop clang 3.4 and gcc 4.9
I really don't want to drop both of them... ergh.
> 4.9.4
Wait
I'm compiling in -std=c++1y mode.
Why isn't advanced constexpr kicking in for the compiler??
> Relaxing requirements on constexpr functions N3652 5
Welp. GCC 5 is now the baseline.
So sorry, GCC 4.x folks?
Man, GCC 5 was only released 1 year ago.
That's a pretty low bar. =/
I can't placement new the ctor like this...
Bwuh.
 
6:53 AM
Obsolescence sucks, I suppose.
 
People not upgrading sucks.
 
It's not fun to having dialogue with GCC 4.x and 5.x compliers :/
 
5.x is perfectly fine
It's got most of the goodies.
It's 4.x that's getting on ALL my nerves.
We have GCC 4.8 at school. =/
 
Yep... considering how complex compilers are, older versions are often obsolete the moment new major versions are released.
Simpler programs like word processors can still be usable decades afterwards, if you can run it or emulate it on your platform
 
Ahh
Much better.
 
7:26 AM
Nice!
 
7:52 AM
@LucDanton mouais
ça sent le réchauffé
 
wasn’t it worth it to poach all these devs though
wasn’t it
 
> deep Twitch integration with broadcaster-led events, achievements, and rewards
Have they even watched Twitch Plays Pokémon
 
never heard of it
 
> Morgan Le Fay
:cringe: ce jdm de merde
 
Morgan le Fay /ˈmɔːrɡən lə ˈfeɪ/, alternatively known as Morgan le Faye, Morgen, Morgaine, Morgain, Morgana, Morganna, Morgant, Morgane, Morgne, Morge, Morgue, and other names, is a powerful enchantress in the Arthurian legend. Early works featuring Morgan do not elaborate her character beyond her role as a fay or sorceress. She became both more prominent and morally ambivalent in later texts, in particular in cyclical prose works such as the Lancelot-Grail and the Post-Vulgate Cycle, in which she turns into a dangerous enemy of King Arthur and antagonist of some tales. The earliest accounts of...
 
7:59 AM
Attends tu es en train de dire que "Morgane la fée" est en anglais "Morgan le Fay" ?
doux jésux
 
Working on a parser is hard...
 
well you can’t expect Anglo-Saxons to manage Norman borrowing from Breton now can you
 
Speaking of which the article is available in Breton
 
@PatrickM'Bongo enjoy
 
8:03 AM
reminder that is is the same people that still spell it 'Lyons'
then again, maybe that’s payback for Londres
 
@LucDanton well maybe there are several
 
no it’s for just the one
> auto f1 = import_mangled<int(int)>("library.dll", "foo::bar");
impressive, from Boost.DLL in 1.62
> Currently, the Itanium ABI and the MSVC ABI are implemented. The MSVC ABI requires boost.spirit.x3 support, […]
spooky
 
Boost 1.62 is nectar to my sensory organs
Fiber particularly
> The name (from either Old Welsh Medraut, Cornish Modred, or Old Breton Modrot) is ultimately derived from Latin Moderātus
thanks luc now I'm lost on wikipedia for the next hour
 
mods=gods
 
I recently was thinking about printf and how it's implemented at the lowest level.. The CPU's only means to access the outside is through memory read/write. (I could be wrong though..) So, basically printf, or any IO, is essentially a write to a special address?
 
8:16 AM
yeah
technically printf isn't very low level though
 
Is it possible to obtain the value that magic pointer? I want to write to it!
 
it writes its formatted output to a buffer and then calls the kernel syscall write
(assuming libc printf)
 
@StackedCrooked IIRC, printf etc are writing to memory that's abstracted in a way similar to an os file
 
if you're talking about embedded printf, then it likely writes to a special magic address which represents the output
@StackedCrooked If you're talking Linux you can mmap the fd for stdout and write to the memory in question, I suppose
I've actually never tried.
 
At the end of the day, even standard streams are OS dependent features. The only I/O you're guaranteed to have is the language's structure itself. Beyond that it's all conventions.
 
8:24 AM
@PatrickM'Bongo I don’t think it’s anything to write home about
 
But this might help you hone in on the windows implementations of the streams
 
user1804599
Probably the world's greatest ever police report. https://t.co/3WsypX4tcH
 
It always discomforts me when I realize just how much abstraction even simple programs like "Hello, World" rely on. Almost feels like vertigo.
 
user1804599
@StackedCrooked No; the write system call writes to a file descriptor. Typically, stdout is piped to a terminal which renders it as text and does another system call write that to the display. The latter system call does what you are speaking of
 
Ah, so kernel takes over and it knows what buffer/address the file descriptor maps to?
 
8:28 AM
@LucDanton Fiber is great
 
user1804599
printf doesn't do I/O directly; what happens depends on what file descriptor 1 is piped to
 
@StackedCrooked If you have an OS, yes
printf is just formatted output to a file that happens to be stdout
 
user1804599
The kernel keeps an entry for each file descriptor. The type depends on how it was created. It may be a file or a socket or pipe etc
 
that’s fine yeah but 1.62 overall is bugfixes. which is fine and exactly what I’d want and expect, but like I said nothing to get excited about either
 
if you have no OS it can be implemented differently
 
8:29 AM
@rightfold The reason why I wonder is because at the lowest level there's only mov.
 
"this expression has type unit but an expression of type int was expected"
 
AFAIK
 
Well, damnit.
 
@LucDanton don't ruin my mood
 
I was on a roll too.
 
user1804599
8:29 AM
@StackedCrooked no, there are intrinsic operations that tell the ALU to do things
 
There are?
 
stacked smoked something
 
user1804599
Just copying memory around won't give you computation
 
user1804599
You need to be able to make decisions
 
@rightfold technically mov is turing complete on x86
 
user1804599
8:31 AM
Then it does more than just copying memory around
 
your intelligence is beyond limits
 
user1804599
He was talking about copying memory around, not x86 MOV
 
2 mins ago, by StackedCrooked
@rightfold The reason why I wonder is because at the lowest level there's only mov.
You're wrong.
 
user1804599
No. He was speaking of a lower level than x86 MOV
 
How do you know are you him no you're not you're wrong
 
user1804599
8:33 AM
He obviously is aware of the fact that instructions are not translated into high-level MOV
 
Clearly he is not
 
user1804599
@Ven yeah; I didn't implement result usage yet
 
A one instruction set computer (OISC), sometimes called an ultimate reduced instruction set computer (URISC), is an abstract machine that uses only one instruction – obviating the need for a machine language opcode. With a judicious choice for the single instruction and given infinite resources, an OISC is capable of being a universal computer in the same manner as traditional computers that have multiple instructions. OISCs have been recommended as aids in teaching computer architecture and have been used as computational models in structural computing research. == Machine architecture == In a...
> Common choices for the single instruction are: Subtract and branch if less than or equal to zero. Subtract and branch if negative. Reverse subtract and skip if borrow. Move (used as part of a transport triggered architecture)
:P
 
user1804599
@StackedCrooked the ALU has circuits for arithmetic; having only copying would just be a circuit with the same output as input
 
user1804599
@StackedCrooked such instructions are ultimately composed of simpler instructions
 
user1804599
You can make a single-instruction CPU where the instruction interprets a Python program
 
Yeah. I suppose perfect copy does not allow for anything else than just that.
 
user1804599
If you can copy and NAND then that's already cool
 
user1804599
You also need to decide where to copy from to
 
user1804599
and
 
8:43 AM
TIL about NAND.
 
Is it, uh
Wait, no, nevermind.
 
@LucDanton So any future libs you're excited about
 
user1804599
I want a CPU that evaluates lambda terms
 
nothing comes to mind
 
user1804599
As its exposed instruction set
 
8:47 AM
Uh.
@rightfold If I have a match clause in OCaml with let blah = function ...
 
user1804599
That's equivalent to let blah x = match x with
 
And I have a case like | x -> do_this_thing_that_returns_nothing then_do_this_other_thing_that_returns_stuff
How do I sequence those 2 things that come for that case?
And return the second bit?
 
user1804599
Different return types isn't allowed
 
No I mean
I want to NOT use the first value's return
 
user1804599
You can do let _ = x in ()
 
8:48 AM
Just the seconds
second*
But the first function should still execute
I'm trying to figure out how to do multiple things in a single case expression, basically.
 
user1804599
Do you want to ignore both return values?
 
Just the first one, then return the second for the case expression.
 
user1804599
Eh, so what would the value be in the first case?
 
user1804599
You can't just return a value in only one branch
 
I, uh.
I think I confused us both. >.<
 
user1804599
8:50 AM
You can use option
 
user1804599
None and Some x
 
user1804599
Oh, you want to sequence expressions and return the result of the last one?
 
user1804599
That has nothing to do with pattern matching
 
user1804599
Just put a semicolon between the expressions
 
now that I know how to pipe to more, I think I'll be much more comfortable finding my way around a terminal
 
8:52 AM
Oh. Okay.
 
@Aaron3468 less is more
 
Except that windows doesn't seem to have it ^^
 
user1804599
If the first expression returns non-unit then you should write let _ = x in instead
 
user1804599
So that it is clear that ignoring the result was not a mistak
 
user1804599
RIP Pieter
 
9:00 AM
TIL people still use more
> V8 supports “green threads” – simulated threads implemented entirely in userspace, with cooperative switching
 
@PatrickM'Bongo Linux users have a weird fetish for terminal applications, and unfortunately they are some of the most prolific programmers.
Q.Q
 
urgh, those are fibers, green threads use preemptive switching
8 mins ago, by Luc Danton
@Aaron3468 less is more
 
user1804599
Lolc++
 
9:22 AM
eyy I’m ruby league
@PatrickM'Bongo my status as a scrub is finally correctly reflected
 
Ven
9:37 AM
Hi scrubs
 
why hello
 
50 mins ago, by Aaron3468
Except that windows doesn't seem to have it ^^
 
@milleniumbug >windows
found your issue
 
Ven
Time to go home and watch that war3 tourney
 
9:52 AM
@PatrickM'Bongo when did you first realise you are a video feed?
 
Regrettably the rest of the series is paid
 
actually what with the super convenient transcript feature I wouldn’t mind watching one or two of those as long as it’s about gw2 pvp
 
I'll do my best
 
10:09 AM
@Telkitty hey kitty. how are you adventures in china? hope you enjoy it :P
 
user1804599
10:25 AM
I want to move to the USA.
 
what, so you can get gunned down by a mental patient?
 
user1804599
10:51 AM
Teach lambda calculus
 
user1804599
Logic in general.
 
@fredoverflow Cpp Fever? :P
 
user1593881
If anyone's feeling hungry there's this thing called CodeChef. Horrible, just horrible.
 
@fredoverflow I like that he checks whether RVO works or not
 
user1804599
@fredoverflow Reminds me of the Numberphile calculator unboxings.
 
12:01 PM
Made my first benchmark where I compare avx and sse and scalar. Didn't expect such a difference. I wonder if it's because of the vectorization (less CPU time) or because of the larger blocks when writing to memory.
 
user1804599
(let ((now (nth 2 (decode-time))))
  (if (or (< now 8) (> now 19))
      (load-theme 'black-on-gray t)
    (load-theme 'ramangalahy t)))
 
user1804599
I'm so smart.
 
Ven
Yeah you'd be except you usually keep emacs open for days. So...
 
user1804599
12:21 PM
I really love, how you can wrap C APIs with little overhead, in Rust
 
user1804599
And very safely.
 
user1804599
pub enum Reply<'a> {
    Status(&'a [u8]),
    Error(&'a [u8]),
    Integer(i64),
    Nil,
    String(&'a [u8]),
    Unknown,
}
 
user1804599
These slices point directly into the original Redis reply; no need to copy the data.
 
user1804599
12:33 PM
@Ven fixed :3
 
I tried gman's C++ code from his branch prediction question. But I can't seem to reproduce the difference. It runs fast with or without initial sort.
Oh. On Linux it's slower without the sort.
My compiler on OSX must be broken then, since it fails to mispredict branches.
 
12:48 PM
lol
compiler could optimize it into the branchless version I think
 
user1804599
Hmm.
 
1:21 PM
alright
now I have progressed to the supreme level of being able to render two components vertically.
 
user1804599
Hmm.
 
user1804599
Haha, I had a problem. Guess how I solved it.

One more level of indirection, motherfucker.
 
@rightfold that's a theme recently
 
user1804599
Indirection solves everything.
 
I've fixed a problem adding two layers of indirection yesterday.
And had to add some indirect calls to fix a problem that has arisen because of that, but eh. ;p
 
user1804599
1:26 PM
Oh, your language allows no side-effects? How do you do side-effects, then? Indirectly, motherfucker.
 
user1804599
MOTHERFUCKER
 
@rightfold Almost everything, adding indirection wouldn't solve the stack overflow I got because of one of the layers of indirection I had. :P
 
user1804599
1:37 PM
Laziness can save so many allocations.
 
user1804599
Rust iterators are great.
 
Once again disappointed that the railjet trains don't actually have jet engines...
 
user1804599
Fucking nice
 
1:53 PM
ok
now I have progressed to the somehow even more supreme level of horizontal rendering as well.
 
user1804599
Upgrading compilers is fun.
 
... you got fatter?
 
nope
currently the only thing you can actually render in a list is text.
 
You don't really have a knack for design, have you?
 
2:11 PM
you're assuming that this is actually me attempting some kind of design
 
user1804599
include_bytes!("funnel/tape_addresses.lua") this is great
 
user1804599
Include a file as if its contents were a byte string literal.
 
@rightfold Is that some weird form of static type erasure? (That's what I gather from quickly looking through the RFC, but eh, I don't want to spend much time on this.)
 
user1804599
The return type will not capture anything other than "this implements <trait>" but it will still codegen as usual.
 
user1804599
No boxing or pointers.
 
2:15 PM
So, static type erasure.
 
user1804599
It's in a sense like an existential.
 
Xeo
@rightfold interesting, I would've expected some virtual shenanigans
 
user1804599
Can't wait for it to become stable.
 
they'll be required if the compiler doesn't know the real type statically under the hood.
 
user1804599
But it does. :p
 
2:26 PM
otherwise, the compiler essentially just codegens it as if it returned the real type, but only permits operations from the trait to be used
 
Xeo
yeah, AFAICS it has to carry the actual type in the background somewhere
which means it can't really cross, like, DLL boundaries, if I understand it correctly
 
$ cargo build
   Compiling mod_core v0.1.0 (file:///home/rmf/dev/gust/mod/core)
error: internal compiler error: ../src/librustc_const_eval/eval.rs:1100: resolve_trait_associated_const: unexpected vtable type
 --> lib/svc/src/core/boot.rs:2:5
  |
2 |
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: github.com/rust-lang/rust/blob/master/…

thread 'rustc' panicked at 'Box<Any>', ../src/librustc_errors/lib.rs:602
 
user1804599
You can also do, e.g. Box<Iterator<Item=i32>>. Then it will use a vtable.
 
wait, there are expected panics?
 
user1804599
2:30 PM
@Xeo Rust doesn't offer any ABI stability at all, I think.
 
Xeo
ah, okay
so that's not a concern, so far
@R.MartinhoFernandes pachi pachi pachi
 
@Xeo I think the primary use case is for returning things like map<filter<iterator, closure>, closure>.
 
user1804599
Once that feature becomes stable I can remove a whole custom iterator: gist.github.com/rightfold/610d2c111570e4c230dc25033b1090da
 
user1804599
In favour of a simple filter_map.
 
user1804599
I can't currently use FilterMap return type, because I don't know the closure type. Closure types are like lambda types in C++.
 
user1804599
2:33 PM
I could do &'static Fn(…) -> … but ehhh
 
user1804599
Actually why not
 
@R.MartinhoFernandes How are you liking rust so far and should I consider learning it?
 
Xeo
@Borgleader Answer to the second question should generally be: "yes"
 
@Xeo generally wrt to rust or $(SOME_LANGUAGE) ?
 
Xeo
latter
 
2:36 PM
Funny, the caret thingy in the error doesn't match line 2 in that file.
 
@Xeo Also, how are you these days? :)
 
user1804599
cargo test has this bug where it prints all the diagnostics twice.
 
user1804599
And not consistently. More like a race condition.
 

« first day (2177 days earlier)      last day (2764 days later) »