« first day (292 days earlier)      last day (4649 days later) » 

9:16 PM
rewrite?
can't you just find the bug?
 
sure, but only if I actually tell the parser the location in the file of the tokens
turns out that I write super-maintainable code and it was easy to add that functionality anyway
the only error Bison will give me is "syntax error"
and a location
 
oh cool
 
not cool
 
so how many lines of code does this project contain
 
it's not funny to fail to parse the first input ever written :(
700 lines of Bison
 
9:23 PM
oh lol, I misunderstood, sorry
:(
 
only counting the non-generated C++ code, let me check
1100 lines
 
oh wow
I thought it would be much bigger
 
I wrote an excellent lexer
you should see the lexers generated by FlexLexer, they're huge
 
oh
I've no idea where to even start looking for this stuff
 
the project size including the Bison skeleton?
6196 lines of C++
so 7k lines including the Bison input itself
me neither
I wrote the lexer by hand, didn't even Google for lexing theory
 
9:27 PM
oh wow, that's quite a chunck
iimpressed I am
wow, without theory?
 
it's a lexer
it's not a hard thing to write
 
hmmm
I just have not enough knowledge to be able to judge how hard it is
 
start with a stack of characters
 
lexer does tokenizing right?
 
for each character, if you find a non-terminal like whitespace, or a syntax character, then check the stack for reserved words, else check it for identifier
yes
and syntax tokens occur in chunks
 
9:29 PM
oh yea
 
for example, ++, +, +=, and --, -, -=
so you can write trivial lambdas that will do almost all the operators and brackets finding
and just re-use them
lexer's pretty compact, just 530 lines of code atm
parser consumes like 300 lines just defining the AST classes, lol
 
oh wow
 
I could reduce that a little but it's not really worth it
 
damn
I keep having to fix the Bison skeleton to be character-type independent
 
9:35 PM
ugh
 
Woah man, how do you have the patience for that!?
 
he's a programmer. he has patience
lol
 
Yeah but 1100 lines
But at the same time, I never check my line count
Lets see
 
1100 lines isn't much
oh, 1800 lines, if you're counting every line that I wrote by hand
 
That just sounds like soo long
and hours and hours
 
9:39 PM
it was
but so what? I've got something here which could be very, very great
 
Yeah I suppose
My stuff that I have left after a massive deleting session is like tiny php stuff
I hardly do any Windows stuff these days
I hadn't written a website ever
 
Say, anyone ever got to use select system call?
 
Or really learnt web languages so I just jumped straight in and ended up learning the basics of PHP on a sick day :L
Argh - somehow my parents have fried another hard drive -.-
Well, the first one just got corrupt then this one isn't even being detected in the BIOS
 
@ChristianSciberras I heard it's broken.
 
lol
that sucks
 
9:52 PM
TMAI
 
@kbok Huh?
Well, I shouldn't be surprised since I can't get it to do what I want it to.
 
Last time they had managed to get a stupid amount of viruses because they just let everyone download shit because they don't know how to log out
 
It's a meme. select() used to be broken.
Well, maybe it still is. Dunno.
 
Haha I feel so uneducated :')
 
@kbok Any references on this? It can't be broken, there's all sorts of software that should be working over this...
 
9:59 PM
ok
I have made some progress
 
If there's anything broken, it's just the documentation. select itself works just fine and always has (well, okay, there was a time that select didn't exist, and there may have been some version sometime in which it was broken -- but there's certainly not a time that it underwent major repairs, and before that was universally broken, or anything on that order).
 
syntax error: unexpected '.', expected PTR_OP or '{'
at line 38, of an 18-line input file
whoops
 
Haha - working?
That was a great statistic in that link :L 95% of errors being the programmer's fault
 
@JerryCoffin We're talking about the same select() used with streams in blocking mode, right?
 
ok
I found the section of input that Bison is erroring on
and have absolutely no idea why
 
10:09 PM
Well at least it's a start? :L
Good luck
 
thanks
 
@ChristianSciberras Yes, I believe so.
 
OK
4
Q: Proper shell execution in PHP

Christian SciberrasThe problem I was using a function that made use of proc_open() to invoke shell commands. It seems the way I was doing STDIO was wrong and sometimes caused PHP or the target command to lock up. This is the original code: function execute($cmd, $stdin=null){ $proc=proc_open($cmd,array(0=>...

Long story short: I'm trying to read a program's STDOUT in PHP. Without select (PHP: stream_select) the reading blocks indefinitely.
I got it to work in very specific conditions, but it's not really stable.
I can configure the read length, and it currently works perfectly as long as the total being read is not a multiple of the read length (aka buffer size).
 
@ChristianSciberras I'd try to help, but I'm allergic to PHP...
 
damn
I wrote my lexer so that if it found an unreccognized token, it would throw an error
but I forgot to add the token to the list, so it never threw and I never noticed :P
 
10:21 PM
@DeadMG Most lexers end with a rule like /./ { error("Unrecognized character"); (and hopefully print out or point out the character they didn't recognize).
 
yeah, I have that
not what happened
when I run my lexer, I have an enumeration of the token types, and I have a giant switch/case to convert to what Bison expects
and if the token doesn't match any of the cases, then I throw, but that'll only ever happen if I wrote the lexer to find that token in the first place
 
@DeadMG Ah. Yah, that would be true...
 
ok
Bison seems to have magically determined that instead of being in a namespace, it's actually at type scope, or ... something?
oh, I'm a moron
5
my palm: it hits my face
 
@DeadMG I vote for "something" -- specifically that Bison is a piece of garbage so bad it's been disowned by its author...
 
no, it's a problem in my grammar
 
10:33 PM
@DeadMG My gramma used to have problems, but those all quit a few years ago when she "assumed an incorporeal state."
 
that happened to my gramma earlier this year
went to her funeral at easter
 
lol I did a friend of mine's home work assignment in C++ and he got all the marks for it, haah
lol
 
you know
as a smarter test case, I should paste some of the samples I've written up on my blog
 
@TonyTheTiger I got straight A's in my college ethics class by cheating on every test. (Okay, not really, but it was too good to pass up).
 
@JerryCoffin lol :P
 
10:36 PM
:L Aha
 
@DeadMG Ah, my condolences. Mine actually died quite some time ago, but she made it past 100, so I guess there's not really any room to complain...
 
mine was dying of some nasty cancer
her final year she basically lost her mind, so honestly, I'm kind of glad she's dead
 
My friend's girlfriend had some stupid beginners IT course (god knows why) and had to write 100 words on CSS
So I offered to do it for her :L writing like 200 words talking about it and taking about syntax and then another 200 showing how it can turn simple <li> elements into styled navigation with 4 different states :L
 
lol
 
Wayy beyond her capability
 
10:39 PM
hahah
 
@DeadMG Eww...yish. That does sound nasty. Actually, mine had a bit of the same -- they said it wasn't Alzheimer's, but something similar. In any case, couldn't remember most of her own children quite a bit of the time -- but was still physically healthy for another 8 years or so after that.
 
My granddad died of Alzheimer just over two years ago, his last days were pretty horrendous
he couldn't move and didn't know nothing anymore, couldn't eat
damn that really got me :(
 
My granddad died when my dad was just 7 - it was cancer because he worked at a nuclear power station during the earlier days of nuclear power when safety requirements weren't as prominent and enforced
 
many people died or suffered badly because of radiation in that time
they didn't genuinely understand the quantity of shielding required or how to be safe with respect to radiation
they were practically building devices faster than they could understand them
 
Yeah
It was just stupid
When was that - like 50 years ago
Well 46
 
10:53 PM
that's like, 65 years ago now
 
Yeah
I don't know the age of my old man :L
He's 50 or something
 
lol
I don't know the age of mine either
I lost track at 55 or so
nah, he must be 56 now
born 1955, and my mother 1960
 
I think my mum is 44
Btw, I'm pretty new here if you hadn't noticed
 
@DeadMG God, you're making me feel old. My mom was born in 1932, and my dad (the cradle robber) in 1921.
 
But how many people are from the UK
 
10:56 PM
lol
not many of us, I think
more common to be from Germany or Portugal in here
 
@KianMayne More from mainland Europe than the islands. There are only a couple of us from the US.
 
Oh right I'm from the UK, just I always end up on at night because I'm out all day
Summer holidays :D
I love how the C++ room is always the most active 24/7 :D
From what <strong>I</strong> see of it anyway
Nope not supporting that tag
 
yeah
the C++ room is almost always the most active
and it's strong
 
the chat's markup isn't HTML
@TonyTheTiger Finished your tit research for the day?
 
11:06 PM
@DeadMG yea, t'was interesting :P
I should go to bed, but I fail to be tired
damn it
 
night night
 
@DeadMG G'night.
 
nite
oh darn, gone quiet in here
everyone gone?
 
<b>blah</b>
What is it then?!
test
Ohh
#bold?#
 
11:21 PM
bold is done with two asterisks instead of one which is italics
 
!gksgrj!
 
** bold **
 
Ohh
 
but remove the spaces
 
bold
 
11:22 PM
bold
yes indeed
 
Yeah Thanks :L
 
no probls, there is the newbie hints
on the top right
which explains it all :)
Jul 28 at 12:03, by Martinho Fernandes
If you are new here, please read the newbie hints. Thank you.
 
@CodeMonkey I posted that earlier
have you been browsing reddit?
 
@TonyTheTiger Yea, can't browse it at work :)
 
11:24 PM
@CodeMonkey ugh, I'd never work there :P
 
@TonyTheTiger good pay, benefits.. keeps me from getting distracted
 
@CodeMonkey oh that's a valid reason
what do you do? write code?
 
@TonyTheTiger Yes, SW Engineer
 
kewl
I guess you know what I'm doing eh
you were here earlier, iirc
 
11:27 PM
looking for a job, lol
 
oh right
 
but yea, as a programmer
 
keep up the search, your first job won't be the last
 
it's not my first one either
lol
 
well if you got no kids, apply everywhere
move around, that's the only way in this economy
 
11:59 PM
That was freaking awesome :D
Torchwood - it's a british Sci-Fi drama
 

« first day (292 days earlier)      last day (4649 days later) »