« first day (1539 days earlier)      last day (1700 days later) » 

ಠ_ಠ
 
me gusta
OH MY GOD SAM, IT'S WORKING. IT'S REALLY WORKING!!!
@bjb568, here is the youtube version youtube.com/watch?v=P3ALwKeSEYs
just put that on loop
@bjb568, can you do me a favor and type something into sandbox on MSE chat?
 
3:16 AM
@gunr2171 I was spraying myself with dihydrogen monoxide and rubbing various cleaning agents on my skin.
 
posted on January 01, 2015 by xkcd

Fairy Demographics How many fairies would fly around, if each fairy is born from the first laugh of a child and fairies were immortal? —Mira Kühn, Germany "There are always a lot of young ones," explained Wendy, who was now quite an authority, "because you see when a new baby laughs for the first time a new fairy is born, and as there are always new babies there are always new fairies.

 
4:02 AM
....oh, clever
 
 
1 hour later…
5:04 AM
 
 
4 hours later…
8:52 AM
Yaay! Guru badge on MSO! :D
 
 
3 hours later…
Sam
12:02 PM
@gunr2171 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!‌​!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Finally!
 
:D
Lunch time, cya!
 
Sam
Morning!
Cya!
 
I'm back!
 
Sam
Wb!
@gunr2171 I'm gonna try using openID delegation (which'll mean the Client class won't require a username) and if that doesn't work ping me and I'll revert to what it's currently doing.
> profile views 999
:D
@ProgramFOX Congrats!
 
12:18 PM
I'm on a new years diet and I feel like I may pass out at my desk (lack of sugar)... does the tavern sell anything healthy?
 
Sam
Well, I'll see what we've got...
How about some "healthy" popcorn?
 
@Sam Sounds good to me, how long does delivery take? Lunch in 35 mins so on quite a tight delivery schedule, think it's doable?
 
Sam
@Silver89 Well, all SO members get a free 10 min delivery. ;)
 
Oh god, it's completely in sync with the music!
 
@Unihedro is that a game?
@sam Perfect!
 
12:31 PM
@Silver89 yep
 
@Unihedro flash?
 
@Silver89 silverlight
 
@Unihedro interesting, didn't realise silverlight embeddable games even existed
 
I'm back!
 
Sam
Wb!
 
12:41 PM
Welcome back!
 
tnx!
@Sam This is a code-golf for you: codegolf.stackexchange.com/q/43115/9275
:)
 
Sam
Oh?
 
Yeah, it's about audio generation.
 
Sam
! :D
 
Hey, I'll try to use Wav.Net for it! :D
 
Sam
12:45 PM
This is going to be so easy.
 
:O
 
Sam
:D
Yeah, Wav.Net has built-in tone generators!
 
@Sam Halp! I cannot compile Wav.Net. It says something about a missing key file.
 
Sam
?
Ok, just a sec.
 
My ranking in Tribo World Cup has dropped by one :(
 
12:49 PM
error MSB3322: Unable to get MD5 checksum for the key file "keyfile.pfx". Could not find file 'C:\Users\MyName\SomeDirectory\Wav.Net\Wav.Net\keyfile.pfx'
 
Sam
That's... odd.
 
When removing the file, it doesn't complain about that, but I... uh... get other build errors.
 
Sam
This is weird. I made sure there weren't any build errors when I last committed.
But now, I'm getting errors too.
 
1>C:\Users\MyName\SomeDir\Wav.Net\Wav.Net\Tools\Generators\Rain.cs(267,54,267,92): error CS1502: The best overloaded method match for 'WavDotNet.Tools.Filters.LinkwitzRileyHighPass.Apply(WavDotNet.Core.Samples<double>, double)' has some invalid arguments
1>C:\Users\MyName\SomeDir\Wav.Net\Wav.Net\Tools\Generators\Rain.cs(267,69,267,76): error CS1503: Argument 1: cannot convert from 'double[]' to 'WavDotNet.Core.Samples<double>'
1>C:\Users\MyName\SomeDir\Wav.Net\Wav.Net\Tools\Generators\Rain.cs(267,20,267,110): error CS1502: The best overloaded method match for 'WavDotNet.Core.Samples<double>
 
Sam
Yeah, I've just fixed that. Committing...
Done.
I should probably (in the near future) write up some docs/examples for Wav.Net...
 
1:01 PM
pulls
Yay! :D
 
@Sam Post an entry first. :P
 
Sam
@Unihedro lol, of course.
 
@Sam What's the generic T parameter in WavFileWrite?
 
Sam
@ProgramFOX It's the type of the samples that you'll (later) pass to it.
 
oh, k
I believe int should be enough, plus, it's short.
 
Sam
1:07 PM
Noooo!
int is PCM 32-bit.
Use short for PCM 16-bit, float for 32 floating-point, etc.
 
doesn't know anything about audio
 
Sam
Here's an example...
 
And... what's wrong with PCM 32-bit?
 
Sam
var file = new WavFileWrite<float>(@"some file path", 44100);

var gen = new Sawtooth(44100);

var samples = gen.Generate32Bit(TimeSpan.FromSeconds(2), 400, 1);

file.AudioData.Add(new Channel<float>(samples, ChannelPositions.Mono));

file.Flush();
@ProgramFOX The tone generators don't support 32-bit PCM.
 
oh, ok
 
Sam
1:09 PM
They only generate audio in 32-bit & 64-bit floating-point.
But.
You could use the built-in sample converter.
If you really needed to use 32-bit pcm.
 
No, using a converter would take characters.
 
Sam
Exactly.
Generally speaking, it's best to just stick with 32-bit floating-point. ;)
 
1:30 PM
uhh..
@Sam So I have an array of floats which I load in a Samples<float> and add that to a channel, but Flush says that none of the channels in AudioData should be empty, but they are not empty.
 
Sam
Yeah, I've found a bug with the tone generator's duration calcs.
 
hey!
 
Sam
Heya!
@ProgramFOX The calc atm is: var samples = new float[(int)duration.TotalSeconds * sampleRate];
 
oh, ok
 
Sam
But I should've wrapped the multiplication in brackets, and then convert to int.
 
1:33 PM
wait
I don't have an array of floats, but an array of Samples<float>s generated by a Sawtooth.
 
ok good, bot still works on this computer
 
@Sam Okay, so I have:
 
Sam
@ProgramFOX Yeah, that's Wav.Net's "main" container for samples.
@gunr2171 :D
 
Func<long, uint, float, Samples<float>> g = (t, f, a) => b.Generate32Bit(new TimeSpan(t), f, a);
var x = g(3000, 50, 0.5f); // b is a Sawtooth
... but debugger says that the result of g doesn't contain anything.
 
Sam
Erm.
 
1:37 PM
Hey Sam and Fox, could you both do me a favor and quickly type "ping" into the sandbox?
 
Sam
Hang on, just loading my sandbox project...
@gunr2171 Sure.
 
@gunr2171 Done.
 
thanks
 
Hey
 
hello
 
1:38 PM
Hey
 
How are you guys
 
Sam
:D
 
So thanks a huge amount sam!
 
Sam
You're welcome! :)
 
1:39 PM
oh, I want to feel so :) @gunr2171
 
Sam
@Pro I've committed a fix for the dur calcs.
 
Sam
Ok, just testing that code snippet...
 
Yay, no runtime errors!
I actually hear something... but it's still too short :P
 
Sam
50 ticks....
 
1:42 PM
I am trying to do this : stackoverflow.com/a/411605/2946122 But though input isn't empty, it writes zero byte..
 
Sam
 var x = g(3000, 50, 0.5f);
 
@Sam eh, no 3000 ticks
The first argument is the thing I put in the timespan.
 
Sam
Oh, yeah. Sorry, the lambda confused me. :P
 
Yeah, it is confusing, but it's golf :P
... okay, now I have to tweak my frequency
 
Sam
lol true.
For dot's I'm using 800Hz. And dashes @ 400.
Just to give you a rough idea where to start.
 
1:46 PM
Should the frequency really be different? After all, it's the timespan that matters.
 
Sam
Well, no, I guess not.
@KeremZaman Why not use the CopyTo extension?
 
ugh, put frequency too high. no fun for my ears :P
 
Sam
lol
 
Okay, the thing I have now sounds reasonable.
Now trying to golf it.
Might want to tweak some numbers then.
 
Sam
I haven't even got that far yet. lol
 
1:52 PM
:O
(thanks, lambdas)
 
@Sam nothing changed
 
Like that bitrate. If it still sounds good with a 4-digit number, no need to waste bytes for a 5-digit number.
 
Sam
@KeremZaman Are you definitely flushing to the file?
@ProgramFOX Bitrate? You mean sample rate, right?
 
And instead of Mono, I can use Lfe. Another byte saved!
 
Sam
lol
 
1:53 PM
@Sam Uh, yeah, that.
I'm a noob in audio processing, soo... :P
 
Sam
@ProgramFOX That will be interesting.
 
it still sounds good
 
Sam
:D
(... since Wav.Net writes data differently when you don't use Mono, so.)
 
dataStream = res.GetResponseStream(); after that I check if its length is >0 and:
FileStream fs = new FileStream(fileName, FileMode.Create, FileAccess.ReadWrite);
CopyStream(dataStream, fs);
@Sam
 
Sam
Right.
@KeremZaman So where is fs.Flush() ?
 
1:58 PM
@KeremZaman Try dataStream.Position = 0 before copying.
 
@Sam I've just added it before CopyStream and @ProgramFOX it causes NotSupportedException
 
@KeremZaman oh
 
@Sam fs.Flush() doesn't change anything
 
Sam
Hmm.
Yay! I've finally made the whole track!
Now to optimise it to death...
 
:D
 
2:21 PM
There we go!
0
A: Morse the New Year

ProgramFOX C#, 558 bytes Uses the library Wav.Net. using WavDotNet.Core;namespace System.Linq{class P{static void Main(){var w=new WavFileWrite<float>("a.wav",9999);var b=new WavDotNet.Tools.Generators.Sawtooth(9999);Func<long,uint,float,Samples<float>>g=(t,f,a)=>b.Generate32Bit(new TimeSpan(t),f,a);var...

 
Sam
:D
Nice!
 
Thanks!
 
my code to make clear and regular: pastebin.com/vkRYwtEw
sorry it was wrong, true one: pastebin.com/gsaLVgKB
 
Sam
@ProgramFOX Gah, mines 690.
Let's see if I can optimise it any further...
(Haven't posted it yet)
 
@Sam You can still post, and perhaps receive golfing advice.
 
Sam
2:33 PM
@KeremZaman Checking...
 
Then there is finally a C# answer to compete with! :D
 
Sam
:D
 
Pfft... Can't do this with Java -_-
 
Sam
@KeremZaman Why are you flushing before copying the stream? o_O
FileStream fs = new FileStream(fileName, FileMode.Create, FileAccess.ReadWrite);
fs.Flush();
CopyStream(dataStream, fs);
 
@Sam because I have tried it after the CopyStream and nothing changed then I tried so :)
While loop can't be provided in CopyStream
 
2:46 PM
Hi
 
I am yet banned from asking questions, I asked 29 question and answered about 70 questions ( some of them were old).
 
Sam
And now I'm at 632...
 
Sam
Meh, I'll post it and continue optimising...
 
2:48 PM
The TL;DR is to edit your downvoted questions to make them better and to post many high-quality answers. Then the ban might get lifted.
 
I read it, and modified my questions but voter doesn't reconsider them.
 
voters don't get a notification when you edit a post
 
yes, what gunr said
 
it's about attracting new voters to your post
 
no problem, its ok for me not asking question :)
I find answers to my questions from existing questions, and I post some answers which I think better solve them
in hope one day I can ask too :(
 
2:51 PM
well, for this question, editing to include the technology (like ) would really help
 
@gunr2171 thank you, I edited it ;)
You may check my new answers for some old questions! they not vote soon.
 
Yes, it's the simple things like that to look out for on your posts. You could also start with a capital letter on your first post. But really take time to re-read through your posts to see if they make logical sense and give enough information.
Oh wow, so I just noticed on this post that there are 13 revisons, and voting is at +4/-7.
 
@gunr2171 Thank you, but I am trying to help community by answering some quesitons, or flagging etc. I hope some of you reconsider my questions and answers anytime you caught. I still work on the questions and keep posting answers
@gunr2171 that is a sane questions if you read it, maybe because I debated on meta, I provoked some users to down vote it!!
 
Sam
Posted it finally.
0
A: Morse the New Year

SamC# ~ 632 bytes Using the Wav.Net library. using System.Collections.Generic;using System;using WavDotNet.Core;class d{static void Main(){var f = new WavFileWrite<float>("x.wav", 8000);var g = new WavDotNet.Tools.Generators.Sawtooth(8000);Func<long, Samples<float>> x = p => g.Generate32Bit(new Ti...

 
so it looks like 3/4 latest negative posts have upvotes and downvotes. I'm just reading through your posts for info
the other negative post is 0/-1
 
Sam
2:58 PM
brb
 
bring real balls?
burning really bright?
barron rum bottle?
beautiful royal behind?
barking 'round back?
You know, with enough me's and enough SO chat rooms, one of us will either figure out the acronym or write shakespeare.
 
@gunr2171 Do you think this edited question should remain closed? stackoverflow.com/questions/26636268/…
 
Just as a note before I really read your post, you are doing a lot of revisions to your posts. That usually backfires on you with downvotes.
 
@ProgramFOX What about your bot? ;)
 
@Ahmad it doesn't run here :P
 
3:07 PM
@gunr2171 I did it after get banned.
@ProgramFOX you still work to improve it?
 
@Ahmad Sure, there are always things that can be added or improved.
 
@ProgramFOX what is the context of it? just playing that game? .... forgot the name of game
 
@Ahmad It was originally made for the game. But it's perfectly usable outside the game. There is a setting where you can decide whether you want to run it for the game or not.
It has some other commands such as >>translate.
 
@Ahmad do you want the form's font to remain as MS Outlook?
 
@gunr2171 No to set the default font to MS Sans Serif which I thought should be default, but suddenly changed on a downloaded project.
@ProgramFOX its on the scope of Artificial Intelligence and based on some research ... or just a hobby program?
 
3:12 PM
it does sound like a "typo" problem - you accidentally set the font of the form away from the default font to MS Outlook, so new controls were affected. Fixing the accidental value fixed the problem.
 
@Ahmad It's just a hobby program.
@Sam You might be interested in the Tips for golfing in C# ;)
 
Sam
Thanks!
 
@gunr2171, as I said, the project was not mine and the author set the form font to MS outlook, but these dont matter. the main question is how to change the default font of controls
@gunr2171 you can suppose the default is MS Sans Serif and I want to set it to another thing!
 
I agreed that your direct question is clear, but the underlying reason for the question is a "typo" (even if you didn't cause it).
but it's really borderline, so have a reopen vote
it will take 4 other people to agree to reopen
 
@gunr2171 you know first time I posted it I described I don't know how it happened and they closed it as a question which can not be reproduced, but now the question is direct
@gunr2171 now I even changed the question to forgot anything about that typo :)
 
3:20 PM
well, you have my opinion (and I voted to reopen). If you want more, ask on meta.
 
@gunr2171 what about my answers, did you check my recent answers too. I think they worth some votes ;)
sorry to ping you, I still not used to the chat tools
 
I voted on one. I won't vote on any others because I would be having a bias. And yeah, please stop using my name at the start of messages.
 
Sam
@ProgramFOX Now at 609 :D
 
And voting on answers won't help your question ban (as much)
 
@Sam \o/
@Sam You can still kill some whitespace.
 
3:24 PM
why not, just the last time I was here they told me it helps
 
Sam
@ProgramFOX Oh, missed that. Thanks.
 
and its in the meta answers in stackexchange.com
 
Sam
@ProgramFOX Now 587 :D
 
Sam
frantically continues optimising...
 
3:28 PM
Thank you all, bye
 
Sam
582...
Cya!
 
Sam
3:40 PM
@Pro 530!!! :D
 
uh oh
Good job! :D
 
Sam
Thanks! :D
It was great fun, thanks for letting me know ;)
 
You're welcome!
 
Sam
Just gotta attach a demo file...
 
I can try making my code smaller by shortening that number because it's way too long...
 
Sam
3:44 PM
The length var?
 
yeah
 
Sam
All the best with that! :)
 
And 5000*500 is even longer :/
C# y u no support 25e5?
 
Hey there
 
Sam
Hiya
@ProgramFOX That would be cool.
 
3:49 PM
Hey!
 
Sam
Finally, uploaded the file. \o/
 
I exceeded my vocabulary on naming this data structure i'm currently working on. I have a graph, so "Node"s with children, parent and data on them. Now I'm working on something like a 'View' on that graph except that I need to create some kind of "ShadowNodes" that reference several parts of the original node but have seperated data i can work on without modifying the original graph... How would one call/name this "referenced graph instance" oO?!
So its actually more of an instance of a "BaseGraph" which is an instance itself...
 
4:16 PM
Oh well I think I know how to name it, thanks for the talk, haha :)
 
4:53 PM
You're welcome!
 
...
 
lol
 
 
7 hours later…
11:34 PM
morning
 
Morning
 
Fancy meeting you here uni ;P
 
yes indeed
 
want some home-made sushi?
 

« first day (1539 days earlier)      last day (1700 days later) »