« first day (991 days earlier)      last day (3951 days later) » 

8:00 PM
@rightfold This is pretty bad-ass shell script. I'm sure a true sh whiz would do the same with some arcane use of exec with implicitely duplicated file descriptors. But I tend to value my sanity, so I explicitely deal with the signals and the fifo creation...
Anyways, it's fully generic, make gofmt -s a parameter, of course
@Pawnguy7 Good morning. Someone is on the verge of becoming sentient, I think
 
user142019
Where would you put the file? ~/.vim/?
 
@rightfold ~/bin for me. But ~/.vim could work if you have that under VCS
 
@not-sehe what?
 
That
 
user142019
Putting ~/.vim under version control is a great idea.
 
user142019
8:02 PM
+ goodfifo=/tmp/my25481.fifo
+ badfifo=/tmp/my2163.fifo
+ trap 'unlink '\''/tmp/my25481.fifo'\''; unlink '\''/tmp/my2163.fifo'\''' ERR EXIT QUIT INT
+ cat /tmp/my25481.fifo
 
user142019
This is in the output. :v
 
@rightfold why?
 
user142019
@KonradRudolph Well, why not?
 
(you know about undofile, right?)
 
user142019
If you fuck up you can revert to whatever version you please.
 
8:03 PM
=> infinite undo
 
Putting your .ssh folder in github is also a very popular idea.
 
user142019
Haha.
 
@Nican Oooh yeah, the search results for BEGIN RSA PRIVATE KEY are hilarious and scary
 
isnt .ssh in the default .gitignore?
for github
 
@rightfold Sorry, I had just noticed the -x flag (I use that for debugging/checking proper cleanup)
Drop that
@JustinMeiners Take three guesses
 
8:05 PM
no?
 
user142019
Works great, thanks!
 
keepass db is properly encrypted, right?
 
@rightfold also, you missed the trailing unlink commands :)
 
I have a hard time finding good projects in github
 
@DeadMG cough. It better be
 
8:06 PM
what disovery methods are out there other than basic searches
and their tiny featured
set
 
try searching somewhere that hosts good projects
 
@JustinMeiners Hmmm? That's like saying "I have a hard time finding nice offices". What's the use?
 
user142019
@not-sehe Omitted them from the message.
 
user142019
Too long = bin.
 
Seriously, you ought to catch up on shell scripting. -x is bread and butter (like -e btw)
 
8:07 PM
I guess I don't know what answers I expected...
 
@JustinMeiners That's probably very close to the actual reason you're not finding "good projects": you don't know what you're looking for?
 
@not-sehe - your right - im just looking for generally interesting things that are coming out - sometimes reddit is a good source
what other sources are out there?
 
user142019
> io.ReadCloser
 
The lounge. Twitter. Blogs. Colleagues. Friends. Write something yourself.
 
user142019
8:09 PM
Go is hinting the user of this API to RTFM more closely!
 
Haha.
 
@rightfold io.ReadVeryClosely(disclaimer: "I will say ziss only wence")
 
I just realized I use ++ on a boolean O.o
 
No problem. You need not even initialize the boolean. It's all fun and games. Assuming the effect doesn't matter
 
@Pawnguy7 That is deprecated.
 
user142019
8:11 PM
Also, I discovered tabf yesterday. I got tired of typing directory names!
 
user142019
@not-sehe Syntax error!
 
@rightfold I don't "Go"
 
user142019
Go away!
 
user142019
lol
 
user142019
8:12 PM
On the train station a few days ago a stranger asked me if she could ask me something and I awkwardly said "no, go away." xD
 
@rightfold Anyways, I use buf hpp<Tab><Tab>... or e **/*Arcane*.cs
 
user142019
Change your name to !sehe or ~sehe. :D
 
@rightfold Which they did
 
@FredOverflow That actually toggles it? Anyway, it was meant to be an int, but apparently I wasn't doing what I thought I was doing.
 
user142019
@not-sehe Well, I walked away. :v
 
8:13 PM
@rightfold ~sehe, then. Less disruptive in a shell environment
 
@Pawnguy7 ++b is the same as b = true IIRC.
 
@rightfold was she hot?
 
@rightfold That's deliciously ambiguous for native English audience
 
user142019
@MonadNewb Can't recall.
 
Is --b false?
 
8:14 PM
You are false
 
user142019
Don't use -- and ++ on Booleans.
 
@Pawnguy7 --b is the same as b = false, yes.
 
user142019
They should be illegal altogether.
 
"Boolean" - so java
2
 
@rightfold You should have said "You already did".
 
8:14 PM
That's evading the question
 
user142019
@not-sehe It's the official English spelling because Boolean is the name of a person.
 
Just axe them. That's appropriate answer
 
user142019
Boolean |ˈbuːlɪən|
adjective
denoting a system of algebraic notation used to represent logical propositions by means of the binary digits 0 (false) and 1 (true), especially in computing and electronics.
 
@rightfold True
 
user142019
@not-sehe true
 
8:15 PM
lol
@rightfold jerk
 
user142019
@not-sehe off
 
@rightfold Was Integer also a person? :)
 
Maybe.
 
user142019
@FredOverflow NEIN!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
Did I say something wrong?
 
8:15 PM
@not-sehe In the South U.S. that would be confusing...
 
user142019
I want Objective-C: German Edition just so I can type NEIN everywhere instead of NO.
 
@rightfold static_assert(static_cast<bool>(~off), "sanity")
 
user142019
(Objective-C uses YES and NO as Boolean constants.)
 
@rightfold Can't you just use a #define or something?
 
@MonadNewb ?
 
user142019
8:16 PM
@FredOverflow Nein!
 
user142019
Well, NO is already a #define for ((__objc_bool)0).
 
Ell
meh. I don't know how to properly forward declare/include things
 
@FredOverflow That'd be Euler, perhaps. I want Leibnizers. (Well, or Hilbert. Or Euclid. Quite arbitrary really. Didn't the Arabs come up with integer algebra?)
 
@not-sehe Southerners pronounce "ask" and "axe" the same way.
 
@MonadNewb Oh lol. That's an intricate one.
 
Xeo
8:18 PM
@MonadNewb wat
 
@not-sehe exactly
 
Nice. How do you wish to marry a young lady, you visit her parents, and say to the father: "Can I axe your daughter's hand"?
 
I want to start saying "integer" as In Teh Grrr.
 
Xeo
Noooo, the Needless manga has ended. :(
 
@not-sehe Serial Killers would blend in great in the South.
 
8:20 PM
Well, that was needless
 
"H-He had just axed her hand in marriage, I... I-I don't understand."
 
Visual SourGrapes™
Visual ForceRape™
Visual SourceFlake™
Visual MorgueShame™
 
Ok, my design sucks. Sigh.
 
Xeo
@Pawnguy7 Draw a number.
 
user image
2
 
Xeo
8:24 PM
lol
Was not expecting that.
 
Me neither
 
@not-sehe Artsy.
 
@Xeo I don't understand.
 
We do
 
Care to explain?
Oh.
 
8:26 PM
I take back my earlier allegation
24 mins ago, by not-sehe
@Pawnguy7 Good morning. Someone is on the verge of becoming sentient, I think
 
I think I get it.
 
I jumped to conclusions there
 
Hi guys! Do you heard about C# await feature?
 
No. I'm still waiting for it
@EvgenyPanasyuk (well, duh. Obviously. MSVC is gonna have it too, __async and __await)
 
I have made emulation of await in C++ with same syntax, based on Boost.Coroutine.
 
8:27 PM
Oh cool!
 
@ThePhD Where do you live, if I may axe?
 
user142019
Hmm damn.
 
@EvgenyPanasyuk Is it basically like in Boost Asio, but without the 'yield' idiom?
 
user142019
server.ListenAndServe() // This returns. :|
 
@not-sehe I just want to show, that stackful coroutines are much more powerful. And I prefer to see them first in ISO.
 
8:28 PM
@rightfold slave.ListenAndObey()
 
@not-sehe No, Boost.Asio has implementation of stackless coroutines - they are less powerfull.
 
user142019
Yes that function name is hilarious.
 
user142019
Go's documentation also has this gem:
 
user142019
> There are 16 methods of Regexp that match a regular expression and identify the matched text. Their names are matched by this regular expression: Find(All)?(String)?(Submatch)?(Index)?
 
@EvgenyPanasyuk Well, everybody would agree there. They were just a lot harder to implement. All hail Boost Coroutine/Boost Context
 
8:29 PM
Is there any good advice on design that isn't a book?
 
@not-sehe No, Boost.Asio has implementation of stackless coroutines (not stackful)- they are less powerfull.
 
@Pawnguy7 Is there any good advice on design that is a book?
 
From what I have heard, yes.
 
@not-sehe Boost.Coroutine has very concise API, IMHO - it would be simpler to add such API to ISO, rather than await feature.
 
I wouldn't trust a design that is a book.
 
8:30 PM
@EvgenyPanasyuk I know right. Although I mentioned it because I believe I've seen boost Asio 1_54_0 implement stackful coroutines using Boost Coroutine.
 
Xeo
@EvgenyPanasyuk 'cept await isn't coroutines.
 
0
Q: creating a 2D array out of an array of string pointers in C

Sid5427This is an extension to my previous query - array of string pointers in C I have this working sample code in C int main(void) { char *array1 = "12345"; char *array2 = "abcde"; char *array3 = "67890"; char *array4 = "fghij"; char *array_2d[4]; array_2d[0] = array1; ...

 
@not-sehe Yes, I noted something like that in relnotes, but haven't looked.
 
@rightfold Beauty. Tweet worthy
@EvgenyPanasyuk This was what I was getting at :/
 
@Pawnguy7 Did you try google?
 
user142019
8:31 PM
> listen tcp 127.0.0.1:80: permission denied
 
user142019
Aha!
 
@MonadNewb I keep finding books :\
 
@Xeo await is basicly transformation of code into state machine, similar to stackless coroutine.
 
@rightfold Ooo. Dominance. s/server/master/
@Pawnguy7 Sell them
 
@MonadNewb I don't want to die. =[
 
Xeo
8:32 PM
A coroutine can do yield return stuff; in a loop and effectively be a generator, as far as I'm aware. await is just fancy future syntax sugar.
 
@Xeo Yes. await is not coroutine - but it is implemented using same principals.
 
@ThePhD lol, well mostly I was just wondering if you are in the U.S. or not...
 
@Xeo "just"? It's a bit more than that, unless of course you mean at the level that lambdas are just fancy syntax sugar too
 
Xeo
@not-sehe Yes.
It's quite fancy sugar.
2
 
Granted.
 
8:34 PM
@Xeo In fact, generated code of async/await is very similar to what you get with Asio's stackless coroutines ( codeproject.com/Articles/535635/… ). Function local variables are moved to class fields, method has similar switch which jumps to right state.
 
C++Front was syntactic diabetics
 
Xeo
@EvgenyPanasyuk Ah, yeah. But the purpose is very different, is what I'm getting at.
 
@EvgenyPanasyuk Lol @that article:
> Besides that, with today's CPUs who will notice the overhead when it's run on a non-GUI thread? Or even better - on the HDD controller...
TIL you can run code on the HDD controller
 
@Xeo yes, await is tool for particular task. coroutine - is something that can be used for implementation of await.
 
I feel that Xeo might be pointing at the fact that Coroutine might be too heavy weight
 
user142019
8:37 PM
Use a language that offers green threads and has an I/O-based scheduler.
 
@not-sehe yeah, on HDD controller, in JVM, which runs .NET code, which runs browser, which runs JS.
 
C++ is a pay-as-you-go event
 
user142019
All problems solved.
 
@EvgenyPanasyuk Oh, I forgot. asm.js
@rightfold Erlang?
 
user142019
For example, or Haskell.
 
user142019
8:38 PM
Or Go.
 
I love emscripten
 
Lambdas are fundamental.
Named functions are syntax sugar. :v:
 
user142019
CoffeeScript has only lambdas. ^^
 
@rightfold What was that other one? A bit like a girls name (Ydille or something)
 
Xeo
8:39 PM
@not-sehe Huh? No! I'd love me some coroutines.
 
user142019
@not-sehe Elixir? :v
 
Xeo
Just wanted to be clear on the difference in purpose.
 
Mmm. Anyways @EvgenyPanasyuk, any chance you're going to show us something?
@rightfold That's the one. I have a feeling you brushed that particular one pretty lightly
 
user142019
That's not a girls name. That's a potion.
 
@not-sehe Do you mean code?
 
8:40 PM
@rightfold "a bit like"
 
user142019
Erlang and Elixir both compile to BEAM so it's not worth mentioning one if you mention the other.
 
I want coroutine scheduler for C#.
 
@EvgenyPanasyuk Uhuh. What else. It's Lounge, but it's C++ at the core
@rightfold TIL
 
@not-sehe await_emu - it has implementation code
 
user142019
Elixir is basically Erlang with Ruby syntax, glorious unmissable |> operator and great metaprogramming features.
 
8:42 PM
welp
yay for Wide's in-class initializers.
 
user142019
Oh, and with UTF-8-encoded binaries as strings instead of linked lists of integers.
 
What does |> do?
 
Xeo
@EvgenyPanasyuk In any case, go and propose coroutines!
@CatPlusPlus flip ($), AFAIK
 
@EvgenyPanasyuk Ha. Also, boost::async has gotten .then support in 1_54
 
@not-sehe Yes, and in fact it does work on 1.53 - I have checked.
 
Xeo
8:44 PM
a ... |> b |> c deal instead of c $ b $ a ...
 
@EvgenyPanasyuk Cool. You've been busy. Ah there was a beta as well, IIRC
 
user142019
@CatPlusPlus a |> f(b, c) is the same as f(a, b, c)
 
user142019
Similar to |> in F# except it adds as first argument instead of last.
 
is that... uncurry?
(I'm talking nonsense here, I bet)
 
Xeo
Uncurry is a -> b -> c to (a, b) -> c
 
user142019
8:46 PM
Elixir doesn't use currying.
 
Oh, macroes.
 
user142019
(b, c) in f(b, c) isn't a tuple; it's a list of arguments.
 
Xeo
> [1, [2], 3] |> List.flatten
 
user142019
It's great for data transforming as it looks very natural.
 
Xeo
8:49 PM
Isn't flatten normally [[a]] -> [a]?
 
user142019
@Xeo Elixir is dynamically typed.
 
Xeo
So they're just coerced to lists?
 
user142019
@Xeo No.
 
@CatPlusPlus Factor!
 
user142019
8:49 PM
List.flatten is slightly different from Haskell's flatten.
 
Xeo
mh
 
user142019
It's something like
 
Fascinating
 
Xeo
coro_stack.push( std::move(current_coro) );
(*coro_stack.top().coro)();
coro_stack.pop();
@EvgenyPanasyuk ^ wat
 
user142019
There's also flatten/2 for which you can specify how many levels to flatten.
 
8:54 PM
@Xeo :)
@Xeo when (*coro_stack.top().coro)(); would yield inside - it would move that context into continuation. When continuation would be invoked - it would restore context at that stack (line 126)
 
Xeo
aha
Nope, still don't get that part.
"push, invoke, pop" just seems redundant, but I must still be missing something
 
user142019
def flatten([]), do: []
def flatten([ x | xs ]) when is_list(x), do: flatten(x) ++ flatten(xs)
def flatten([ x | xs ]), do: [ x | flatten(xs) ]
 
user142019
@Xeo Something like this. is_list checks at runtime whether the argument given is a list or not, and when is like | guards in Haskell.
 
@Xeo the top of the stack can be accessed asynchronously, from inside the coro? It needs to be in place during execution of the coro, my guess
 
Xeo
Oh, right, that queue was global
 
user142019
8:57 PM
And [ x | xs ] is (x : xs).
 
@Xeo yes, thread_local
 
user142019
I haven't got a qlueue.
 
the qlueue-qlueuex-qlan
 
@Xeo Coroutine, when it is executed, needs context, which is on that stack. After coroutine yields - context is poped. That is for case, when coroutines are chained - so after pop, context of current coroutine is restored.
 
user142019
I want quark soup.
 
Xeo
8:59 PM
@EvgenyPanasyuk s/chained/nested/?
 
user142019
> context is poped
 
Why are we so off-the chart with far fetched puns? Is it a programmer thing, or a lounge thing?
 
user142019
I hope he's a better pope than Francis!
 
@Xeo yeah, nested
 
Xeo
I see
 
user142019
8:59 PM
@not-sehe It wasn't a pun.
 
@rightfold You need higher bars
 

« first day (991 days earlier)      last day (3951 days later) »