« first day (1804 days earlier)      last day (3127 days later) » 

6:00 AM
Anyway, gotta teach some pupils C.
C YA!
 
@AnastasiyaAsadullayeva // For more information on default constructors, see paragraph 12.1 of the C++ Standard
@fredoverflow C heers!
 
@fredoverflow I don't put them at end of line. Always separate.
// following line increments i
i %= 3;
 
lol
 
@fredoverflow I put to an arbitrary indentation. Just the next one if the line is by itself.
 
@AnastasiyaAsadullayeva hmpfh
this shouldn't be a part of code anyway
> Experience with an object-oriented language such as Java (Arnold and Gosling, 1996)
I like how he needs to annotate that
 
6:12 AM
Well in my Ideal Language (tm) comments are just annotations over sections of code
I just installed sshd on Windows and it was surprisingly painless
 
it's a part of the editor, not the language
 
6:24 AM
Editor and language should go together
 
except when it goes like in Smalltalk
which is actually an example of such binary storage I wanted gone horribly wrong
the idea was kind of there, just extremely poorly executed
> The Pharo environment includes a debugger unlike anything you've seen before. It allows you to step through code
> Pharo is made by an incredible community, with more than 80 contributors
> Feel the joy of having immediate feedback at any moment of your development: Developing, testing, debugging. Even in production environments
> the joy
 
I keep checking out cppcon playlist for new videos.
I should find something more productive to do.
 
which is more productive {chatting, scrolling for a talk}
 
Other than that, try using a version of GCC less than eight years old. You can't expect a C++ compiler from 2007 to work with OSS from 2014. — John Zwinck 22 mins ago
> a debugger unlike anything you've seen before. It allows you to step through code
Impresive
@BartekBanachewicz So. 1 of seven people who knows how to do mutability in Haskell finds it interesting when he figures out how to spell the for loop with much more varied interpunction hell than even in C# :)
 
@sehe ...right
 
@BartekBanachewicz hahahahaha
 
Only halftrolling. I don't see what's interesting there.
The thing that gets my attention is all the hoop-jumping
 
@sehe it's a special kind of mutability
I never really got the point of ST monad
 
6:59 AM
So, what is happening, if the code - clearly - doesn't speak for itself
 
It's an imperative function with local variables that maintains a pure interface
Using some tricks with RankNTypes to actually make using those variables relatively painless.
 
Sublime Text is a monad?
 
The point is, with State you have to clearly specify what type of state you work on.
Akin to s -> a -> (b, s)
in ST, state works closer to typical variables; a nested ST computation can easily introduce its own
because ST is quantified over its state - runST :: (forall s. ST s a) -> a
 
do you hear it whooshing?
 
7:03 AM
Nothing of that sticks. I guess it has been to long since I archived Haskell
 
TLDR: it's a productivity booster that allows for more powerful (and dangerous) and performant mutability that can be easily mixed with regular pure code
essentially lexically-scoped local variables in Haskell.
 
and the "easily mixing" was the interesting bit, right; was that even visible in the snippet?
 
@sehe look at the signature of imperativeSum
 
@BartekBanachewicz at the mild price of having to spell forM_ and other contraptions :)
@BartekBanachewicz looks normal. I think I could implement that in fewer lines, and with no weird syntax. Also not requiring 3 imports?
(I /get/ it's an example, but I'm not getting what is special about the signature)
 
@sehe it doesn't hit at the fact that actual mutable memory is used because of ST magic
@sehe it's foldl1 (+), yeah. But purrrrformance.
Aside from STRef, there are ST Arrays you can use
with actual in-place mutability
 
7:09 AM
@ElimGarak neat
 
@BartekBanachewicz is it faster? (surprised)
@BartekBanachewicz that seems neat. As a building block
 
@sehe Dunno about the example in particular.
ST doesn't give you any new functionality TBH
but what it gives you is a convenient contraption of mutable state, easy introduction of such, and some safety guarantees
e.g. you can't move STRefs across different ST invocations
From an imperative language standpoint this is pretty laughable I suppose.
 
What is a Domagoj but a miserable pile of DOF
 
@CatPlusPlus deadly cat
@AnastasiyaAsadullayeva ow
 
man I love whoever you are jakobandersen
 
7:13 AM
thank you thank you
 
he's always improving the C++ domain in Sphinx.
I remember a year ago I asked a question about enum support and then he added it
so I checked the repo again and this guy's still adding things to it
 
@AnastasiyaAsadullayeva he keeps talking about the class of MyMember :)
 
Anyway I just appreciate the guy's work I guess.
Also a reason I'm impressed is because the C++ domain of Sphinx actually tries parsing these declarations lol
 
7:20 AM
I've got a linux-based question, hope you guys don't mind me asking it. How do I match a filename using a wildcard? Say there's a filename of day09212015.csv and I have today=09212015. How do I match *09212015?
 
answered your own question friend
 
I've tried if [ -f *'$today'.csv.gzip ] ; then echo 'exists'; fi;
 
@Rapptz Upvote his commits then
 
@AndyProwl asynchronous exceptions ._.
 
7:26 AM
@simplycoding Why .gzip
 
@AnastasiyaAsadullayeva the stupid vendor hasn't changed file name yet...
 
lose the quotes
 
Well use double quotes, and remove the .gzip, and should be fine, no?
 
^
 
@sehe We need to discuss this, I have a feeling you are missing the nice.
 
7:28 AM
Use echo pattern_here to debug your stuff. It shows what it expands to.
 
to debug, do set -x or echo *'$today'* vs. echo *$today*
@LucDanton beat me
 
@LucDanton That's very silly it always expands to the same thing, namely, pattern_here
 
weird
 
Would downvote if I could
 
goes without saying
 
7:30 AM
so echo *today.csv.gzip is matching to the correct files
but then if [ -f *$today.csv.gzip ] ; then echo 'exists'; fi; is giving me a too many arguments error
 
spaces
Use the double quotes
 
user1804599
Wikipedia removed MathJax functionality. :(
 
@elyse so all math is now just images?
 
@sehe which spaces?
 
the ones expanded
 
7:33 AM
 
user1804599
@melak47 yes.
 
for an extra smooth zooming experience :D
template <class Base, class Derived>
constexpr bool is_base_of_v = std::is_base_of<Base, Derived>::value;
 
@simplycoding Use the quotes. if [ -f *"$today".csv.gzip ] ; then echo 'exists'; fi
 
so this is actually becoming a thing? :/
 
yep
 
7:35 AM
@melak47 seriously
 
hmm...I think I like this even less than _t :D
 
holy cheezus
 
still getting a too many arguments issue
 
better add in tons of new stuff rather than change just the few HOmetaFs that take non-type parameters :v
types are scary yo
 
@simplycoding Spaces in $today? I can't repro
 
7:39 AM
but how do you overload a template to allow std::enable_if<std::true_type> and std::enable_if<true> without breaking things?
 
you can’t, I meant to respect backwards compat still
 
> The illegal hunting of wild dildos needs to end #Stoptheslaughter2015 haha
 
> -f FileName - FileName is a regular file
expansion into multiple files?
 
Risky click of the day
 
> spaces
 
7:41 AM
@sehe What about it
 
IFS is inserted
 
Is the result a regular file still?
 
no. it's a number of arguments (and -f requires just 1)
 
wait, would a .gzip filename not be a regular file?
 
...
@simplycoding use stat or file to inspect the file
 
7:43 AM
 
so it is a regular file
 
I found this in a header: static const char * const version = "0.73";. Is it okay to put such things in the header instead of the implementation file? If yes, why?
 
if [[ -f *"$today".csv.gzip ]] ; then echo 'exists'; else echo 'not exists'; fi;
 
@Szabolcs Why would it not be OK in the first place
 
that works
sorry, it doesn't give the too many arugments error
 
user1804599
7:44 AM
Monoids are great.
 
but still doesn't say the files exist
 
@Szabolcs It’s fine in most circumstances. You have to go out of your way to make it break.
 
Well I can't repro the too many arugments error
 
@simplycoding do they?
 
@AnastasiyaAsadullayeva Because as I understand it will create a separate instance of that string in each compilation unit; while it would work, it doesn't seem right.
 
7:45 AM
That's right
 
@LucDanton yeah
 
But linker will squash them together
 
See, files in the plural.
There we go.
 
hi guys, does anyone here made a line tracking device during their junior or senior year? :)
 
@LucDanton non-type parameters are great, but it's annoying because you can't guess the signature of a template with template<template<typename...> typename> :(
 
7:46 AM
What is a line tracking device
 
@melak47 They aren’t great at all.
 
wow Luc being jealous of non-type parameters
 
@LucDanton no? :/
 
4
Q: bash test multiple files exists

StefanoCudiniHow can i use test command for arbitrary number of files, passed in argument by regexp for example: test -f /var/log/apache2/access.log.* && echo "exists one or more files" but mow print error: bash: test: too many arguments

 
user image
9
 
7:48 AM
it's like a mini car that follows a line? @AnastasiyaAsadullayeva
 
@LucDanton mine too. And the spaces are the trouble. It expands to [ -f main.cpp lol.cpp ] (assuming normal IFS)
 
oh wow. NOW I see the issue with it
 
it has sensors to follow the line
 
makes sense doh
 
@melak47 At the least they have specialty uses.
 
7:49 AM
That only took a little while
 
@rocky Ah yeah I remember doing that back when I was young
 
@sehe And how do the quotes help?
 
@LucDanton the alternatives are kind of sucky, though. passing int_<1> instead of 1, size_t_(1) instead of 1... :/
 
@AnastasiyaAsadullayeva can you help me to come up with some ideas? I have to program it using c++.
 
@melak47 How often do you have integral non-type parameters?
 
7:51 AM
I don't have a problem, okay? I can quit non-type parameters anytime I want!
 
@rocky First get the algorithm right, the implementation is the easy part
 
@melak47 It wasn’t rhetorical, it’s an actual question. Are you actually inconvenienced by that dance?
 
well, it's a group project. and my part is to build a log of the movements of the cart. the difficult part for me is that it sends the message of the log using bluetooth.
@AnastasiyaAsadullayeva
 
@LucDanton dunno
 
Are you complaining about something which doesn’t actually affect you?
23 mins ago, by sehe
Use the double quotes
you were misleading
 
7:56 AM
@LucDanton of course it doesn't affect me - unless I decide to turn everything into types everywhere :)
 
Sep 17 at 18:38, by Alex M.
for an unknown reason no more roccat peripherals in romania
one store still had some in stock :'(
I'm saved
 
@LucDanton What was the thing? I got lost
 
@AnastasiyaAsadullayeva Testing multiple files. No amount of quoting can help.
 
Oh yeah he never mentioned that
Would downvote if I could
 
yeah my bad...
 
7:58 AM
My new motto
 
the 'multiple arguments' thing was sort of a small hint somehow
I wonder what would cause such an error :v
 
Hi guys.
log4cpp is use for what?
 
timber production
2
 
user1804599
F# uses ! for dereferencing a mutable cell.
 
user1804599
So let x = ref true in if !x then "a" else "b" returns "a".
 
8:00 AM
Guys i just want to know the basic idea?
 
user1804599
This is so confusing.
 
take axe to tree
 
@LucDanton by not making it malparse and reporting no file by that name exists
@JingguoYao Correct. Setting it on with zero timeout does that. It's an execrable practice to be avoided at all costs. — EJP Aug 24 '14 at 10:10
@LucDanton ad rem
@AlexCerry then go! google is waiting
12 hours ago, by Columbo
By clicking "send" you agree to the terms and conditions.
 
user1804599
 
Xeo
ARGH FUCKING USELESS DHL FUCK
 
8:07 AM
@Xeo what'd they do
 
OP didn't deliver
 
Xeo
Got a package from murica, bill was attached to the outside of the package as required, DHL didn't do their customs job (deciding how much I have to pay in import tax), and now the package is lying around at the custom's office.
 
user1804599
Did you order a dhldo.
 
Xeo
I don't have the time to personally get it, and the service to send them the bill and have it checked again costs around 30 bucks now (it was free before).
 
:/
 
Xeo
8:10 AM
@elyse no, SGDQ tees
And neither customs nor DHL can apparently do anything
 
@AndyProwl :D
I lost all hope
 
user1804599
What is RTC?
 
shitty source control from IBM
 
Xeo
Remote T-Rex Call
 
@elyse Real Time Clock
 
user1804599
8:11 AM
@Mr.kbok XD
 
user1804599
@Xeo XD
 
user1804599
@thecoshman no XD
 
Resource...transaction control?
 
@elyse Note the pleonasm: "Shitty [...] from IBM"
 
@elyse Rolling Tycoon Coaster?
 
user1804599
8:14 AM
Tycoon Tycoon Simulator 2016
 
Rotting Turkey Carcass
 
user1804599
I found a dead mouse in the storage room.
 
user1804599
deadmau5
 
lol, he really is dead
not heard talk of him for ages
 
He's not
Unlike Domagoj
 
8:18 AM
Oh, has he run under another bus?
 
dom is ded?
 
user1804599
I gambled all my money to 0 yesterday.
 
@Mr.kbok He got ran over by a PCIe bus
 
Xeo
@thecoshman err
 
@AnastasiyaAsadullayeva at least he died REALLY quickly
 
8:20 AM
shut up
 
no one answers my question
it's been 30 minutes
 
hmm... is map.erase(map.end()) a legal thing that does nothing? or does that poop out?
 
all hope is lost. I declare the project as abandoned
 
time to post it in every room ever
 
8:21 AM
moving on
@AnastasiyaAsadullayeva good idea
 
@thecoshman poop!
 
user1804599
@thecoshman It is UB.
 
@AnastasiyaAsadullayeva ah, so map.erase(map.find(foo)) isn't a nice easy way to just make sure that it's gone, regardless of being there in the first place.
 
@thecoshman back and forth forever
 
user1804599
8:22 AM
@thecoshman just write map.erase(foo).
 
oh, map.erase(key) :P
RTFM :P
 
hmm
 
user1804599
I love how the APL guy enters as , backspace, ÷, which works because the type writer doesn't erase on backspace.
 
the four most historically active rooms are Lounge, JS, PHP, C#, in that order
@elyse which APL guy Oo
 
user1804599
8:26 AM
Beard - check
Typewriter - check
APL - check
Grayscale filter - check

Hipster confirmed.
 
ugh, no std::hash for enums in libstdc++?
 
user1804599
Your mother is an enum.
 
@elyse The typewriter is the computer right?
 
/home/cicada/help/i/give/up/rip
lel
 
user1804599
@Mr.kbok It's used as the I/O device.
 
8:28 AM
@elyse It's cool as fuck
 
user1804599
:p
 
@sehe another thing is that ST has no IO. I tried to print from inside it until I realized that inability to do that is half the point.
 
user1804599
trace master race
 
It makes sense to have a language as dense as APL if you're using a typewriter. Imagine programming Java on it XD
 
user1804599
8:30 AM
ST is great.
 
@melak47 It can’t be made to work. An SFINAE-friendly trait needs at least one additional parameter to perform the SFINAE.
 
user1804599
unsafeSTToIO
 
public class Addition { public static void main(String[] args) {
System.out.println(2.1 + 5.2); } }
 
@LucDanton so why does cppreference say this?
 
@LucDanton Or the power of love and friendship.
 
8:31 AM
> In addition to the above, standard library provides specializations for all (scoped and unscoped) enumeration types (which are not required, but usually are implemented as std::hash<std::underlying_type<Enum>::type>)
 
@elyse what I wanted was unsafeIOtoST
 
@melak47 That's because it's a C++14/17 thing iirc.
It's not a C++11 thing.
 
so?
 
libstdc++ is probably behind in the times.
It happens.
 
ugh ._.
 
8:32 AM
@melak47 use my enum hack
:D
 
std::hack<my_enum>?
 
@melak47 I meant from the point of view of specialisation users. Whoever is in control of the primary template (here, the implemention) can e.g. delegate to a private thing that does the SFINAE etc.
 
i'd say template<typename T> uint32_t hash(T val, enable_if<is_sexy<T>, void>::type *=0)
something like that I guess
 
user1804599
@Mr.kbok ⎕←2.1+5.2
 
@Rapptz I would guess C++1z since it’s not in the text right now but I’m a bit out of the loop right now.
@Mr.kbok It’s a class template.
 
8:34 AM
@Mr.kbok nullptr, pls :D
 
user1804599
@Mr.kbok Try writing a program that repeatedly prints "doggod" in Java forever.
 
oh, it is in the text
 
@melak47 sure, I'm still stuck in the past :)
 
user1804599
{⎕←⍵⋄∇⌽⍵}'dog' :3
 
"monadic" and "dyadic" functions… I've never heard those terms before
 
8:36 AM
@elyse well, let's start. public class doggod { public static void ma OKAY CBA
@Cauterite Haskell equivalent of moronic and dynamic functions
 
makes sense
 
Is there any reason why I wouldn't be able to pass a std::istringstream to a function expecting a std::basic_istream<char>?
 
@Mr.kbok that's my joke
 
@AnastasiyaAsadullayeva well sue me
 
Sure pls write your name here: _______
 
8:38 AM
                             Mr. kbok
 
@Cauterite I'm not sure what's a "monadic function"
 
@BartekBanachewicz unary
 
excuse me?
 
@AnastasiyaAsadullayeva phew
 
@Mr.kbok Even Xeo gives me proper attribution
 
user1804599
8:39 AM
A monadic function is a unary function and a dyadic function is a binary function.
 
@elyse who the hell came up with those
 
@melak47 cute
 
user1804599
@BartekBanachewicz People in the sixties.
 
8:40 AM
@elyse They were on drugs
 
@LucDanton Actually, enum hashes is C++14, not C++1z. But compilers are a bit late.
 
back when computer scientists wore white coats
 
@Mr.kbok o.O
 
__is_enum?
 
@Mr.kbok compiler thing
wouldn't wanna pull in type_traits just for that! :v
which is also based on that.
  #define _IS_ENUM(_Ty)	\
	: _Cat_base<__is_enum(_Ty)>
template<class _Ty>
	struct is_enum
		_IS_ENUM(_Ty)
	{	// determine whether _Ty is an enumerated type
	};
so beautiful
 
8:42 AM
cool, more ms platform specific
 
@melak47 I love those, they all have subtle bugs that let you do fun things with it :D
 
like what?
 
> Apply the __if_exists statement to only simple types, not templates.
 
__builtin_constant_p to do some weird things.
 
8:44 AM
> Use the __if_exists statement only in the body of a function.
 
Can you STOP SHOUTING? — sehe 2 mins ago
ma sensibiliteez
 
user1804599
Can you SHOUT "STOPPING"?
 
@melak47 If you follow none of the guidelines you can do funny stuff, like detecting if a template has been specialized or not
 
const char* foo() { return __func__; }
 
@melak47 If you use it on a template that uses __if_exists, you get a mutable type container
ie you can do procedural code with templates
 
8:46 AM
@elyse I can
 
user1804599
DO IT
 
Done
 
@Mr.kbok sounds sensible :D
 
My coworkers are looking at me weird.
 
"what are you stopping?"
 
8:48 AM
No. They're just weird
 
@AndyProwl I wish I could upvote your post more than once :D
 
@LucDanton what's that mean?
 
_Kty is illegal
you criminal, go back to australia
 
what? aren't those reserved for the implementation?
which this is? :P
 
yes
okay, fine :D
 
8:54 AM
@melak47 c2’s take
 
@elyse your question is interesting. Wonder why you didn't share it here
 
user1804599
no idea
 
undefined is not subtyping. It is an error. Why do you think this is subtyping? — AJFarmar 14 hours ago
some people don't get it though
 

« first day (1804 days earlier)      last day (3127 days later) »