« first day (1608 days earlier)      last day (3342 days later) » 

11:00 PM
@sbi does that come with a child's innocence?
 
Also don't forget to link the code and not dump it!
 
sbi
@thecoshman Yeah, but I guess the latter you have lost long ago.
 
@sbi I like to pretend :)
 
sbi
> In light of the passing of the great Sir Terry #Pratchett, I hereby declare that tomorrow doesn't matter. Stay home and read. – [Ryan Glass ](twitter.com/RyanGlass4reals/status/576117810654400512)
@thecoshman You fail at that. Miserably.
 
@sbi can I blame the world?
 
sbi
11:02 PM
@thecoshman Sure.
 
@sbi it's the worlds fault!
 
sbi
Loser.
 
it's not my fault thouht
 
user1804599
@Agostino Sure.
 
user1804599
Dude wtf.
 
user1804599
11:08 PM
Don't dump your code here twice.
 
we have a code brown in isle 9, I repeat, code brown
 
4 messages moved to bin
 
sorry, I missed the & char
 
@Agostino
> Also don't forget to link the code and not dump it!
 
Sorry, I was eating.
Don't post code dumps here.
 
11:09 PM
@Rapptz slacker
 
pastebin?
 
user1804599
Also, you have an epic memory leak.
 
where?
 
user1804599
Lemme fix your code.
 
Your code doesn't compile, hth.
 
user1804599
There, fixed the memory leak and the dereferencing operators: gist.github.com/rightfold/77541ed278eb112f4441
 
Would probably be better than pastebin, but pastebin is already way better I think
 
user1804599
The assignment operator of std::string will copy the C string so the code is fine.
 
@райтфолд is this suitable as a question?
making the code compile etc
with embellishments etc
and thanks :)
 
sbi
Well, I guess I am now sufficiently drunk to go to bed on such a bad day. Good night!
 
11:12 PM
night
 
user1804599
Protip: never use new.
 
yes, it is night.
 
goodnight
 
@Agostino I'd say (though I don't have a very high reputation) that's perfectly fine to post on SO.
 
user1804599
Only Jon Skeet has the highest reputation.
 
11:12 PM
Though you should probably also learn to interpret your compilers errors.
 
@jPlatte ok, I'll post it there
@jPlatte I had no errors, this is a simple ssewhatever
 
@райтфолд better? ^^
 
user1804599
@jPlatte Just have them interpreted automatically: clang++ -std=c++14 -Wall -Wextra -Werror -pedantic main.cpp 2>&1 | python3.
 
just trying to avoid finding memleaks after
@райтфолд python?
 
user1804599
You can't avoid memory leaks if you use new.
 
user1804599
11:14 PM
It's too difficult.
 
@Agostino But... You're trying to access a member of a MyStruct& with the operator ->... Either I'm missing something obvious or that won't compile.
 
user1804599
Use automatic storage duration or smart pointers.
 
@райтфолд lol
 
it's a dangling pointer, not a memleak actually
 
user1804599
You said new MyStruct, then called the assignment operator of std::string.
 
user1804599
11:15 PM
That's an instant memory leak possibility.
 
and yes, I could use better memory management
I'm striving to get results here
 
@Agostino Oh wait, yeah... That's not the only problem with that code. You should obviously not post examples before trying to compile them.
 
user1804599
If std::string assignment operator throws you're doomed.
 
@райтфолд It won't, really.
 
as long as code does not have undefined behavior, it's fine
in the current situation
 
11:16 PM
epic fail
 
thank you all
 
user1804599
Ok, let's see how to implement these precedence rules.
 
user1804599
Pretty simple, actually. The operator tokens just need a precedence method of type Int.
 
user1804599
Then the parser calls said method.
 
11:24 PM
no, that's a fail
er wait, I misread it
 
user1804599
Why?
 
that's somewhat fine
in Wide I just interpret an equivalent structure directly and don't bother with any special types or functions for it.
 
user1804599
My Token is a variant.
 
that's completely unnecessary really
 
user1804599
What else? Dynamically typed value field shit? Lexing in the parser shit? Nope.
 
user1804599
11:26 PM
sealed abstract class Token
case class IdentifierToken(name: String) extends Token
case class IntToken(value: Int) extends Token
case class OperatorToken(operator: String) extends Token { … }
case object Func extends Token
 
user1804599
This is good.
 
well, there's nothing interesting about one token type over another really
it's not like you can parse based on a token interface or something
 
user1804599
Though precedence should not be a method on OperatorToken.
 
in Wide I started with an enumeration and then made it more extensible
 
Have any of you used Gradle for building c++ stuff
 
user1804599
11:33 PM
These precedence rules are nice. Operators like |>, *>, ?> and @> have the lowest precedence so you can write stuff like xs *> square() |> cycle() ?> even?() |> take(20) @> infix+().
 
user1804599
As a pipeline of applications, maps, reductions and filters.
 
user1804599
The exception for <> is ugly though, maybe I should go with != instead.
 
I hate remembering operator precedence. I just parantheses all the things
 
user1804599
I could add ^ which is equivalent to <> but with different precedence. :P
 
@Pris I wonder what impact that would have on the language if operators were just done left to right, unless you bracket shit up first. so, i = 5 + 6 would end up with i being 5 and did a random 5+6 calculation for no reason...
 
11:44 PM
@LightnessRacesinOrbit
 
user1804599
| and & cannot be mixed without parenthesising them.
 
@Borgleader idgi
 
@Rapptz It's Jeremy Clarkson's daughter (afaik)
 
Microsoft to run unmodified linux binaries on windows: "How about "Eniw's Not Inverted Wine"?"
 
@sehe nice :)
Where did you read that though?
 
11:48 PM
@райтфолд logical and and or?
 
@jPlatte Google!
 
Okay, I've read about Foreign LINUX...
 
Perhaps I should have said "windows gonna be able" instead "microsoft to".
 
@sehe ¬_¬ did you come up with that?
 
Yeah, that's what I was wondering about ^^
 
11:50 PM
Does it look awesome? If so, then yes, of course!
Otherwise:
1 min ago, by sehe
@jPlatte Google!
 
lol great programmer font
 
@sehe it does look awesome, but if you are just copying what someone else wrote first, I Can't stand by promoting that name and giving you credit.
 
@FredOverflow ahahahaa. Prepared my daughter's classroom presentation today. Used it!
 
@FredOverflow makes me feel welcome
any way, time to write my will and hope that I can wake up to correct it. yes, I feel that cold
 
What is a great programmer font? I bet there's half a dozen closed questions on stack overflow...
 
11:54 PM
@FredOverflow [P.SE]
 
135
Q: complete, monospaced Unicode font?

nachikI'm looking for a good programming font that lets me add comments and string literals in Unicode, usually Japanese and Chinese along with some Latin and Cyrillic languages. So far the situation seems to be "complete, monospace, free, pick 2" and Google is failing me with this (maybe because ther...

The only one I found... strange.
 
@FredOverflow You could try out the "Adobe source code pro" font (the monospace variant, there is a nno-monospace for some reason)
 
Consolas seems to be nice
 
^
 
@jPlatte nnno-no-no that's called ppp-proportional
 
11:56 PM
Rrr-really?
 
I ddin't know that :>
 
@Nooble B-b-ba-dddd-dum-tst-t-t-t-tish!
 
@sehe :)
 
@FredOverflow Consolas. Or Inconsolata-LGC on Linux is what I use.
 
DejaVu Sans Mono
 
11:59 PM
@Rapptz no image ffs
 

« first day (1608 days earlier)      last day (3342 days later) »