« first day (1297 days earlier)      last day (2719 days later) » 
00:00 - 19:0019:00 - 00:00

12:00 AM
RELOAD! There are 3058 unanswered questions (92.2388% answered)
 
0
Q: Function with default parameters in any order

Aaron AlbersIntent Increase code usability/readability of functions with many default parameters while maintaining as much compile time safety as possible. Motivation It is very common to create functions that have many default parameters that extend and customise their side-effects. A problem arises in fun...

 
12:27 AM
0
Q: Should I use 'volatile' in this struct to be accessed by threads?

8protonsI'm creating a buffer to be accessed by some threads. struct buffer { struct items[32]; int numItems = 0; /*will keep track of number of items in the buffer }; and will be updated by threads when accessed. We'll include mutex locking*/ Sho...

 
12:44 AM
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comAndreas 57 secs ago
 
1:03 AM
0
Q: Simply i'm asking for a better solution for retrieving and displaying database infromation for this simple php quiz application?

sameh sayedSimply i'm working on quiz application for training purposes and i think i'm done with most of it. but the problem is that i'm not comfortable with what I've done, i seems to be complicated and unprofessional and i would like to make it more organized and simple to understand. first the database...

 
Does anyone remember when I was having trouble with my computer taking ~30 minutes to go to sleep? Well it happens when I Shut Down as well. #GreatJobMicrosoft
 
0
Q: Any suggestions on how to better my code?

salI would just like some input on how I may improve my code(in terms of content not formatting) without changing the output:) It's just a simple magic 8 ball program using dialog boxes. Here's my code: import java.security.SecureRandom; import javax.swing.ImageIcon; import javax.swing.JOption...

 
1:22 AM
@EBrown Sounds like something is wrong with the computer
 
@Phrancis I blame EFI BIOS replacements.
 
Who?
 
We replaced the old text-based BIOS systems with EFI/UEFI and now, coincidentally, computers are crap.
 
1:47 AM
Why would the BIOS or EFI be involved in shutdown? Once booted into the OS, EFI is hardly used for anything.
 
jrh
the BIOS actually is involved in shutdown but I kind of doubt it's causing the delay howtogeek.com/181295/…
 
For ACPI? Sure, I guess so. But a 30 minute delay? I can't imagine ACPI doing anything that would take 30 minutes.
 
2:50 AM
Leaving comments and code like //If user inputs 4 this case will run. and case 6: doesn't endear you to code reviewers. It would be better to delete the comments than to have inherently incorrect comments in the code. — Jonathan Leffler 5 secs ago
 
3:10 AM
Either you are requesting a code review and this is the wrong site, or you are requesting help to fix a bug and then you should clearly state what the bug is. How to AskJulien Bernu 34 secs ago
 
3:40 AM
0
Q: Go: I have written a really fast knight tour using concurrency and Go Routines

AminadavThis is my code. In less that 5 seconds on normal PC. I found the answer package main import ( "fmt" ) const ( a = 8 b = 8 maxLevels = 64 ) func main() { c := make(chan [a][b]int) for x1 := 0; x1 < a; x1++ { for y1 := 0; y1 < b; y1++ { ...

 
4:30 AM
Your code is very un-Ruby-like. I suggest you consider posting it at SO's sister-site, Code Review. There you will get useful suggestions for improving it. — Cary Swoveland 26 secs ago
 
5:13 AM
0
Q: Checking If CPU Supports rdrand

8protonsMy goal with this bit of code is to check if my processor supports rdrand and, if not, execute some other random number generating function. To check if rdrand is supported, the 30th bit in the ecx register should be set. I guess my one of my dilemmas is whether or not I should explicitly check ...

 
 
1 hour later…
6:29 AM
I'm voting to close this question as off-topic because review requests for working code should go to codereview.stackexchange.com — GhostCat 13 secs ago
 
0
Q: Hex values shared in Char (Complex look)

ZerowalkerSo what my code does is to share some value with it's neighbor. It's kinda hard to explain, i have commented the code so it shouldn't be impossible. The names "Instructions, Registers" can be ignored, just see them as "names", what's important is how they are shared. which can be seen in the c...

 
6:50 AM
0
Q: housekeeping configure output files

sandun dhammikaI have a large project which uses recursive make. I'm using a config.make file to keep the configuration settings (for a example what are the install locations). When it comes to inner project directories what is the best thing to do. * Copy root config.make file into inner directory and inclu...

 
7:12 AM
0
Q: Android recycler view adapter filter

Harish GyananiI am trying to optimize the filter method for RecyclerView Adapter in Android. The list is used as an ArrayList. I have seen this post but they are filtering from the original list every time. They are not using old results if a character is added. Please suggest code optimizations for this metho...

 
7:24 AM
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.com. — Anmol Singh Jaggi 33 secs ago
Hi @elnaz ! If your code is already working correctly, but you want to improve it, the best place for that would be [the code review site](codereview.stackexchange.com). — Anmol Singh Jaggi 51 secs ago
It looks fine and clean. But you can review your code in codereview.stackexchange.com,if needed. — Achilles 55 secs ago
 
0
Q: Guessing the JDK home directory

sandun dhammikaMy project is using a specific version of JDK which is jdk-6 and the default JDK_HOME path will vary from distribution to distribution, so I wrote a script to guess it. Is there any way to do this better? #!/bin/bash JAVA_HOME="" JDK_TEMP="" shopt -s extglob JDK_ROOT_DIR=( /usr/java/ /usr/java/...

 
7:56 AM
Rectangle.__init__ still looks weird: self.bottom = right self.right = bottom. With left, right, bottom, top, rect2 has zero width (just saying), and the other rectangles have top < bottom. (If and when you edit this, have a look at Andrew Svetlov's edit to save vertical space, and consider to follow user7138814's suggestion.) — greybeard 47 secs ago
 
8:11 AM
0
Q: I would love to shorten up this while loop in Java. Any tips on how I should do this?

Ledjonwhile (head <= tail) { if (Choice == possibleNumbers[(head + tail)/2]) { foundNumber = true; break; } else if (Choice < possibleNumbers[(head + tail)/2]) { tail = (head + tail)/2 - 1; } else head = (head + tai...

 
8:22 AM
0
Q: Hex string to Base64

sYnfoThe base64 decode algorithm is taken directly from Base64 wiki page. This exercise is meant to help me learn Rust, so any pointers in that general direction are very welcome. :) fn main() { println!("{}", hex_to_base64("49276d206b696c6c696e6720796f757220627261696e206c696b65206120706...

 
8:33 AM
Monking
 
8:47 AM
By the way, if you're able to fix your problem, I strongly suggest you to have your code reviewed at Code Review later on (as soon as it works). — Zeta 35 secs ago
 
Monking
 
Kaz
9:15 AM
Monking @all
 
@Vogel612 what we are doing is a SDK for a driver, so I don't have that as an option. We have customers who are using JDK-6. But I can use the JDK 7 for compiling which is compatible with JDK 6, but again it is adding more complexities when it comes to building with ant. — sandun dhammika 13 mins ago
poor sod ..
 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Controller method to update properties of a request
 
0
Q: Reading properties from file during standlone application startup

vtorI've a standlone Java application, which is basically starts and manages two socket servers. I'd like to configure server ports in .properties file, and for the sake of purpose have the following class. class ApplicationConfig { private static final Logger LOG = Logger.getLog...

 
9:40 AM
0
Q: HomeWork ((please help))

aliFind the sum of the first 50 natural numbers . Print the following numbers : 1 3 5 7 9 11 . Print the following numbers : 20 17 14 11 8 5 2 . Find the sum of any 10 unmbers entered by the user . Read 10 numbers,print the maximum one. Print the sum of even numbers in [1100] Resd n, Find the valu...

 
Fling pls
 
10:00 AM
Fab, that's the main thing. Wanted to ensure the right process for the job but as it was mainly an amend to someone elses code (that I linked to) I felt codereview was not quite the right place. — indofraiser 1 min ago
 
10:51 AM
What is the question? Your code works or not? You want code review? Saying "Its due: 5/12/16 15:30 GMT" is not helpful and is likely to aggravate, we are not obliged to meet your deadlines — Chris_Rands 52 secs ago
This should be ask on [codereview] How did you repaing your balls ? From scratch or just the changes ? — AxelH 9 secs ago
 
11:17 AM
I'm voting to close this question as off-topic because this belongs on codereview.stackexchange.comCerbrus 43 secs ago
 
11:38 AM
@Cerbrus there is no such thing as migration to CR. The only way to migrate to CR is through moderator intervention. Accordingly you should just close the question and if necessary flag for mod-attention. This is also the documented "workaround" while CR does not accept user-based migrations. There's a bunch of previous discussion around this on MSO under codereview-seVogel612 31 secs ago
 
Kaz
 
@Kaz is that you, Joel?
 
12:03 PM
Monking
 
12:36 PM
0
Q: Calculator using only functions in C

Aravind MariappanHello guys im sort of new to C and would like to know how to create a Calculator and a Help function using functions. If it was with Switch Case - it would be easy to do so ,but the assignment is with using function. For eg, if we give the input as such add 12 14 26 mul 3 2 6 ...

 
@CaptainObvious CVpls
 
0
Q: Dual-language beginner math solver program in C++

PradanaI've written a program that solves questions of: Addition Finding the hypotenuse of a triangle Checking if the triangle has a right-angle or not. I've also written it to be viewed in English or French. There's a few errors regarding int and while but it still works all the same. In case of an...

 
1:10 PM
This essentially builds a single heap from all of the items. The algorithmic complexity is O(n log n), where n is the total number of items. You can take advantage of the fact that the lists are sorted, and do it in O(n log k), where k is the number of lists. See codereview.stackexchange.com/questions/101078/… for an implementation. — Jim Mischel 30 secs ago
 
@AntP Code doesn't lie? I'm used to bugs but code that claims to only display something but turns out to actually exit the program? Yeah, that's not exactly honest. — CandiedOrange 10 hours ago
lol
 
1:32 PM
Greetings, Programs.
 
Greetings, @Donald.McLean
Working on anything interesting lately?
 
Still working on the archive. Currently we're working on getting the JWST archive set up in preparation for launch.
The James Webb Space Telescope (JWST), previously known as Next Generation Space Telescope (NGST), is a Flagship-class space observatory under construction and scheduled to launch in October 2018. The JWST will offer unprecedented resolution and sensitivity from long-wavelength (orange-red) visible light, through near-infrared to the mid-infrared (0.6 to 27 micrometers), and is a successor instrument to the Hubble Space Telescope and the Spitzer Space Telescope. While Hubble has a 2.4-meter (7.9 ft) mirror, the JWST features a larger and segmented 6.5-meter-diameter (21 ft 4 in) primary mirror...
Just to be clear what we're talking about.
 
Ah, cool :)
Using only Scala? Or more languages/technologies?
 
My part is all Scala, but most of the server side stuff is Java, the data processing (image calibration) stuff is python, the user side of MAST is something else, but I'm not entirely sure what - maybe some Microsoft techology.
They tend to let the head of each project choose the technolgy(ies) used, which results in a very mixed bag.
 
When it works I guess that's a good choice ^^
How does Scala compare to Java on performance? I fiddled around with Groovy a while ago but honestly the performance is just bad
 
1:45 PM
-2
Q: Divide and conquer

DiamondI'm starting to learn algorithms, so I need help to solve or hints to solve matrix using divide and conquer to get index of column that all contain 'y' in O less than O(n^2). Like this: NNNNNYNNN YNNNNYNNY YYNNYYNYY NYNYYYNNN Output should be : 5

0
Q: Compress an array of strings in Android

JulioI'm compressing an array of strings in an Android app. Is there something you would suggest? public static String compressArray(String[] data){ String jsonData = Arrays.toString(data); try { String compressedData = compressString(jsonData); int compressedLength = compres...

 
@skiwi Scala seems to be pretty close to regular Java for the most part. Smart choices are sometimes necessary with collection choice as performance can vary based on use - but that's true for most languages.
Scala is almost 100% Java compatible, so you can use Java libraries if you want.
The only incompatibility I've ever seen was easy enough to work around.
 
Hmm okay, as far as I know Groovy has quite a lot of dynamic features, and it uses some terrible mechanism to select which method to take on runtime, costing a lot of performance
 
2:03 PM
Nice try on parenting, but there can be legitimate reasons for ignoring warnings you may not realize. Why do people on SO always have such an attitude? It is perfectly valid technical question with perfectly valid exact answer, this is not code review or kindergarten. Btw. you also forgot to mention that one should always write tests, choose descriptive variable names, ... — Steves 9 secs ago
 
@Duga Smells like not constructive
 
2:20 PM
0
Q: Is "Callback hell" a professional term?

Teleporting GoatI'm writing some code for professional purposes, and I'm tempted to refer to "callback hell" somewhere in the comments. Will this be seen as professional for the code review ? My code will possibly be reviewed by people I'm not used to work with, so I don't know how they feel about it.

 
Kaz
@CaptainObvious Very Off-Topic
 
2:42 PM
What you are asking is more of a code review, hence this question should be asked on Code Review instead of stackoverflow. — dejavu_cmd_delt 5 secs ago
@dejavu_cmd_delt The code in the question does not work as intended. And so if it were asked on Code Review I vote to close it. Please check our help centre on what topics you can ask about. — Peilonrayz 39 secs ago
 
3:01 PM
1
Q: Hackerrank Sparse Arrays Solution in Java

Andy TeeI've just solved this problem and I hope you guys give me any feedbacks to make my code be better. Thanks a lot! Problem: There are strings. Each string's length is no more than characters. There are also queries. For each query, you are given a string, and you need to find out how many ti...

 
3:12 PM
You could post this question in codereview.stackexchange.com. — Zakaria Acharki 53 secs ago
 
0
Q: Is there a more elegant way of doing this in python?

Abhijeet RastogiBasically, if the function parameter is None, I ignore it, else I concatenate all arguments like arg1:arg1_value AND arg2:arg2_value AND arg4:arg4_value considering arg3==None when the function got called. def _get_query_string_for_get_config(self, host, app_name, instance, config_source, config...

 
3:58 PM
1
Q: Automatic IEqualityComparer<T>

t3chb0tThere are APIs like the Except extension that require the IEqualityComparer<T> to work. I find it's too much work for such a simple task to implement an interface so I thought why not automate it. I implemented this interface in a reusable fashion so that I can use it with any value and any nu...

 
:/ My compiler code is so far gone that I don't know how to rescue it anymore
It's not too hard to get it into working state, but not exactly something I'll be proud of
 
4:14 PM
@Trojan404 I hate to bother you but I have a couple PHP questions.
 
4:24 PM
Java generics... Ugh
Ah no, actually me being an idiot was the issue
 
0
Q: An attempt at a cookie wrapper

AndrewThis an attempt of a cookie wrapper of sorts. It has no real purpose nor do I encourage anybody to every use it in a production environment. It was made for fun, at best for practice. The purpose is to make working with cookies somewhat easier. It's built from several parts: I've could build a ...

 
Turns out Java type inference does not work as expected when you use an incorrect return type
2
 
This sorta seems like a codereview.stackexchange.com question. This also has been asked before on that site as well. Check out codereview.stackexchange.com/questions/75023/…TehTris 25 secs ago
 
@Mast I know SAS as Serial Attached SCSI.
 
4:40 PM
possible answer invalidation by CAD97 on question by vtor: codereview.stackexchange.com/posts/147673/revisions
@TehTris a Code Review question contains real, actual, working code ready to be peer reviewed. This would be off-topic on CR. — Mat's Mug 18 secs ago
 
heya =)
 
hey @N3buchadnezzar
 
@skiwi might give me some advice on a pretty simple python problem? Trying to map the letters in the alphabet to the prime numbers.
I made a dict such that prime_dict['a'] = 2, 'prime_dict['b'] = 3' and so forth
Problem is I absolutely have to make this work with some special characters ('æ', 'ø', and 'å'). Python refuses to make this work :p
 
Python doesn't support unicode?
 
@N3buchadnezzar What error do you get?
 
4:46 PM
@Peilonrayz Did you used to be Joe Wallis?
 
@Hosch250 Yeah, :)
 
Thought so.
 
@Hosch250 IIRC Python3 uses Unicode by default
 
I thought it supported Unicode too. It doesn't make sense that those characters don't work.
 
Here is a quick paste pastebin.com/7Z8R0UKy
 
4:47 PM
@N3buchadnezzar You need to get hold of the underlying numerical value of the character in the specific encoding you are working with
@Peilonrayz I knew it... Something was up with you, you were not new yet seemed to be new :P
 
" KeyError: '\xc3' " is the error I am getting
 
0
Q: Dynamic Animation Renderer

SlvrfnThis program is intended to speed up the load times of some animations i am currently rendering on a mobile device. Currently I am creating animations frame-by-frame and adding them to an AnimationDrawable or some other animation object(i am using xamarin ). Once this is finished rendering, (if i...

 
@skiwi Means I really need to stop being a lurker, ;P
 
@skiwi scratches head Even 'ord('ø')' fails :p
 
Gahh, it works in Python 3... Try using u""
 
4:50 PM
I guess I can switch over and test
 
print(PRIME_CHAR['ø'])
That works...
 
'from future import unicode_literals'
^ That worked =)
 
huh, lemme try that
from future import paycheck
5
nope
 
Huh, it worked here. Said: "Recieved Mat's next paycheck".
3
 
:O
monking!
 
4:55 PM
@Mat'sMug I know why that didn't work.
 
the single quote made it a comment?
 
That is a runtime error because it is an unclosed string literal. String literals are treated as comments in Python, anyway.
 
Megh
    @Test
    public void testWrite() throws Exception {
        Path file = Paths.get(getClass().getClassLoader().getResource("hello-world.bf").toURI());
        SourceFile sourceFile = new SourceFile(file);
        LexicalAnalyzer lexicalAnalyzer = new LexicalAnalyzer(sourceFile);
        SyntaxAnalyzer syntaxAnalyzer = new SyntaxAnalyzer();
        IntermediateCodeGenerator intermediateCodeGenerator = new IntermediateCodeGenerator();
        BFOptions bfOptions = new BFOptions.Builder().memoryCellAmount(30000).build();
I'm not particularly happy with this code
 
@Mat'sMug It isn't VBE.
 
Even SE doesn't know how to format my code anymore
 
4:56 PM
"UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 3: ordinal not in range(128)"
 
> java.lang.IllegalStateException: Unsupported expression while resolving value: Value
Thanks?
 
*scratches head again.
 
@N3buchadnezzar Unicode... ascii...? Why would it mix that
 
I dont know. I am starting to dislike my snake, it's like it's speaking a foreign language or tounge..
 
try sssssssspeaking ssssssssssweet parssssssssssseltongue to it
 
5:01 PM
Who'd want to do that?
 
0
Q: Trying to make a java adventure text game to learn java. Am i doing it right?

Sam HeadI'm making a text based java game to help me learn java. I would like to know if I am doing things ok and if there is a better way to do the things I'm doing thanks. I have two separate files; adventure.java package sam; import java.util.Scanner; public class Adventure extends TheGame{ public...

 
sssssssssomeone with ssssssssssssome sssssssssssslight disssssssssssssorder I guessssssssss
 
Don't lower yourself to the snake's level--you need to dominate it.
 
Sems like someone got their s key stuck.
 
right. I'm sssssssstopping it. now.
 
5:03 PM
I was offered an apple from a snake a long time ago, did not think much of it before now
 
I thought you were the one who ate grass.
And were the head of gold.
 
Only sour grass (Is it called that in english as well?)
 
Sounds worse than normal grass.
Digitaria insularis is a species of grass commonly known as sourgrass. It is native to Central and South America and the southern parts of the United States and has been introduced into other parts of the world. It was first described by the German botanist Friedrich Karl Georg Fedde in 1904. == Description == Digitaria insularis is a tufted perennial with very short, swollen rhizomes. The stems reach a height of 80–130 cm and are erect, branched from the lower and middle nodes, swollen bases, with woolly bracts, glabrous internodes and nodes. Sheaths papillose - pilose in their majority, ligule...
 
@N3buchadnezzar I think I got the answer, I think Python is messing up your encoding. Take print(list('zæøå'), list('z\xe6\xf8\xe5')), do it in both IDLE and your program and you should get different results. I get (['z', '\xc3', '\xa6', '\xc3', '\xb8', '\xc3', '\xa5'], ['z', '\xe6', '\xf8', '\xe5']) and (['z', '\xe6', '\xf8', '\xe5'], ['z', '\xe6', '\xf8', '\xe5']), to fix this use ALPHABET = list('abcdefghijklmnopqrstuvwxyz\xb8\xc3\xa5')
rather than ALPHABET = list('abcdefghijklmnopqrstuvwxyzæøå')
 
@skiwi isn't the not working as expected actually.... expected?
3
 
5:16 PM
@SimonForsberg Well, you do have a point there
So my compiler wrote some Assembly code!
It doesn't actually compile to an executable yet, but first testing this code
Wtf?
It works
> $ compiled-hello-world.exe
Hello World!
 
I thought you said it wasn't an executable.
 
@Hosch250 I compiled it by hand by invoking NASM and GCC by hand
Next step is that my compiler invokes those executables
 
Next you'll be adding features to BF.
Make it a little more juiced up.
 
Like adding exec?
 
No, like adding - to the featured characters.
I'm sure you can find something for it to do.
 
5:23 PM
You know - already decrements the current memory cell, right? ^^
 
Oh, does it?
OK, you can add |
And &.
Maybe you can make a simple conditional structure.
 
0
Q: Parsing a text file with a custom hierachial data structure using Python

bluprince13I have a text file with a certain data structure that looks like this. I have intended it to make the structure clearer, but in reality they are all aligned, and there are no bullet points. Ellipses indicate the repetition of a pattern. variableA 3 Type1 variableB 1 x y 1 5 2 10 3 15 ....

 
@Hosch250 Don't give him any ideas...
give them to me instead
2
 
Report has it that execution by freezing is a "cool and unusual punishment" (forgive the pun).
 
I think that you are giving us puns as a pun-ishment
 
5:38 PM
Puns are the best.
I want to be a mod for the sole reason of seeing rolfl's puns.
 
@Peilonrayz I had to do 'ALPHABET = list('abcdefghijklmnopqrstuvwxyz\xb3\xb6\xa5\xb8\xc3\xa6\xa9\xef\xbb\xbf')' to make it work
No idea why it works, but it works.
 
@Hosch250 @SimonForsberg @skiwi Add { and } for conditions. { = "if current memory is non-zero, then execute block until appropriate }"
Similarly to a [ and ], but instead of looping it only does it once.
 
oh gosh, do I smell an upcoming in the making?
@EBrown "it only does it once" and "execute block until appropriate" seem to contradict.. no?
 
I love me some good old fashion once in a while.
 
@Mat'sMug Execute it until the appropriate } symbol.
 
5:50 PM
ah
 
So if you had nested {}, then they would need to know which one was theirs.
 
Opinions on this question?
-6
Q: Linux performance drawback when networking from two pthreads

Eliad Cohenmy server receives requests in one thread and responds in another. I am using thread pools of pthread-s for both receiving and sending. The performance is not that bad, however... When I am doing the same algorithm in one thread only(MULTITHREAD not defined) so that both recvs and sends are in t...

 
Not that it would matter for executing it, because it should just begin execution and continue until there's a reason not to.
It's when that block needs to be skipped that it needs to know.
 
It was rightfully closed, and honestly, I think it's still a crap question. But it might just be on-topic now.
 
Then, you can add ^ for function definition, and & for calling it somehow.
 
5:53 PM
& and | can be for And and Or.
Maybe @ could be used to call the function?
Or ! or # or $.
Just as long as it doesn't allow any alphanumeric character.
 
@EBrown @Hosch250 If you add more advanced features to brainfuck, then you will be missing out on all the fun!
 
We'll be having more fun.
 
Got it: ! defines that the next bit is a function, then you can put any ASCII next as the function ID, excepting ~, which defines the start of the code for the function, then ^ ends it.
 
Is suffering fun?
 
BF is too simple to read as it is. There needs to be more characters.
Says the guy who doesn't know BF
 
5:56 PM
@EBrown It sounds to me like you are inventing Haskell...
 
While suffering == True do brainfuck
 
So, !>>>~+++^ would define a function ">>>" which executes three increment operations.
Then, %>>> would call the ">>>" function.
Bam. Functions in Brainfuck.
And, they're completely non-sensical.
Which is exactly what Brainfuck expects.
 
What happens if I have functions named >>> and >>>>?
 
Implementation detail.
Just like the rest of BF. LOL
 
Then I call %>>>>. Is that a call to >>>> or a call to >>> with a > command immediately afterward?
 
5:58 PM
@EBrown You should look up Procedural Brainfuck
 
It would be simpler if we called with %identifier~ too.
 
@Hosch250 Well, use %>>>% then, wrap the entire function call in percents.
 
Or something.
 
@EBrown You realize that will break compatibility with other Brainfuck interpreters?
 
@SimonForsberg BF++ doesn't need to be backward compatible...
 
6:00 PM
@SimonForsberg Well yeah, but that's very often what happens when you add language features.
 
C# 6 can't be compiled by C# 5...
 
I've really done my best in the advanced features I support in Brainduck to actually be compatible with pure BF
 
Plus, interpreters are supposed to be designed so that they ignore invalid characters, it won't break the compilation process, it will just have completely unexpected output.
 
@EBrown Polyglots!
 
use new tokens; older BF interpreters will just treat them as comments. it won't run as intended, but at least it won't parse in a misleading way.
 
6:07 PM
@Mat'sMug You have comments in your BF interpreter? I just throw unrecognized stuff away
And I wonder what features we can remove from BF whilst still allowing for the same programs... Removing either of + or - and either of > and < should still work in wrapmode, right?
 
my parse trees round-trip to the exact same source as the input
the interpreter ignores comments
 
Crap, now I need to do it all over again
Thanks, Obama @Mat'sMug
 
lol
 
List<String> code = targetCodeWriter.write(targetCodeGenerator.generateAST(intermediateCodeGenerator.generateAST(syntaxAnalyzer.getAST(lexicalAnalyzer.getTokens()))))
    .collect(Collectors.toList());
Is someone complaining about my lines being too long?
 
♪
 
6:11 PM
@Mat'sMug +++++++. gives real music
 
I think your subconscious is
how about ^{body} to push a set of instructions to the current pointer value, and then % to call whatever set of instructions is at the current pointer value?
 
@Mat'sMug Why not use ^[body], so that interpreters without that extension will handle it fine?
 
> Added TargetCodeWriter to write target code, also added DefineLabelExpression to wrap a LabelExpression when defining a label.
I may need to work on my commit messages
 
@EBrown that still won't run as it should
 
Big deal.
 
6:16 PM
@Mat'sMug No, but it will not cause side-effects with the body statement.
 
It can be like Python 2/3.
 
hmm problem is that you need to handle what happens when you overwrite a cell that contains a function handle
 
@Mat'sMug Segfault
 
or you push it to some "instruction memory" which is some kind of "secondary tape"
 
The secondary tape is probably more reasonable.
 
6:18 PM
We could create Brainfuck3D
Actually Brainfuck2D is already a step up
 
take that, PPCG!
 
Have a memory array of memory arrays, > and < work as expected, and then you have ^ and (inverse ^)
 
v?
 
That could work
 
We could make 101 different variants.
 
6:20 PM
a whole new level of golfing BF is about to emerge
 
@Mast (Or any python expert) You around?
 
What would the uses be of a 3D grid for BF? Or maybe even a 4D grid?
(BF program changes over time, wat?)
 
how do you address movement on the 2nd tape?
 
@EBrown shoot
 
e.g. ^{+++++++.} pushes where, and how to retrieve it?
 
6:21 PM
@Trojan404 How difficult in PHP is it to setup a connection through the server to two direct peers?
 
@Mat'sMug There is no second tape, it's a memory grid
 
@EBrown what do you mean by that. are you trying to socket script?
 
@Mat'sMug Well, you could add the ^ and v instructions, then use those for functions tape.
 
please call it
 
@EBrown Somewhat.
 
6:22 PM
@Trojan404 Well I want to setup an audio connection between two users and stream the audio through the PHP server.
 
Why not use a Python server to keep it all in the same language?
 
@Mat'sMug Nah, .
@Mast I don't have any languages yet.
I am trying to determine what's more viable: PHP, Python or ASP.NET.
I'm trying to write this one in PHP or Python, just for fun.
 
You mean, you don't have other options available?
 
I could use anything.
 
@EBrown i don't of a whole of experience in streaming data, however, it seems viable
 
6:24 PM
This is going to be mobile apps for Windows, iOS and Android as well, so I already need C#, Swift and Java.
 
very complex tho
 
If you're prepared to learn Python, I see no reason to use PHP.
 
i mean just look at this SO post
1
Q: PHP file-streaming from client over the server to client

martinhodlerQuestion Is it possible to stream an uploading file over PHP, so that an other client can download it while the first one is uploading? I don't want to save the file permanently on the server. How can I do that? Why PHP? The downloading client shouldn't need an additional software to get the ...

 
So I'd prefer to use a language that's not one of those three for the backend.
 
If you're prepared to learn Python, I see no reason to use PHP.
4
 
6:25 PM
^^
 
Well PHP7 is about, so I want to see if I can't do something with it.
 
Have you thought about using Assembly?
 
maybe, but php7 is still relatively new so I doubt a whole lot of people have gotten into it like this yet
so not a lot of articles about it yet
 
 
Path assemblyFile = workingDirectory.resolve(programName + ".asm");
Files.write(assemblyFile, (Iterable<String>)targetCode::iterator, StandardCharsets.UTF_8, StandardOpenOption.CREATE_NEW, StandardOpenOption.TRUNCATE_EXISTING);
I don't see anything that could go wrong
 
6:28 PM
@EBrown Anything but PHP. Socket programming in PHP is nasty stuff. Do you want it multithreaded?
 
@EBrown you could take a look at this guys implementation
2
Q: php socket data streaming server (mp3)

MusherI'm trying make a php server for voice chat using socket. i can send to client a plain data such as html etc.. but i want to send voice data and i'm firstly testing it with a mp3 file. my server code: <?php error_reporting(0); set_time_limit(0); define('IP', '192.168.56.1'); def...

 
Python has decent multi-process and multi-threading support.
 
his is still buggy but its a start
@SimonForsberg exactly, php is mostly used for webpages and simplicity. anything involving complex systems is a nightmare
and networks is the definition of complex systems 9 times out of 10
 
@Mat'sMug and @EBrown, about this Brainfuck++ madness: Never again are you allowed to say that I am over-thinking things.
3
 
I've never built a streaming server, but I HTTP(S) servers in Python went quite well.
@SimonForsberg Blame @skiwi
 
6:30 PM
@Trojan404 Yup. Wrote a PHP Multiplayer socket server 8 years ago. Nasty stuff. Rewrote it in Java later on.
 
@SimonForsberg wait, at some point in the future, @skiwi will be posting a question on CR
 
@SimonForsberg java socket programming is so clean
but php is a great language to use to start and get an understanding of what your doing
 
@Trojan404 Luckily for me, I know what I am doing.
 
knowing and understanding are two different things ;)
 
@Mat'sMug No no no
 
6:33 PM
@SimonForsberg Possibly?
 
@EBrown Last time I checked, PHP had huge problems spelling multgihthereaded
5
 
php doesn't touch multithreading atm
 
I want to stream an audio call from one client to another.
 
I believe you'd have to use some PHP extension, like Zend or some jibberish
 
6:34 PM
@Mast Oh wow, that looks nice! :O
 
Now, since there's no server state involved (it's literally just sending audio from A to B), I would expect that each session could open it's own connection to the server and stream through it.
 
@EBrown Should probably be quite easy in Python
 
its simplish in php if you were just uploading an audio file then downloading it, but uploading and downloading at the same time is too complex for php's little mind
 
And I want full bidirectional communication.
 
@EBrown DO NOT USE PHP. YOU HAVE BEEN WARNED.
4
 
6:35 PM
technically what i just described is bidirectional, it's just delayed by how long to upload, how long to download, and how long to respond
XD
 
@Peilonrayz Yup.
I was about to integrate it into one of my projects, but the project is a tad on-hold.
 
PHP users will be violated
 
Now I would think the server could do one of two things: transfer the data between clients through server; serve as a third-party to negotiate a connection between clients and the server.
 
servers can, php makes it hell to do that
php is about making single client connections super super super easy
 
@Mast @SimonForsberg How hard would this be in Python?
 
6:37 PM
probably one of the cleanest website languages i know
beyond that, it struggles
 
To have a Python endpoint where clients could both connect to, and talk to each other through?
 
@EBrown I have absolutely no idea. I have limited experience with Python. But I expect that Python has some UDP streaming capabilities which would be a big step in the right direction
 
btw, what do you need this for, @EBrown?
 
@SimonForsberg I'm trying to make a small app that allows encrypted audio calls between devices.
 
6:39 PM
@Mast Ooh coroutines, I should probably not touch it... I've always abused them...
 
@EBrown Like WhatsApp but without chat?
 
@SimonForsberg Sorta, a lot less open than that though.
You basically have no PII on it..
You just have a user id (number) and a password.
That's the only thing the server knows.
 
@EBrown Can't be too hard, really. But it's web servers, so be prepared to learn web servers.
Once you understand them, the Python part won't be your problem.
 
@EBrown Like WhatsApp but for the dark web?
 
Then, you can login, and call another user id or message them.
 
6:40 PM
@SimonForsberg ^
 
@SimonForsberg Yes, a much darker, darker version.
 
hence
 
@SimonForsberg Yes, they have.
 
You have to manually sync encryption keys between the clients.
 
@Mat'sMug PHP isn't dark, I'm just evil
3
 
6:40 PM
So if you're user 1, calling user 2, user 2 has to know your encryption key.
 
I may have some open-source code doing exactly that laying around if anyone is interested...
 
@EBrown oh wow, this is old school encryption lul
 
Single Stream UDP thingy.
 
And I want the ability to change encryption keys mid-stream.
So you can (on each client) setup a hotkey for each encryption key.
Then each client can, on mutual decision, change keys during the call.
To help further secure the session.
The only reason basic login info is stored on the server is so that there's only one user with a specific ID.
 
This question might be better suited for codereview.stackexchange.com. — blcook 28 secs ago
 
6:44 PM
@EBrown You could handle that similarly to Battle.net with the 4-digit identifier behind a name
 
@skiwi I'm just going to allow free-form usernames, and then you just have to know the other person's username.
 
@SimonForsberg @EBrown I've written this a long time ago. Don't ask me why it does what it does and keep in mind this is pretty much the first professional Python I wrote. I didn't know CR back then. Python 2.7, use at your own risk.
Pastebin, up for a week.
Not all functions are listed, it's for a general idea. Free to use though.
 
@Trojan404 I'd fix "I'm just evil" to "it's just evil", but...
;-)
> User name 'EBrown' is already taken. Would you like to use 'EBrown42' instead?
 
0
Q: Convert integer from a file to Roman Numerals

papasmurfI got sent a challenge from a friend; You are given a file that contains numbers, one number per line. Convert the numbers from the file into roman numerals. Test input: 45 65 23 98 123 7754 Expected Output: XLV LXV XXIII XCVIII CXXIII MMMMMMMDCCLIV I think I've succeeded in doing this s...

 
@Mat'sMug I can't fix the truth. Evil is evil, regardless of how you interpret me :)
 
6:53 PM
whatever you do just don't "Password 'P@$$w0rd' is already taken. please enter another password"
 
Could be worse, i'm working on my thesis right now and my settings are admin/pass1234
XD
 
subject: security in IT?
 
Subject: Please change the super secret password from RubberDuck3RAwe3ome
better yet
Subject: Please change the super secret password `to` RubberDuck3RAwe3ome
 
How terrible of an idea does it sound to follow symlinks while deleting a directory?
 
better than following a 2002 Kia I suppose
 
6:58 PM
What if an user (assume on Linux) symlinked one of their subdirectories to /?
 
@skiwi they'll quickly learn not to do that again?
4
 
00:00 - 19:0019:00 - 00:00

« first day (1297 days earlier)      last day (2719 days later) »