« first day (2142 days earlier)      last day (2808 days later) » 

4:00 AM
I know, but idk how github works really lel
 
user4710450
I will take a screen shot
 
I'm a professional idiot, if you haven't noticed. 'Cept I'm only really an amateur, as I don't get paid
 
@Darkrifts Mostly you create subdirectories and put files in them like normal, then add them to the repository just like stuff in that repo's root directory.
 
download the GUI app for windows and everything will be fine
 
user4710450
git CLI is the best on Ubuntu
 
4:03 AM
@bitcode I think I used the github gui once. Maybe even twice. Pretty sure not three times though.
 
I just use Github.com for now
 
user4710450
@bitcode They suck
 
@JerryCoffin not you, Darkrifts
 
user4710450
@Darkrifts Git is really easy to use. It's much simpler than Github.com itself
 
@bitcode I'm just pointing out that based on my experience, I wouldn't particularly recommend it.
 
4:04 AM
I have a solution
Just put it all on one file :D
 
@JerryCoffin oh
 
breaks out in hives
 
It's why the thing is at github.com/Darkrifts/bad-ideas
 
user4710450
176
Q: Creating folders inside github.com repo without using Git

softvarI want to add a new folder to my newly created GitHub repository without installing the Git setup for (Mac/Linux/Win). Is it possible to do so? I can't have Git all the time with me when I work on different systems/machines. I know how to add files directly in a repo on github.com/[USER]/[REPO]....

 
@JerryCoffin I'm asleep and I'm not reading right lol
 
4:05 AM
@Darkrifts That keeps the makefile really simple too.
 
"bad-ideas

Where everything I make falls into

Like, seriously, nothing in here should be used as a serious solution to problems, but if nothing else works..."
 
user4710450
@bitcode lol. I woke up an hour ago!
 
@Ehsan Not entirely true.
 
user4710450
exactly 08:07:27 in UAE
 
@JerryCoffin but if you don't pay attention how else will you git to understanding? (low hanging fruit I know)
 
user4710450
4:09 AM
@JerryCoffin Completely agree with the commands, it's a bit demanding to memorize to them
 
@jaggedSpire Seriously, yes, you do it progressively.
 
From the brief looks I've taken through the book they offer for free on the git project website the book seems to explain it fairly well.
 
Time to work on string compression
 
I'm hoping it's one instance where you don't get what you pay for :P
 
But not exactly accurate, to create an entropic affect
 
4:11 AM
@Darkrifts what language do you use for the FOS-X project?
 
Like a Compress(string s) and Decompress(int i)
@bitcode C#
Easy to read from files
Some of \bad-ideas will be C#, C++, Java, FOS-X, FOSCode, and other dumb things
 
user4710450
Guys have you heard anything about CodeGolf?
 
@Ehsan I'm not talking just about memorizing commands. I'm talking about understanding it well enough to use some commands well.
 
CodeGolf?
 
user4710450
Ah yes
 
4:13 AM
CodeGulf War
 
user4710450
Typo sorry :(
 
Well, FOS-X has it's own chatroom btw.

FOS-X

Discussion room for FOS-X programs, corewar, and reductions fr...
Filled with images atm though, because I'm lonely lel
 
where do you host the source code?
 
I don't host source code for it
 
@bitcode Why bother with a Code Gulf, when Microsoft can sell you the CodeBlackHole (aka "SourceSafe")?
 
user4710450
4:14 AM
Last message 8 days ago, it's dead!
 
It's Closed Source, but simple enough that you don't need it
 
@Darkrifts checkers or connect 4 is a good way to start. Connect 4 was an interesting challenge in navigating a 2d array
 
@Aaron3468 I was talking about making a git repo for storing ideas :P
 
user4710450
@Darkrifts I think they have made something for storin' ideas!
 
Notepad is fine, but why not make my chaos public :D
 
user4710450
4:19 AM
No I mean a cloud one
 
user4710450
to share your ideas
 
user4710450
 
@Darkrifts Is there are a reason you would make it public? Somehow reminds me of a 1995 web pages dedicated to some lady's poodle--public simply because she could, not because anybody else was particularly likely to care. Rule #1 discovered in the early days of the web: yes, it lets anybody publish what they want--but most people don't have much to say that anybody else really cares much about.
 
Nope
Just because
 
And no, I'm not saying you don't have anything to say that's interesting. I'm saying it's open to question whether this is particularly interesting.
 
4:29 AM
@Darkrifts btw, if you're bored, feel free to debug my python code. It's failing a few test cases on hacker rank and I'm not entirely sure what the problem is yet. I've commented the problem at the bottom of the paste.
I wouldn't be surprised if there's a typo because this is from the website that was giving my typing headaches by overwriting lines.
 
Wait, it is supposed to just get a sum of an array?
oh
 
Why get sum when you get all of the array?
 
I can see how this could be difficult
I don't see a typo just jumping out at me.
not good at python tho
 
And this is what an ugly working solution looks like: pastebin.com/QRqk7ZSM
 
Hmm
I'm trying to find a way to compress a string in a way that it can be potentially reacreated, but probably not
 
4:38 AM
think the scope guard answer is done
 
Anyone have any bad compression practices I can look into?
 
@Darkrifts It depends on whether you are compressing strings or plaintext files. Strings will need a very good binary compressed format, text files usually use a dictionary approach
 
Strings
 
nope need to add the correct includes I know trying to find the right boost includes has driven me crazy before
 
But it doesn't need a good binary compressed format, it needs a "meh" compressed format
I'll work on it
 
4:41 AM
ASCII is fairly well compressed. You could also devise a format where common letter pairs use less bits than usual.
 
@Darkrifts One string in isolation, or something like a file?
 
One string in isolation
Like "hello world" could be recreated as "helowrld"
But each time getting progressively more corrupted
 
@Darkrifts Are there constraints on its contents (e.g, "only letters +space")?
 
Nope
Any ASCII character
 
you want huffman coding
 
4:43 AM
Nah, I want there to be loss
 
Hmm?
 
any reason why this doesn't compile
 
Why rebuild them? If lossiness is the aesthetic, then just randomly delete up to 1/3 of the word's letters
 
@Darkrifts Since you don't need correct decompression, start by eliminating doubled letters. Then eliminate vowels. Then check for doubled letters and eliminate them again. After that, mostly just delete semi-randomly, working from the middle toward the end, and finally toward the beginning.
 
Xeo
4:45 AM
@Aaron3468 That looks like something that could be trivially done by unfurling the 2D arrays into 1D arrays and then zipWith (+)ing over them. Not that I have looked all that far into it
why even 2D arrays?
(if unfurling doesn't work, you can still recursively zipWith (+) over it, I think)
Well, not just (+) I guess - since it should be ignored if 0
 
Because they're targetting new coders so they use easily intelligible formats. I go back every once in a while when I'm bored and they're simple as long as I don't abstract so far that debugging gets difficult.
@Xeo True, I can just unroll and it would be easier; iteration is the bug-prone and verbose part of the code
 
and posted
three answers in as many days I am on the warpath
 
Xeo
@Aaron3468 Nah, I just checked the actual problem on hackerrank. Since it's defined as a 2D plane, doing it in 1D wouldn't make it easier, I guess
 
user4710450
Interesting!
 
user4710450
Any one intending to attend this conference?
 
Might want to ask in the Ruby room.
 
Anyone wanna give me a string to encrypt and decrypt as a test?
 
how about "Anyone wanna give me a string to encrypt and decrypt as a test?"
 
5:14 AM
So weird. Apparently the bug in my python code was that max(map(len, self.search_pattern)) was adding 1 to the length when I did not expect it to...
 
"Hello World!" gave me "dd-WW", "-", "dd1--W", and "-rr" on different occasions
Maybe tweak the differentiation to be less obvious
Well, in messing with a differentiation of {[-1, 1], [0, 2], [-1, 1]} + 1, I once got "dlroW" from it lel
 
5:31 AM
Got it going good now :D
Any suggestions?
 
(0, 0) + (2, 2) != (3, 3), so I've got an off-by-one error somewhere... And amusingly it wasn't in the bounds checking. It turns out that I kept placing the - 1 at the correct spot, but after the wrong parenthesis.
 
Anyone want a string to be messed up?
 
And somehow if False - 1: and if True - 1: is valid code. God I hate weakly typed languages. Type coercion with warnings is more effective
So in python False - 1 == True and True - 1 == False. Good to know!
 
yee
 
time for bed
night
 
5:44 AM
night
Well, I'm sure glad I have my optimization function. It optimized a string of ABCDEFGHIJKLMNOPQRSTUVWXYZ to just Y
 
How the fuck?
 
Because I made it
Why would it work?
1 hour ago, by Darkrifts
I'm trying to find a way to compress a string in a way that it can be potentially reacreated, but probably not
Nailed it
 
But you can't compress that. Those are all completely unique characters.
 
@Darkrifts What metadata does it use to decompress that? Because in no world is that even remotely potentially decompressible
 
Well, it was a lot more properly compressed, but I used some random number generation to make it entropic
That one was hilarious though lel
Other ones were like the alphabet normally, but only after M
 
5:50 AM
@Aaron3468 erm, no
 
Hmm, has a bug in it. It only wants to go to half of the string's length
 
> > Are all those `#[inline(always)]` necessary?
> Nah. It all gets inlined anyway. I just figured OP might like them.
how thoughtful
 
lel
 
@Ryan Try it and have fun. Python 2.7 is the most common interpreter atm, though 3 is becoming more common
 
5:51 AM
for(int i = 0; i < toCompress.Length; i++)
      {
        if(toCompress[i] == c) count++;
        else {stack.Push(count); count = 1; stack2.Push(c); c = toCompress[i];}
      }
 
>>> False - 1 == True
False
@Aaron3468 tried it
 
This is apparently only reading half the string
 
I don't see why people wouldn't use the latest Python.
@Darkrifts Use range-based for.
 
-1 is a truthy value, but it's not equal to true.
 
@Nooble Like how?
Everything works (as well as it should anyway) but this loop
 
5:52 AM
@Ryan Fair enough. In some conditions it is automatically coerced to boolean.
 
(-1 is also truthy in C++)
 
True != truthy
 
it’s true but it’s not True
 
@Darkrifts I don't remember the syntax on the top of my head of course, no one ever does. Google "range-based for"
 
Ah
The foreach from C# in C++
 
5:54 AM
The problem is that python is mostly strongly-typed in the same sense that cottage cheese is mostly cheese
 
use Haskell
 
great
Still only going through half the string
 
@Aaron3468 yeah, cottages don’t even taste that good
 
@Darkrifts Pretty sure that's std::for_each. But trust me, range-based for is the solution to everything.
 
@Aaron3468 That 1% pure evil is evil
 
5:55 AM
Could probably cure cancer in high concentrations.
 
Well, I tried it, and it still only went to M in ABCDEFGHIJKLMNOPQRSTUVWXYZ
 
... what are you doing to the poor alphabet?
 
I compressed it
Ended up with only the letter Y
wait....
 
Tactically insert std::cout everywhere.
That's how you debug.
 
Well, i'm getting a count of objects in a stack, but it only reads from Y to M
No idea what happened to Z and after M
I multiplied the amount to check by 2 and got to I, added 7 and got to G. Wtf are you doing
 
6:01 AM
The solution is to use a heap instead.
 
How could a heap solve this problem?
 
So what approach did you decide on?
 
@Darkrifts It's much larger, and bigger is better.
 
I counted letters, put in numbers, and pulled my hair out trying to get it to parse the the string
@Nooble This stack is of arbitrary size
 
What are you trying to do again?
 
6:04 AM
for(int i = 0; i < stack.Count; i++)
      {
        int a = stack.Pop();
        char b = stack2.Pop();
        a += (x[0] * x[1] * x[2]);
        RET += b + "" + a;
      }
This should go from Z to A, but only goes from Y to M
 
Why have you implemented a stack.
 
what's stack. what's x. what's the language
 
Instead of using something reasonable
 
Stack = a stack, stack2 = a stack, x = an integer array of the differentiation, and C#
 
That's C#?
 
6:06 AM
Problem is, no idea what's causing the problem, and C# room is empty
And yes, but bad
 
> What are you trying to do again?
In words, not code snippet
 
1 hour ago, by Darkrifts
I'm trying to find a way to compress a string in a way that it can be potentially reacreated, but probably not
 
> So what approach did you decide on?
 
I think this is where everything breaks down and fails
 
Describe your algorithm
 
6:07 AM
@Ryan Shuffle!
 
1) Count number of sequential same characters, 2) Change that number by the differentiation 3) return a string of characters and numbers showing this
 
What is the differentiation
 
That's not really compression is it?
 
Is this a description of artificially corrupted RLE?
 
Right now it's {[-1, 1], [-1, 1], [0, 2]}
 
user4710450
6:08 AM
differentiation in calculus?
 
@Ryan Define RLE?
 
Run-length encoding
 
@Ehsan Nah, just how much a count can be changed by
 
AAABBBBC -> 3A 4B 1C
 
@Ryan Yep
 
user4710450
6:09 AM
@Darkrifts Oh, I see
 
But meant to only be "somewhat" corrupted, not missing half of it :P
Or everything but the letter Y
 
What are you using a stack for?
(let alone a couple of stacks?)
 
To push the count of the character and the character it counts
It's not supposed to be efficient either
 
so, you should read about the state of the art before starting
 
I'm working on making it work before optimizing :P
 
6:11 AM
also import tensorflow as tf
 
It now actually reads the whole thing :D
SSSlinks awwwa
 
6:35 AM
rle s = [(length g, head g) | g <- group s]
haskell to the rescue again
 
ADG
i use normal g++ compiler, what is the difference (in short) from c++11/c++14 ?
 
On the other hand, I would never use Haskell where I/O is the important component of the program and code needs to execute in real time...
 
@Aaron3468 why not?
 
@ADG C++14 is closer to having modules.
Though, now that I think about it, is everything as close to never?
 
Because lazy evaluation makes interactive code very difficult to write correctly
 
ADG
6:39 AM
@Nooble and module are?
 
@Aaron3468 nah you probably haven't used haskell enough
stick it in a do & you're golden pretty much
 
@ADG think python modules, but in c++
 
@ADG A promise for a better future.
 
C++ is getting promises and futures?
 
Oh that too.
 
ADG
6:40 AM
@ChemiCalChems you mean libraries?
 
@Ryan it has them already
 
I think.
C++17 is a lie.
 
@ADG we already have them, modules are easier to work with
 
ADG
but what;s the difference?
 
Haskell is slower than C++, in addition to the IO monad being a pain to write clean code with
 
6:41 AM
@ADG One is better than the other.
 
ADG
hmm
 
@Aaron3468 Monad is a funny word :)
 
ADG
and which version can i use streams and lambda?
 
It's certainly a nice language when the purity is an asset to the project at hand... but when the project is non-deterministic, Haskell becomes a nightmare.
 
idk it looks pretty clean to me

do
print 5
print 6
 
6:42 AM
@ADG streams? iostreams? lambdas are available from c++11 onward
 
thanks, SO chat, for not supporting code blocks consistently
 
ADG
@ChemiCalChems i mean IntSream, generic stream (think Java 8)
 
Guys just face it. The kid doesn't want to use C++14 because C++11 is worse and therefore better.
 
@ADG you have stringstreams
 
ADG
@ChemiCalChems ah i think sstream was there in '98 ?
 
6:44 AM
@ADG idk
possibly
 
C++ has generic streams?
 
not generic
 
@ADG Look if you honestly really just want the best version
 
we do have stringstreams
 
Just use COBOL.
 
6:45 AM
but you can code generic streams if you really want to
 
ADG
OK
 
my question for you is, why don't you jump into c++14 and that's it?
 
ADG
good idea, but where is it to jump?
 
Trampoline!
 
ADG
maybe you would be kind enough to please provide some resource?
 
6:46 AM
i mean, just use it, and start learning it with what you wish to code
 
@Ryan What about running a function that returns 5 randomly ~12% of the times it's called, but 6 the rest of the time. And which must execute foo() on an array 5 times if 5, but 6 times if 6? Does Haskell handle non-deterministic inputs well?
 
i never read anything about c++11 or 14
 
ADG
oh thanks
 
i just solved problems i had with the stuff they had
 
ADG
so i just go g++14 main.cpp ?
6
 
6:47 AM
@ChemiCalChems Well you should. The standard is a lovely read.
@ADG Yep that's how you use it.
 
@Nooble i know, but i don't have the time, sadly
 
I'm legitimately curious because it's the one area that I never did find an easy Haskell solution for
 
ADG
@Nooble can you tell where is it located?
 
that has me thinking, what will g++-14 look like?
 
@ChemiCalChems I'm kidding it's god awful. Just be glad cppreference exists.
 
6:48 AM
so it generates a random number that's 5 or 6, executes foo on an array that number of times, and returns the random number?
 
@Nooble oh
 
you have oddly specific problems, but sure
 
@ADG you do g++ -std=c++14
 
ADG
ohk
 
but if you are using g++-6.1.1 or upper, it's the default version
so upgrade pls
that way you have support of c++17 too
 
ADG
6:49 AM
is it out there? 17?
 
It's the non-deterministic aspect that I'm modelling with that problem. A lot of what I program relies heavily on continuous user input
 
@ADG yeah
not fully supported, but some stuff is supported as of now
 
ADG
but isn't it still 16?
 
so?
fifa 16 was released in 15 xd
the same way they do every year
they finished deciding what to do in c++17 early, i guess, so compilers start coding support, which is responsible enough
it's not fully supported
 
ADG
hm
 
6:51 AM
we don't have std::any or std::variant or that shit
we do have nested namespaces and other small things
this is awesome, both g++ and mingw-w64 are 6.2 now
at last
 
gist: ce10d06d330d68e13864e53a3dca4421, 2016-08-27 06:56:10Z
import Control.Monad
import System.Random

bar = putStrLn "some function"

foo = do
  rand <- getStdRandom $ randomR (0, 99) :: IO Int

  let count = if rand < 12 then 5
              else 6

  replicateM_ count bar
  return count

main = print =<< foo
actually the rand <- ... line can just be:
rand <- randomRIO (0, 99) :: IO Int
 
Looks not too bad. Definitely better than some of the (possibly contrived) examples I've seen
 
@Ryan I find MonadRandom helps make this looks tidier
it’s ye olde StateT gen on top of existing facilities, doesn’t do anything clever
e.g. you get to run pure code unlike your example
 
7:07 AM
There are a few things I don't like about Haskell, though. Compilation speed and layout.
Also, make that:
rand <- randomRIO (0, 99 :: Int)
 
True, it has drawbacks like every language does. Personally I like the ideas of strongly typed values, iteration by currying a code block, and a local scope preprocessor, generics, and no Null values (but a nullable type that wraps any type). They'd solve the majority of the errors I make and make my code much more legible.
 
7:23 AM
fromMaybe 6 . (5<$) . guard . (<12) <$> randomRIO (0, 99 :: Int) >>= uncurry (>>) . (flip replicateM_ bar &&& pure)
is another way to write foo
 
Xeo
no
"another way" implies that to be a reasonable choice for some situations. But it's not
 
it's considered good Haskell style because it has points in it, meaning it's "point-free" (sarcastic jargon)
 
Xeo
point-less
also, might as well make it actually point-free by going full Arrow (<<<)
 
@Xeo I don't understand Arrow well enough to do that
time for some reading
 
Xeo
7:39 AM
@Ryan s/\./<<</ :P
 
Oh. Haa.
but there are four in the 99 :: Int!
 
Xeo
that's two colons, those pass
Also, does it actually need the type hint?
 
(fromMaybe 6 <<< (5 <$) <<< guard <<< (<12e-2)) <$> randomRIO (0, 1) >>= (uncurry (>>) <<< (flip replicateM_ bar &&& pure))
wait, you're right, it didn't actually need the type hint.
 
Xeo
8:09 AM
what have we done
 
Ven
That's absolutely unreadable.
But I guess you get to be happy because you towed with arrows.
 
user4710450
Guys can you open this:
https://c9.io
 
user4710450
my mozilla is stuck in connecting
 
Ven
8:25 AM
It's just you. c9.io is up.
 
user4710450
I'm really confused :|
 
@wilx I agree, activists are much more of a problem than action
If you could define octal numerical literals, how would you define them?
e.g, C++ defines hexadecimal literals by 0x__, so I was thinking 0c__
 
Xeo
8:43 AM
@Ven It's like the "we crossed a line we shouldn't have, but let's keep going and see what happens" meme. We had to.
 
Ven
if only it was just a meme and not a haskell custom
-3
Q: Can Use JQ Insted of PHP for Webdevelopment

Pankajcan we use JQ insted of php for developing website. which one is more preferable. I think we can also use JQ for web development.Using JQ we can Execute MySql query like php. Which One is better? and why?

punch me please
 
lol. Some of the questions here betray profound ignorance rather than simple inattentiveness
I wouldn't be too angry if somebody mistook an array for a list, but when they can't tell the difference between two vastly different languages, there's a problem.
 
Ven
"two vastly different languages" yeah "JQ" is totes a language
 
You understood the point, though I could have clarified that I was simplifying the grammar used to express the concept.
'difference between a language and a library from a completely different language' doesn't quite have the same ring
 
Ven
I prefer semirings to rings
 
8:58 AM
well, they’re semi-useful
 
Ven
This site can’t be reached

chat.stackoverflow.com took too long to respond.
 
@Ven Same here for a moment.
 
9:17 AM
@Aaron3468 0o is JavaScript's and some others'
 
9:38 AM
There's a marble statue at my workplace of a woman looking at the sky and lifting her hand. A few weeks ago someone taped a selfie-stick with a samsung phone to her hand. It's just perfect.
 
Ven
9:54 AM
0
Q: repeat starting from a date defined javascript

SixdasI have a problem with a script, which should increase the date by one day partenda from a defined. here is the code var data_inizio ="25/05/2016"; var turni = ["A", "B", "C", "D", "E"]; var n_g_mesi = ["31","28","31","30","31","30","31","31","30","31","30","31"]; //Costruiso la data nel...

talk about unreadable code
 
10:10 AM
Well, I'm down the rabbit hole and starting a project for a custom language. The one selling point is local syntax definitions. Then the interpreter can temporarily promote a function to infix or even into an operator. Used well, it would allow anything to temporarily become first class.
 
Ven
@Aaron3468 Perl 6 does that
haskell, agda, and all also do.
 
That may explain why I've never seen it ^^; What would I google to find relevant examples? My terminology doesn't seem to work
 
@StackedCrooked :D
 
Ven
perl6.org, click "custom operators" down the page
 
Ah, very similar! I was thinking more along the lines of dynamically modifying parsing rules themselves, but that would accomplish most of the same benefits
 
Ven
10:33 AM
you can do that too. (but it'd be too much on the frontpage)
i.e. the Slang::Pierser changes the allowed names in the language
 
10:54 AM
hello all
1
Q: Implications of conversion function template argument deduction in C++

David HollmanI'm having trouble understanding the implications of the conversion function template argument deduction rules in the C++ standard. The standard states that ([temp.deduct.conv] clause 1, §14.8.2.3.1 in N4594): Template argument deduction is done by comparing the return type of the conversion...

perhaps someone else help him out
are my comments misleading or hard to understand?
 
Ven
I watched this talk several times..
I think that's when I fell in love with Scott Meyers.
 
Yeah, it's a great talk.
 
scott is my favourite expert
 
Chandler is p great too tbh.
 
Ven
11:06 AM
them both.
 
scotts hair is fabulous :D
 
11:35 AM
If a pizza has a radius 'z' and a thickness 'a' that pizza's volume can be defined Pi(z*z)a #FunFactFriday
3
Why has no one mentioned this ridiculous coincidence before
 
Xeo
I saw that a few months ago on my Twitter feed
Also looks neater as Pi*z*z*a
 
@sehe I've seen that multiple times before.
 
@Xeo Or assuming only defined variables exist, Pizza.
 
11:52 AM
it's only accurate if your pizza looks like this
 
Pizza + cheese
where cheese is the error in volume
 
@Xeo Maybe πz²a
 
12:28 PM
hi
 
 
1 hour later…
1:41 PM
I think I just discovered a bug in VS C++ compiler
http://hastebin.com/aferorogiv.vala this compiles on gcc 4.9.2 and everywhere else I checked except for Visual Studio whete it produces
"Error C2440 'initializing': cannot convert from 'int' to 'std::vector<int,std::allocator<_Ty>>' on line 32"
 
Ven
1:59 PM
wow you found a bug in MSVC you must be real fucking good
 

« first day (2142 days earlier)      last day (2808 days later) »