« first day (640 days earlier)      last day (4298 days later) » 

8:00 PM
you can get lexer generators that will make lexers from regexes
 
@Nils Can't you simply install Xcode?
 
but for such a simple one, you won't need that
 
It comes with a gdb version too old for clang. Because the fsf mofos moved to GPL 3.
 
fundamentally, a lexer is an FSM- which basically means a giant switch in a for loop.
your proposed grammar only uses six tokens so it's gonna be real simple
 
@Nils Hmm, MacPorts has a portfile for GDB 7.1.
 
8:02 PM
this super-simple lexer can match < and > tokens.
 
And there's always LLDB.
 
yes but I installed homebrew because I was told it's cool
@EtiennedeMartel lldb and stl containers?
 
then we skip whitespace
so you can see that now whitespace is ignored in our lexer
 
@DeadMG you lost him quite a while ago I think
 
8:04 PM
@EtiennedeMartel it even has valgrind :)
 
@MooingDuck I'm reading along at home.
 
@MooingDuck I think that "switch in for loop" with provided example is pretty simple.
 
@EtiennedeMartel How do you inspect stl containers like vector, map, etc with lldb?
 
@Nils No idea. I don't even know how to do it with gdb.
 
comments: while not newline, keep skipping
 
8:05 PM
I just wrote a script that'll get me restaurant reservations with ease <3
 
@EtiennedeMartel With gdb *(&myvector[0])@myvector.size() or something like this
 
@DeadMG in this particular case it's fine, but normally you check bounds before you dereference
 
identifiers and numbers are a bit more tricky because they are variable length
oh yeah
 
@Drise: How is your parsing problem coming along?
 
I usually write a slightly more complex framework around this that automates that task
 
8:07 PM
@JimNorton Pulling my hair out. Debugging literally line by line and waiting for a failure.
 
@Drise Yeah, sorry to hear that... It's hard when the bosses have the screws tightened on you/
 
Now ports downloads and compiles all sort of bullshit.
I just want a working gdb :(
 
Android is so much fun.
 
@Nils Can you build it from source?
 
@CatPlusPlus You a dev?
 
8:09 PM
Sooo muuuuch fuuun.
@AgainstASicilian Lately, yes.
 
Any programs on the market?
 
@Nils Yeah, that's fine for vectors, but it all sucks so much compared to what VS has.
 
I wish I had that stamina
 
I'm modifying an existing one for a client.
 
@CatPlusPlus Sooo muuuuch fuuuck.
 
8:11 PM
@EtiennedeMartel Dare I ask... Apple user? :P
 
It's terrible and Android is terrible.
 
ah and of course it fails to build gdb
 
@AgainstASicilian I have a Mac, yes. But no iPhone, and next phone I buy will be an Android.
 
It's so Java I don't even.
I wouldn't believe it was created by Google if I didn't know it.
 
probably because they changed Xcode a bit
 
8:11 PM
I'm no fanboy or anything but I can't bring myself to use any Apple products
Macs/iPhones feel like form over function to me
 
That's a proper reaction to Apple products.
 
@JimNorton Even better: The code is on lockdown, and I have to get each change authorized, and spend an hour explaining why I want to change each thing. Add an additional 20 minutes assuring them I've tested it and it won't crash.
 
@AgainstASicilian It still works very well.
 
I have an iPhone - probably the only Apple product that I like...
 
8:12 PM
Their business model sucks though.
 
@Drise OMG... that must be painful
 
It works well, yes, but I can't quite put my finger on what it is I dislike about it.
 
I also have an iPad - not that useful though... :(
 
Please guys, if you want to dis apple, please dis the prices. Not the functionality. The functionality is the best thing with the iPhone
 
@AgainstASicilian It's probably irrationnal then.
 
8:13 PM
you see, the lexer is just a simple switch case, with a tiny bit of regex-style matching in there.
only 45 lines and I'm nearly done.
 
I doubt it's irrational -- I feel like I have more "control/manipulation" with PC/Android/etc. Apple feels relatively claustrophobic.
 
@ManofOneWay I somewhat disagree. My wife has an iPhone and I have an Android, functionality wise they are about the same..
 
Not sure how else to word it
 
@DeadMG Ok.
 
I don't like the entire Apple ecosystem.
 
8:14 PM
so tell me
how do you recognize a number in a lexer?
 
Arrrgh, stupidity and arrogance isn’t a good mix, I speak from personal experience. But if you add perseverance and failure to back down to the mix, it becomes corrosive
 
@DeadMG isnumeric()
 
I don't like Obj-C, I don't like OSX, I don't like the fact you have to have OSX and a Mac to write for iPhone.
 
-2
Q: how come the letter case (upper vs lower) is mixed in hg19.fa

DanielI just downloaded a copy of hg19.fa from http://hgdownload.cse.ucsc.edu/goldenPath/hg19/bigZips/hg19.2bit I noticed that some of the letters are lower-case ("acgt") and some are upper-case ("ACTG"). NIH says to just fold the case to upper: http://blast.ncbi.nlm.nih.gov/blastcgihelp.shtml "Sequen...

 
@CatPlusPlus You dislike everything. Except maybe Haskell and cats.
 
8:15 PM
(comments)
 
I dislike everything ridiculous.
 
@DeadMG Honestly: My brain is on nuclear meltdown, and it's panic-ing.
 
Not my fault the world is full of ridiculous things.
 
@Drise Ok. First: relax.
your task is super-simple and I could shit out a working one in like, 20 minutes, at most.
 
@DeadMG I'd assume case '5':
 
8:15 PM
Relax, it's just a show.
 
@Drise Right. You could go like case '1': case '2': etc, but that'll take a while.
easier to just add if at the end of the block, like I did with identifier
 
@CatPlusPlus MST3k?
 
On my Android I like that everything's integrated via Google, for which the products themselves feel simple/intuitive/sufficiently decked out as to allow enough control to do what I want but not so much as to be overwhelming/confusing
 
but first, you have to start by saying "What formats do I recognize as a number?"
 
8:16 PM
@CatPlusPlus So you have Windows 8 on your MacBook Pro?
 
@DeadMG I've been bug fixing this for 6 months now. I'm pretty sure they are tired of "oh, well, guess Drise fucked up again, hurr hurr"
 
@DeadMG again, isnumeric()
 
@Drise I promise, the output will be spanking clean.
 
I don't have MacBook Pro, because nobody ever gave me one, and I will not buy it.
 
I have a MBP that someone drew a penis on.
 
8:17 PM
your main problem seems to be that you just don't have a very good definition of what you want to accept.
 
The monitors to the Mac PC's are like an effing grand O.O
 
I'm not going to be using Win8, either.
 
(also, you seem to be lacking knowledge of basic language implementation)
 
isn't Win8 the "touch" version of things?
 
but I can provide that easy
 
8:18 PM
@AgainstASicilian You just need VGA->DisplayPort adapter.
 
@DeadMG Basic correct knowledge
 
@EtiennedeMartel What part?
 
Or DVI.
 
@Drise No problem, I got you on that one.
 
@AgainstASicilian That's a part of it. And it will support ARM CPU's.
 
8:18 PM
Woo, ARM support nobody ever wanted or will care about, woo.
 
@Collin Above the Apple logo, on the left.
 
so tell me, do you need to recognize integral and floating-point numbers separately?
 
ARM, the CPU that powers your fancy smartphones and tablets.
 
8:19 PM
lol
 
I have multiple projects in my VS 2005 solution. Given that I have an absolute path of file, is there an easy way to open the file instead of manually navigating ?
 
@EtiennedeMartel I guess depending on the model that's easy or crazy expensive to replace
 
they really missaranged their kids?
 
@Mahesh Ctrl+O, paste in the path, open it.
 
Use vim, gf.
 
8:19 PM
@AgainstASicilian CPU's often low-power and used for mobile devices.
 
@Collin I don't really care. I like penises.
 
@CatPlusPlus Well, mobile device manufacturers are excited about it.
 
ARM has built-in hardware Java bytecode executor. Well, some of them. That should hint the intended purpose.
 
So I mean it seems like Windows 8 Mobile might make sense, but I thought Windows 8 was also intended for like desktop PC's with monitor touchscreens
 
@EtiennedeMartel Awesome. Works like charm :)
 
8:20 PM
@CatPlusPlus Didn't know about this?
Is the Nexus 7 worth buying?
 
Mobile device manufacturers are excited about what? Microsoft desperately trying to be cool guy on mobile market, despite being 5 years too late?
 
1
A: reason why custom loop is faster? bad compiler? unsafe custom code? luck?(lucky cache hits)

seheIt's likely due the fact that the compiler fails to make it register-operands, working on indirect (address) operands instead. Switch compilers <-- this is your best optimization. That said, the following is faster: __asm { xor ecx,j //init of loop range(200000000 to 0) mov eax...

 
@CatPlusPlus It gives them another option.
 
Between Android and the thing nobody buys.
 
Hah awesome. I hand optimized a loop in useless assembly :) ^^
> Switch compilers <-- this is your best optimization
 
8:22 PM
@CatPlusPlus Yeah I didn't say Windows Mobile is popular, just that Window 8 will support ARM, for better or worse.
 
Common open platform is better than market fragmentation, which only means more work for developers.
But then again, mobile market stinks and Android is terrible, so.
 
@CatPlusPlus The best is a common closed platform, like iOS!
 
I just hope I'll never have to write for iOS.
 
ARM should be the one most excited as we might end up with non-Intel or AMD laptops etc
 
@EtiennedeMartel Apple fanboy detected. BURN HIM.
 
8:23 PM
Alright, you get fucked in the ass with a flaming Pole, but at least it's always the same Pole (i.e. @CatPlusPlus).
 
@CatPlusPlus I don't see what should be wrong with objective-c.
 
ARM is unlikely to get onto laptops.
They would long time ago, if being low-power meant that much.
I'm sick of my underpowered laptop, and it's i5.
I don't want ARM anywhere near it.
 
@CatPlusPlus That may be the case, but it is at least now a possibility.
 
@CatPlusPlus Ever thought about getting a real PC?
 
Linux worked on ARM for years.
It's still a gimmick and nobody cares.
@EtiennedeMartel Yes. I'm waiting for a paycheck.
Or two. Depends on how this Android shit goes, I guess.
 
8:26 PM
@CatPlusPlus But not Windows...
 
@CatPlusPlus That rhymes.
 
Well, there's no Windows apps for ARM, so it's pretty much the same thing. :P
 
windows rt
 
@Nils You don't know enough languages, then.
 
@CatPlusPlus But think of how long you could play solitaire on a low power laptop
Maybe they'll bring back that pinball game, that was fun
 
8:28 PM
Apple is apparently working on an ARM Notebook.
http://www.pcmag.com/article2/0,2817,2400454,00.asp
 
You can play solitaire without a laptop.
Zero power!
 
@CatPlusPlus And risk dropping your cards all over the floor? Blasphemy
 
More calories though. :-)
 
Get some candles, and you can play for years.
 
Heh the Macbook Super Air.
 
8:29 PM
> Ironically, the concept died in part, then, because of the lack of Windows.
 
Macbook StrongARM
 
Well, they should have built more windows in that room.
 
but I want to code
 
Woo, more overpriced hardware from Apple.
 
@Nils You should buy Pictionary.
 
8:31 PM
You should buy waffles.
 
Xeo
Mmm.. waffles...
But I had sushi today, that makes me happy enough
 
@Drise you doing ok? Making progress?
 
@CatPlusPlus I've been finding recipes lately to make stuff like pancakes and waffles without mixes, I'm never buying pancake mix ever again
 
Hm, you know what, let them produce cheap ARM laptops. Maybe I'll get one, and hammer it into a router or home server.
 
@JimNorton Not really. My brain is in nuclear meltdown, and I'm not thinking straight. I'm just fumbling with code, and making it worse.
 
8:35 PM
Then take a break, dammit.
 
@Drise I got the ideal solution for that. I think either @CatPlusPlus, @R.MartinhoFernandes or @DeadMG can guess what it is.
 
sleep
 
Get drunk?
 
I'm off cu
 
@CatPlusPlus WINRAR!
So, yeah. Beer.
 
8:37 PM
@CatPlusPlus There you go... probably will have some good uses for them...
 
Yeah, as long as I don't have to actually work on it.
 
@EtiennedeMartel That's too goo to be accidental. Wow
 
@CatPlusPlus I'm guessing that by the time you'd need to work on it, the tools and compilers would already be ported and it wouldn't be much different than writing for Windows x86.
 
Except being slow.
 
@CatPlusPlus Kyrostat does need an OS X build machine.
 
8:40 PM
Also, of course it'll be different. ARM is less forgiving than x86.
@EtiennedeMartel Well, I don't have one.
 
@CatPlusPlus You can always cross-compile on a fast build server. :-)
@CatPlusPlus But the compiler will deal with differences? No?
 
@CatPlusPlus This is gonna end in tears and VMs.
 
Anyway, I'm just excited to see what comes out of Window RT for ARM. Might be crap, but we might be surprised.
 
@JimNorton Alignment and such, not always. At least not in C++.
 
TIL that VC++ has a __based extension.
 
8:43 PM
Probably someone in one of Windows-related teams needed it.
 
@CatPlusPlus I didn't realize C++ had features that depend on alignment that can't / isn't taken care of by the compiler.
 
@MooingDuck I forgot to mention. There can be multiple <MY_TAG#> sections. Each one is important.
 
@Drise oh, I stopped working on that an hour ago
 
@MooingDuck Oh...
 
one of the best answers I have ever read stackoverflow.com/a/2290037/893693
 
8:47 PM
@Drise sorry, it looked like DeadMG was helping you, and it was lunch time :(
 
@MooingDuck It's ok. I don't think I'm going to be able to directly use his code, and I was hoping you would have come up with something similar to mine.
 
Xeo
@EtiennedeMartel That thing's kinda cool
 
@Drise lemme try again, my first idea wasn't good
 
@MooingDuck I did it using a whole bunch of if statements, if that gets you anywhere.
@MooingDuck ideone.com/FZ1EP
 
what was the input file?
 
8:53 PM
@MooingDuck That's gonna be more difficult.
 
@Drise nevermind, I'll fake it
 
@MooingDuck ideone.com/KWJmW
[lf] indicates linefeed
That breaks.
 
@Drise wait, now there's two values on a line. There was only one bfore
 
@MooingDuck It's a complex value.
Just like this is a complex file to parse...
 
@Drise like std::complex, or just complicated?
 
8:57 PM
@MooingDuck the former. I use stringstreams to deal with that
 
Just use gcc. Here is the same program translated to gcc intel inline assembly: gist.github.com/3131989#file_test.c It clearly shows how the for-loop and and-while loop are vastly superior to the handwritten assembly — sehe 2 mins ago
There, I made things worse: I translated the whole thing to gcc inline assemble as well... only make doubly sure the OP understands how much (a) DigitalMars and (b) our hand-written assembly sucks!
 
@Drise that shouldn't have broken then
 
@MooingDuck The lacking linefeed on the last line does. "ERROR! Invalid tag"
 
0
A: Get the address of an instruction in C/C++

Basile StarynkevitchI'm not sure that the C or the C++ language standards speak of instruction; you could conceivably run a C program compiled to be executed by a large group of human slaves (but that would be unethical, even if standard conforming). You can run by yourself a simplistic tiny program with a pencil an...

"you could conceivably run a C program compiled to be executed by a large group of human slaves (but that would be unethical, even if standard conforming)"
2
 
Of course, I wrote it myself, so I should know why this error is happening.
 

« first day (640 days earlier)      last day (4298 days later) »