Last thread: What are you working on, Jow Forums?
/dpt/ - Daily Programming Thread
Great image, OP.
Better than the typical /dpt/ animu bullshit.
how's the progress coming lads?
Ftrace trace-cmd segfaults every time I use it
If someone could help me with this I would be very grateful.
>average file size is between 2000 and 7000 lines
>enums are passed as int parameters
>objects are never passed by value, always converted to an array of strings, then parsing them
>these arrays can be 50 or more elements long
>endless switch cases, one of them went up to 100 (they were all ints by the way)
>responsibilities are not separated, starting processes, displaying the results, generating a page to print, database management all done by the same thing
>nothing is commentated
You'd think this was some low-level C or Fortran program, but no, it's in fucking C# and it's running on Windows 10
I became a .net dev to get away from this
REAL THREAD
REAL THREAD
I would have helped you out, but my girlfriend is korean
Real new thread:
No problem user.
Stop shilling your stupid thread fag.
based Jow Forums poster
>two replies within 20 seconds
>must be one guy using multiple IPs hurr
What are the good projects to practice LISP?
Should I learn Haskell?
>doing a lot of work line of code-wise but it's all boilerplate slightly altered for different cases
Is this what it's like to work with languages like C or should I rethink my approach
Programming without generics is like that.
Interesting. Let's see which thread win.
This thread is older, jannies should delete that impostor thread.
this thread is shit, it belongs on reddit
fuck off dumb frogposter
Can i get a help with yacc/lex? I need to parse 2 Teams names and then goal results in format 5:2, then print which Team won. Problem is if first number > second number, then i want to print first word ($1) but it prints whole sentence instead. Why?
Well ok, i fixed it somehow with adding whitespace before regexp and after it, it works but fail if i dont write whitespace before name of first team. Is there more elegant solution?
lex code
%{
#include
#include "y.tab.h"
%}
%%
[0-9]+ yylval=atoi(yytext); return NUMBER;
\b((e[A-Z][a-z]+)|([A-Z][a-z]+[A-Z][a-z]+))\b yylval=yytext; return TEAM;
vs return VS;
: return COLON;
\n /* ignore end of line */;
%%
yacc code
%{
#include
#include
int yywrap() { return 1;}
void yyerror(const char *str) { fprintf(stderr, "error %s\n",str); }
main() { yyparse(); }
%}
%token NUMBER COLON VS TEAM
%%
commands: /* empty */
| commands command
;
command:
points
;
points:
TEAM VS TEAM NUMBER COLON NUMBER
{
if($4>=$6) printf("Team %s with score %d : %d", $1, $4,$6);
else printf("Team %s won with score %d : %d", $3, $4,$6);
}
;
%%
>yacc/lex
People still use this disgusting buggy ancient shit? Fuck me. I should write an Earley parser.
Asynchronous webserver.
Macros for creating serializable data models.
Parsers for JSON and YAML.
Get to it, fellow LISPer.