« first day (448 days earlier)      last day (3570 days later) » 
00:00 - 15:0015:00 - 00:00

12:00 AM
I'm sure SO will get their tag created first. Some brony beginner will encounter a problem.
 
I ought to invent a programming language that is "programmed" by singing notes via Mongolian throat-singing.
I could name it "Mongoloid" ... unless that's already taken.
 
You could write a debugger for it called mongodb.
 
I'll file a trademark application Monday morning.
@200_success Technically, I would "sing" a debugger.
 
0
Q: Brainfuck interpreter in JavaScript

DaggJust what it says on the tin: a brainfuck interpreter in JavaScript. function brainfuck(source) { var code = source.replace(/[^-+<>.,[\]]/g, '').split(''); // program code var loop = []; // stack of loops created by bracket operators var data = []; // array of data cells stored by...

 
12:19 AM
@CaptainObvious And I though I was stirring up trouble.
 
11 questions tagged
@Edward (downloading Scala IDE)
 
@Mat'sMug Don't make me come over there, mister!
I've been playing on SO a bit today. Jeez, what a difference!
 
what's up?
 
Just silly bad questions and rather uncharitable interaction among participants.
 
12:34 AM
(importing interpreter sources...)
 
@Edward You must be looking at SO Java questions.
 
@Mat'sMug - I am OK with the concept of people writing letters to Princess Celestica, but, I draw the line at the inevitible princess selfies you will have to reveal
 
oh shit
 
@Mat'sMug noooooo!
 
Oh dear.... @Mat'sMug is getting sucked in!
 
12:38 AM
I think the term is "awakening his inner brony"
 
D:
 
@CaptainObvious this code is R-rated...
 
for the record, I never watched a single episode of that show.
 
he watched them all!
 
@Mat'sMug Of course not. You're just an avid collector...
 
12:40 AM
@Mat'sMug I won't believe that until you write a GUI program that says it. In FiM
 
lol
 
But for once, watching TV will actually make you better learn a programming language!
 
but.. I'm just curious to see if my FizzBuzz works!
 
I think that in fim++ it comes out "Rainbow Dash" and "Twilight Sparkle" instead of "Fizz" and "Buzz"
 
How do you know those names?
Are you a brony?
 
12:43 AM
@rolfl they're in the language spec examples!
 
Ahh, OK.
 
lol
2
 
is there a language featuring TMNT characters?
 
Hm... would quoting the show still count as valid documentation when posting an answer?
 
Clearly you need to study: mlp.wikia.com/wiki/Characters
 
12:45 AM
I'm waiting for a language based on Pokemon.
 
why did I click that link?
2
 
@Jamal As long as you cite the specific episodes, it's valid.
 
@rolfl ^TS
 
@Mat'sMug Don't think so, but here's a neat presentation comparing programming languages to super heroes ;)
 
#include <rainbow_dash>
@rolfl You know you can't resist. :-)
 
12:47 AM
@Phrancis How can you be out already?
 
^^ huh?
 
Syntax seems wrong. It should probably be something like:
magical incantation, "Rainbow Dash!"
 
Oh. Eastern time USA. Midnight UTC is at like 10 pm
 
> You can't be a programmer and not know Java
@AlexL I think that link is slightly biased ;)
 
Whatever the syntax, I'm sure it needs to have a lot of exclamation points
 
12:48 AM
Been on here since last night
2
 
oh, so TMNT would be then
 
Hell, @Mat'sMug and @skiwi were well before I was today ;)
 
@Phrancis - you know that everything on stack exchange works on zulu time.... right?
2
 
^ TS
 
RSA
 
12:50 AM
(is my leg being pulled here?)
 
Merci Mug
Wait... did the stars reset?
 
RELOAD RELOAD RELOAD (50 minutes ago).
 
Oh shit, I guess it did.
 
and, on that note ....
 
@Phrancis RSA
 
12:51 AM
Dinner time
 
Don't drink it all at once.
 
meh, F-off. no clue how that shit works. smoking the manual was fun, that's all there is to it.
2
 
0
A: Short answers and code-only answers

nhgrifConsider this answer of mine. Let's ignore the first 4-line paragraph for now, as the bulk of that answer is all under the line. Scroll down to the bottom of that answer, and you'll find a 12-line code snippet that addresses one of the asker's primary concerns. A code-only answer from me would...

 
(back to VBA)
 
Time for me to upgrade to OS X Yosemite.
If you don't see me for a while, that probably means I bricked my rob0t side.
 
1:05 AM
@syb0rg That's better than Matt's Mug. He just bricked his human side.
4
 
@JeroenVannevel Well, @SimonAndréForsberg is right. Scala FTW.
 
0
A: Short answers and code-only answers

syb0rgConsider @vnp's answer here. He only made 3 short points, one of which I rebuttled. Sure, he could have expanded the answer a bit to show me what he meant with example code of his own; but it's perfectly fine that he didn't because that isn't a requirement for answers. Sometimes there is only ...

K, updating time.
 
@Edward lol
would suit this one?
2
Q: My implementation of lexicographic permutation in F# is 3x slower than C#

colinfangCan someone help me with the following micro optimization for the F# code for lexicographic permutation? I have code in C# which runs for 0.8s. As a learning practice, I translated it into F#. However, it becomes 2.9s. Just out of curiosity, I am wondering why my code in F# runs that slow? Are t...

 
@Mat'sMug Yes, I think so.
 
I think so
 
1:20 AM
0
Q: Sorting rows of matrix based on entries in first column ( in C)

user49892I found a satisfactory sort algorithm (1d array) on the internet but I tried to retro fit it to bring the second column entry along with the first but the end result after compiling seems to sort the columns independently. Any help is appreciated. It's a array with only two columns. Here's the...

0
Q: Why is it suggested to replace Temp with Query?

JackTo refactor the code, it is suggested to replace Temp with Query, for example in following code, basePrice should be extracted to a method. I am wondering why is it a good practice? If I keep the temporary variable the equation will be calculated once rather than three times. double basePrice = ...

 
so is for whenever the question is comparing A vs B, right?
isn't that meta?
 
@Mat'sMug What if we want to compare and ? OMG!
 
the former has 26 questions, the latter none? :)
I think we should have a meta post that documents/formalizes what types of questions make good CR questions. is one, is burned, but implied as the "typical" type, which gives reviewers a method or a class, or as many classes as the OP puts up for review. Then there's the which gives us a piece of code that's not in a method, from a one-liner snippet (so snynonym ) to a small (large?) script.
 
<- is that when you may or may not believe in code? weird tag
 
@Phrancis means pick any language, it still applies
 
1:33 AM
Ah.
 
probably synonym of
 
Shouldn't it be more like ?
The word "agnostic" just carries this (accurate) I don't know definition. So literally means I don't know what code...
 
in my books a question would be a question without any code..
 
I think it's a bad tag
Good thing, there are zero questions with it ;)
 
my brain was reading
 
1:37 AM
^^ that makes more sense
 
code agnostic? That's just silly.
 
If anything, I think the closest would be like
 
> About language-agnostic
This tag is for questions that aren't specific to a programming language or environment. This tag is not a tag for opinion questions, rather for questions asking about code structuring and design that is applicable in any language, or, for books that do not relate to a specific langugage, rather to programming as a whole, I.E.: Pragmatic Programmers, Code Complete.
 
If it were addressing general concepts as opposed to language-specific code. But then again,
 
1:41 AM
You might get a word in edgewise on Programmers if you like beer & parsing HTML with regex...
 
isn't this one off-topic?
0
Q: Sorting rows of matrix based on entries in first column

user49892I found a satisfactory sort algorithm (1D array) on the Internet, but I tried to retro fit it to bring the second column entry along with the first but the end result after compiling seems to sort the columns independently. It's an array with only two columns. for (i = 1; i < members; i++){ ...

 
^ VTC
Broken code evidently
How do you write ORDER BY Column2; in C? ;-P
^ me
 
@Mat'sMug All those single letter variables...
 
IKR
well they're loop counters really. i and j aren't very surprising.
 
0
Q: Object pool implementation

AlexBelow is my implementation of a pool. It is based on a hash table and supports using strong, soft or weak references to store objects. At the start there is a builder class to configure and create instances, followed by a subclass of Pool which allows multiple reference types to be used. Towards ...

 
1:51 AM
after compiling seems to sort the columns independently. - does the code work?Mat's Mug 8 secs ago
 
You know you're getting serious when you feel the need to pull out another computer.
 
2:12 AM
is certainly automatically off-topic for CodeReview.
 
I like . It represents a sort of zen-like detachment from even the appearance of compileable code.
(yes, I'm kidding)
 
My brain is not working well right now... What am I doing wrong on SEDE?
SELECT
  COUNT(p.Id) AS NumberOfPosts,
  t.TagName AS TagName,
  COUNT(pt.PostId) AS NumberOfPosts

FROM Posts p
INNER JOIN PostTags pt ON p.Id = pt.PostId
INNER JOIN Tags t ON pt.TagId = t.Id

WHERE t.TagName IN ('optimization')
  AND pt.TagId > 1
GROUP BY t.TagName;
Result set:
NumberOfPosts	TagName	NumberOfTags
1281	optimization	1281
I was trying to get a breakdown of how many times [optimization] comes up by each other type of tag
It's probably something stupid but I can't put my finger on it
 
0
Q: "Sherlock and queries" challenge

La-comadrejaI'm writing some Java code for some pretty large datasets, in a puzzle I'm trying to solve. The output is correct, but the program doesn't run within the time limit for all the test cases. I've tried a number of optimizations, but can't think about how to improve it. I'd appreciate your sugges...

 
2:34 AM
OH. I need a subset. That's what it is I bet...
 
hey @Phrancis, SE.DE question - If I grab Posts, how can I show the Title as link?
 
select Posts.id as [Post Link] will do it
you shoukld read the FAQ: data.stackexchange.com/help
 
I did not know that hamsters were allergic to SQL.
You learn something new every day...
Perhaps I'm part hamster...
 
Heyy I got it!
Thanks for the doc, didn't know about it
 
2:54 AM
Whatever happened to this project? — syb0rg 1 min ago
should we put a on that?
 
yeah
done
 
g'night, y'all
 
3:10 AM
1
Q: Parsing ARP cache in C

testcoderHow can I make this better? #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <string.h> #include <stdlib.h> #define ARP_CACHE "/proc/net/arp" #define ARP_BUFFER_LEN 1024 #define ARP_DELIM " " int readLine(int Fd, char ...

 
3:31 AM
Well, my rob0t side lived through the update!
 
:D
 
Though it is a tad bit more buggy
But it looks so much more awesome!
 
By the way, @syb0rg, I've dug through my old answers and updated one here. I guess there's not much else to add to that post.
 
@Jamal Are you working on a post for the latest C question?
 
Not at the moment. Are you?
 
3:36 AM
Yeah, I was just wondering so I could coordinate on what stuff I should get and what I should leave for you to review.
 
No need to wait for me. I'm taking a little break from posting longer reviews anyway. Plus, you have a better understanding of C in particular.
 
@Jamal Yeah, but there is a lot to cover in this one.
 
Heh, I think most school might as well teach C if they're not going to teach C++ properly.
 
3:54 AM
@Jamal Answer posted:
0
A: Parsing ARP cache in C

syb0rgA few notes: Overall, you are doing a lot of unnecessary work. You could just use getifaddrs() to get the IP address, MAC address, and interface name. There are plenty of code examples online on how you can use it to obtain all of that information, including an example in the function documen...

 
I probably would've pointed out... two of those things (and I'm sure you can guess which ones). I usually get intimidated by a large amount of code.
 
@Jamal TBH, I didn't even look at his code that in-depth. I saw what the program was intended for and found a better way to do it, and then reviewed a few of the other more glaring items in his code.
 
I would've just picked apart bad practices and such, like I always do. I can only rewrite the simplest of implementations myself.
 
Hello @GregBray, I didn't see you come in
Apparently I lost 20 reputation from a user being removed: codereview.stackexchange.com/users/27623/syb0rg?tab=reputation
:(
 
it happens, I lost 30 from someone deleting their post :)
 
4:03 AM
Hey @Yuushi! It's been a while.
 
That had happened to me, too. There's no way I can determine who it was, though.
 
hey @syb0rg. Yeah, it really has been.
 
@Jamal Really? I thought moderators would have that ability.
@Yuushi Been up to anything fun lately?
 
@syb0rg We can only review logs of a deleted user if we have their ID, but that cannot be obtained from the reputation page. Not that it really matters anyway.
 
@syb0rg Hrm, started a new contract, and I have no internet still, so...no :/
 
4:05 AM
@Yuushi Contract?
@Jamal Yeah, but I'm always curious about that kinda stuff. Like if it was someone I knew.
 
It might've been a self-deletion or a mandatory deletion by a CM. Mods pretty much only delete spammers who cannot vote anyway.
 
@syb0rg Work contract. I've bounced around between about 3 different contracts in the last year
 
@Yuushi Ohh, cool! Any details you wanna share?
 
@syb0rg I'm under an NDA (again...) so unfortunately I can't, really
that being said, it's really not all that exciting anyway
 
@Yuushi Well, if you are curious as to one thing I have been up too lately: syb0rg.github.io/tritium.io
 
4:09 AM
@syb0rg Cool. Did you build the website as well?
I did a few small updates to bitbucket.org/yuushi/sgl
 
@Yuushi It's a very heavily modified bootstrap template. So yes, with the help of kleinfreund and Dagg. And this answer: stackoverflow.com/a/24883898/1937270
 
Y U no add an icon for CR? :P Or are you unable to do that?
 
@Yuushi Bitbucket over Github?
 
I like mercurial, what can I say
but I should also put it over to github soon
anyway, lunch time, be back (quite a bit) later :)
 
@Yuushi Lunch? I'm about ready to go to bed
 
4:15 AM
1
Q: More efficient conversion of tab-formatted nested data structure to json

kaluI have data that looks like the "Input" below and need to convert it into JSON. My solution works by parsing the text to find a level for each data point. Then I use a recursive structure to build a JSON tree (or maybe its not JSON, but its much more useful than the original format). First, I ...

 
May have ripped this guy up a little bit: github.com/riolet/nope.c/pull/16
 
 
1 hour later…
5:28 AM
When someone sees this and knows a bit about making a GUI, if you feel like it, I have a few simple questions from a database guy.
 
 
1 hour later…
6:38 AM
The I/O on Bungie's servers must be insane right now.
 
6:48 AM
0
Q: Revision 2 - Step 1: PsychoProductions management tool project

PhrancisI have been told by DBA people that this was off-topic for DBA and should be on CR instead. So here I submit this database schema design for my trusted fellow CRitters to review! So, this is another revision of my Psycho Productions database, this time refactored from MySQL to PostgreSQL, after...

@CaptainObvious I beat you to it!
 
0
Q: Revision 2 - Step 1: PsychoProductions management tool project

PhrancisI have been told by DBA people that this was off-topic for DBA and should be on CR instead. So here I submit this database schema design for my trusted fellow CRitters to review! So, this is another revision of my Psycho Productions database, this time refactored from MySQL to PostgreSQL, after...

 
^^ told ya.
I guess dba.stackexchange.com is not beta for the same reason SO isn't... fix this codez plz
... fix this databazes plz
They showed me the door because I did not have a specific problem (or a problem at all)
I must have over-estimated the rest of technology-related SE to be like CR. Won't make that mistake again ;)
 
 
1 hour later…
8:12 AM
Hey @amon :)
 
good monking, @kleinfreund!
 
How're you doing?
 
quite well, thank you. I'm about to enjoy a lazy Saturday :) And you?
 
That was my plan as well, but my parrents take me to some kind of event.
But it's alright. ;)
 
8:55 AM
0
Q: Is it really off-topic to ask for the explanation of a "best practice"

janosThis question was put on hold for being off-topic: Why is it suggested to replace Temp with Query? To refactor the code, it is suggested here to replace Temp with Query, for example in following code, basePrice should be extracted to a method. I am wondering why is it a good practice? If...

 
9:09 AM
0
Q: Comments on contest code for a maze problem

MykelXIIII would like to ask your comments on my contest code for the following problem: We're going to have a slightly more logical puzzle today. We're going to write a program that will find a path through a simple maze. Formal Inputs & Outputs Input Description Through standard console, you will be g...

 
9:23 AM
0
Q: Parsing XML Async?

KittoesI've run into the need to deserialize XML that returns from an http request. I've done some light work with XML deserialization in the past but that was against files on disk. While attempting to write the code I noticed that many of the methods in HttpWeb* and XmlReader had both an async and a ...

 
Guys,
Where would I ask advice for Web Design?
 
howdy
 
howdy.
janos
Can we post up designs for Design Review?
-.-
 
9:41 AM
no, hence the name, Code Review
 
janos, do you know a place where I can get my design reviewed?
I seriously suck at designing.
 
graphicdesign.stackexchange.com
^^ @HassanAlthaf
 
@Phrancis thanks alot.
 
np
Granted everyone is busy playing Destiny this weekend... but if you're not, fast-forward to 2:30... youtube.com/watch?v=h0XEmBCBB24
 
Is it a song? @Phrancis
 
9:47 AM
Yes
 
Oh.. can't listen to songs till Monday.
Wish I could. >:(
 
No speakers??
 
No, I'm fasting.
 
Fasting from music??
 
For muslim's, this is the month of Ramazan, where we fast for the whole month.
 
9:49 AM
Ah, ok
 
We should abstain from food, drink, and all sorts of sins.
-.-
 
I'm just going to remain quiet
 
This is just a way to increase control over you to avoid committing sins.
Let me see if I can review anythig.
 
I respect that you are willing to abide by and obey your religious convictions. I just disagree that religious convictions should be "a thing" for lack of better words.
I hope that makes sense to you..
 
I didn't make sense to me.
It sound's like you are an atheist.
 
9:56 AM
Would that be OK with you?
 
I don't mind what people believe.
We're going off-topic I guess?
 
I am atheist but I don't aim to offend
@HassanAlthaf welcome to the 2nd monitor ;)
Joking aside though, as long as someone is not hurting someone else I don't mind their religion very much at all
I wouldn't have known you were Muslim unless you mentioned it, and that doesn't change my opinion of you { unless you write bad code ;) }
@200_success teaches me how to write SQL all over again, as usual :)
TTGTB (finally)
 
10:31 AM
Monking
 
11:27 AM
monking
 
0
Q: How to create serialize class for soap xml message using WCF data contract serializer?

Mahendra SahuI need to create class and assign values of classes's property.Can I convert this composed class into SOAP XML message.The soap message should include credential in header. Can I do this by using WCF data contract serializer? Below are the code of SOAP XML Message <soapenv:Envelope xmlns:so...

 
@CaptainObvious nope
 
Monking @DaggNabbit
 
I'm trying to figure out if my brainfuck question went hot... it was supposed to
if it did, it went cold again
it has 160 views so something must have happened
hmm, the other brainfuck interpreter question is gone from the hot list too... wonder if someone is manually removing them because of "fuck"
 
maybe people got sick of fizzbuzz?
 
11:36 AM
idk, why?
 
I wonder why ^^
 
the codereview weekend of fizzbuzz wore everyone out
 
11:48 AM
0
Q: Program to find the prime numbers between two given integers in the minimum number of comparisions

Ashhar Hasan#include<stdio.h> #include<conio.h> #include<math.h> void main() { clrscr(); int i,n,count,n1,n2; printf("Enter n1 and n2:"); scanf("%d",&n1); scanf("%d",&n2); n=n1; int c=0; //variable to store number of comparisions (number of times while() runs) for(n=n1;n<=n2;n1++,n=n1) { count=0; //numb...

 
lol
312
Q: Which is faster: while(1) or while(2)?

Nikole This was an interview question asked by a senior manager. Which is faster? while(1) { // some code } or while(2) { //some code } I said that both have the same execution speed, as the expression inside while should finally evaluate to true or false. In this case, both evaluate to true an...

 
12:10 PM
wow, 300+ votes
 
12:45 PM
0
Q: Simple IPv4 & Port Validation

DarkPh03n1XThis is part of my chat client's code. It works Fine but it looks messy. Any ideas? //IP Validation private void textBox3_Leave(object sender, EventArgs e) { IPAddress ip; bool ValidateIP = IPAddress.TryParse(textBox3.Text, out ip); if (ValidateIP) { ...

 
Monking @all
66
Q: Is "for(;;)" faster than "while (TRUE)"? If not, why do people use it?

Chris Cooperfor (;;) { //Something to be done repeatedly } I have seen this sort of thing used a lot, but I think it is rather strange... Wouldn't it be much clearer to say while(true), or something along those lines? I'm guessing that (as is the reason for many-a-programmer to resort to cryptic code)...

I had to scroll down several answers to come to the "for(;;)" is faster to type than "while(TRUE)" argument :)
 
Hey Nobody
 
Hello @rolfl
 
1:12 PM
Hey @rolfl and @Nobody
 
Do you remember how I complained about sometimes getting these spurious ping sounds?
It seems to happen when a youtube video ends
 
Okay... that's rather interesting, and I see that @Nobody cares about that!
 
Lol: I got no sound notification of your ping but when I closed the youtube tab I got one
@skiwi: This was meant more like: Did anyone of you experience something similar?
 
1:34 PM
0
Q: Entity Framework - Code first , is it the best way to represent relationship between three entities?

codebasedI have the following relationship, please suggest if this is the best way to represent the following bidirectional reference. User[1] -> Requests[M] project[1] -> Requests[M] project[M] -> stakeholders/ Users [N] Class ProjectMapper() { this.HasMany(p => p.Stakeholders).WithMany(u => u.Pro...

 
1:48 PM
0
Q: File handling script

demasThis is my first bash script so I ask to you to say what you think. The script must check every directory and it it find the pdf file on this directory: move file to parent directory, change the name of this file and remove directory. So if I had this folder structure: folder1 file.pdf fi...

 
2:00 PM
@Nobody I didn't mean that nobody cared, but I actually meant that you cared :) Though I haven't experienced it myself
Don't know what could've caused it
So we went from Fizzbuzz to Brainfuck interpreters
 
@skiwi I just posted another bf interpreter question xD
should i make followup questions CW?
 
nah, they're just normal questions
 
i predict this will get way fewer votes than the original, making the original look better when this one is probably better... something about that makes me think it should be CW
 
0
Q: Brainfuck interpreter in JavaScript, take 2

DaggThe previous version is here. This version takes into suggestions from the review on that version into account: brainfuck is now an object instead of a function, and brainfuck.run(source) kicks off the interpreter. There is no built-in support for multiple interpreter instances, but Object.crea...

 
2:20 PM
This is one of the weirdest pics I've seen in a while...
 
wtf is that
 
I did some more clean up on . Feel free to change anything I've done or finish the burnination.
 
It's an anteater
 
0
Q: Is there a cleaner way to write this messy block of if, else if statements comparing numbers and making a calculation

Gary JustinI have a piece of javascript I wrote for a recent work project that is essentially taking a deviceorientation event object, taking either the beta value or gamma value of that object and makes a calculation. While I can't necessarily put my exact code here just in case that breaks any of the agr...

 
I've gotta go pay attention to RL.
 
2:21 PM
And his front legs camouflage looks like a panda
 
@skiwi i see the antearters but what's that little bear thing
 
6
Q: Should we burn [Google]?

ckuhn203Recently some others and I began to clean up google a bit. This started with retagging a number of question with google-apps-script. Then we hit a wall. All of the questions that should have been retagged were, but we were left with 18 14 questions that didn't seem to have a better tag than the e...

 
that's gotta be photoshopped
 
It's how his leg looks like appereantly
It's on the internet, so it has to be true, right?
 
you're right, just did a google image search
they all have legs that look like little bears :o
 
2:27 PM
It's weird
Can a pointer in C to a class hold a lot data? like in the range of MB's?
 
a class in C?
a pointer holding data? I'm confused
 
I'm not good at C, and using it via Java
 
pretty sure there are no classes in C
 
A pointer itself does only hold a memory location
 
I've got this Java code, which involves the native interface to call C code:
Pointer<TessBaseAPI> api = TessBaseAPICreate();
 
2:36 PM
and it can point to an array of arbitrary size
 
This is in C code a TessBaseAPI* api
I'm probably being confused
What is the TessBaseAPI if it is not a class?
 
could be like a struct?
 
I'm wondering if it can allocate like several MB's of data, can only get deallocated once the pointer goes out scope?
 
It is C++
 
(For which via Java you need to call say api.release() then)
 
2:39 PM
you are using tesseract?
 
Tesseract yes, but this is the C API I'm working with
 
That thing is not what I'm using
 
oh, ok
 
Mine has way more methods etc. I'm quite sure
 
2:40 PM
it could be a struct containing function pointers
 
probably that
 
How does that interact with the memory it uses?
Functions pointers are just a few bytes?
 
all pointers are the same size
 
Usually architecture word sized (they are pointers as well)
 
just big enough to hold a memory location
 
2:42 PM
So it may create a small memory leak then, but surely not a big one?
small as in few bytes/kb's
 
4 or 8 bytes in general, for 32/64 bit architectures
 
depending on how many function pointers there are in it
 
okay
 
@skiwi you should be able to check with valgrind
 
@DaggNabbit: on a java program?
 
2:46 PM
Other issue for me still is that some TessResultIteratorDelete(...) doesn't wor,k, as it just crashes, but that issue is in a 3rd party library and may be the thing causing me to lose like 5MB RAM per document
 
@Nobody i thought it was C?
 
It's C code being executed via native calls on Java
 
wth
 
As bad as it sounds, the 5MB memory leak per document may be feasible with a server restart once a week
But I'd rather just fix it
 
is there no OCR library for Java?
 
2:48 PM
@skiwi: can't you free the pointer once you are done?
 
@Nobody I'm not exactly sure where I should be looking at
I figured that these calls are very important to release the memory:
//        TessPageIteratorDelete(pageIterator); //TODO get this working, may still have a memory leak here
        pageIterator.release();
        TessResultIteratorDelete(resultIterator);
        resultIterator.release();
        TessBaseAPIDelete(api);
        api.release();
The Tess***Delete calls
That's probably the method that makes the api dealloc its mem
 
yeah, sounds reasonable
 
@DaggNabbit Nope :/ All existing ones interface with Tesseract, some plain call the command line, another one does use the C API as well, but it's not as advanced as I need it
I'm currently working on this one and may release it open source (if my boss agrees to it, need to discuss), and the idea is to store all data I can obtain in a file, which can be read in by other Java applications
 
@DaggNabbit: Quick question, I am trying to learn some java and am stuck with following problem: I have a HTML page with inline script as well as an included external script. When I call a function from the external script from the inline script the console says: Uncaught TypeError: undefined is not a function
 
@Nobody The problem there is that TessPageIteratorDelete exists the JVM with some error code like -some_integer, and doesn't tell me anything else
 
2:52 PM
@skiwi: Did you google for this error code?
one possibility would be that you are doing a double free
 
I have googled it, found nothing apart from that I've googled for it earlier
 
as you have narrowed it down to one line of code it should not be hard to post to SO ^^
wait a moment
you are doing Delete and then release?
 
Yep
But the crash occured without those .release()
 
is that the correct way?
 
Haven't tested it with it added in yet
 
2:56 PM
@Nobody @DaggNabbit: Damn, was too fast. I meant javascript ^^
 
It's quite hard to work with this thing, it might just crash and give no meaningful response or indication where it happened
 
@skiwi: Welcome to the native code world where there are no stack traces (without an attached debugger and a debug build)
 
I probably would need to write a program in C++ that stores it in some text file format, but I'm not really capable of that
I get this:
> Process 'command 'C:\Program Files\Java\jdk1.8.0\bin\java.exe'' finished with non-zero exit value -1073740940
 
00:00 - 15:0015:00 - 00:00

« first day (448 days earlier)      last day (3570 days later) »