« first day (283 days earlier)      last day (3293 days later) » 

12:00 AM
Computer is fixed now. And weather has cleared up...
Time to... write documentation!
 
RELOAD!
[Cardshifter/Cardshifter] 1 issue comment.
[Cardshifter/cardshifter.github.io] 2 commits. 1 opened issue. 2 closed issues. 6 issue comments.
 
ahahaha I'm always surprised by such joy of writing documentation
2
 
[retailcoder/Rubberduck] 4 commits. 1 opened issue. 1 closed issue. 7 issue comments.
[Unihedro/JavaBot] 1 opened issue. 1 issue comment.
[Zomis/Battleship] 9 commits.
[Zomis/Server] 13 commits.
 
@Marc-Andre Well, I can't write code very good, so writing documentation in plain human language fits me well ;)
 
@Phrancis for Cardshifter?
 
12:02 AM
That's what I had in mind, yes
 
@Phrancis Well you can't for the moment :P I'm sure you'll get better ;)
 
Fix the things you've commented on, then maybe some more JSDoc
 
ah, right!
I forgot that you hadn't fixed what I had commented on
 
Yeah last few days have been a bit hectic, not in a bad way, but been quite busy
 
> I think it could potentially improve the moddability significantly.

Groovy can be used to create some really nice DSL's (Domain Specific Languages), for example, it could theoretically be possible to write the following:

When this creature deals damage to an opponent, you draw a card

And actually have Groovy execute that **as code**
 
12:09 AM
@Phrancis ^^
 
@SimonAndréForsberg SORCERY!
3
 
@Phrancis GROOVY!
3
 
That's like ducky was saying about ANTLR, except, Groovy might not be as complicated?
 
I'm doing my first development on my new rails app, and well every is broken :P Nothing like breaking things to learn !
 
@Phrancis groovy is definitely more feasible than ANTLR. Additionally, Groovy is much more extensible, maintainable and understandable than ANTLR.
I'm not sure yet how extensible, moddable and understandable the implementation of the DSL would be in Groovy, but I would like to look into it more.
 
12:19 AM
ANTLR looked like a nightmare to get to work (shhh, don't tell mug and ducky)
 
in VBA, 8 secs ago, by Simon André Forsberg
in TCG Creation, 9 mins ago, by Phrancis
ANTLR looked like a nightmare to get to work (shhh, don't tell mug and ducky)
sorry :)
 
in VBA, 45 secs ago, by Phrancis
lol thanks @Simon ;p
 
 
8 hours later…
8:47 AM
hey
@SimonAndréForsberg Do you think it's possible to define a full programming language in that, or is that too much?
(An existing language)
For our uni project we possibly still need to make an AST for a programming language
One thought is using some kind of AST tool for every language, but they are most likely not written in Python, even more likely all written in a different language
Other thought could be using something like ANTLR to define the syntax ourselves
 
 
1 hour later…
10:20 AM
@skiwi You can't implement any syntax possible, but if it's similar to how Groovy works already, then maybe but likely not.
For an AST, if you have stuff in Reverse Polish Notation already, then transforming that to an AST is possible
 
11:47 AM
Was gone for a while
@SimonAndréForsberg I really don't know enough about AST's yet
 
@skiwi well, according to wikipedia you should be able to use Shunting-yard algorithm to get an AST
In computer science, the shunting-yard algorithm is a method for parsing mathematical expressions specified in infix notation. It can be used to produce output in Reverse Polish notation (RPN) or as an abstract syntax tree (AST). The algorithm was invented by Edsger Dijkstra and named the "shunting yard" algorithm because its operation resembles that of a railroad shunting yard. Dijkstra first described the Shunting Yard Algorithm in the Mathematisch Centrum report MR 34/61. Like the evaluation of RPN, the shunting yard algorithm is stack-based. Infix expressions are the form of mathematical notation...
and the wikipedia page about AST really describes it very well
In computer science, an abstract syntax tree (AST), or just syntax tree, is a tree representation of the abstract syntactic structure of source code written in a programming language. Each node of the tree denotes a construct occurring in the source code. The syntax is "abstract" in not representing every detail appearing in the real syntax. For instance, grouping parentheses are implicit in the tree structure, and a syntactic construct like an if-condition-then expression may be denoted by means of a single node with three branches. This distinguishes abstract syntax trees from concrete syntax...
 
@SimonAndréForsberg Heh... okay, so it's just like a Calculator?
 
@skiwi not too different at least
 
So if I can build a calculator, I can build a programming language
Okay, that's maybe a bit too optimistic
 
@skiwi depends on the calculator.
 
11:55 AM
Motivation to look at your Groovy code is growing
I'm strugglign to use Mocha in combination with the Sinon library
That probably tells you nothing, and it would also have told me nothing if you asked me yesterday at this time
There's so many possible JS technologies
 
@skiwi it tells me that there's something called Mocha and a library called Sinon. That's about it though.
Apr 29 at 19:45, by Simon André Forsberg
@skiwi Well, we need to decide on and implement something.
 
@SimonAndréForsberg I think having a library called Sinon and knowing a person named Simon is confusing
 
agreed
at first I read Sinon as Simon
 
Right now the issue is simple, no clue how to solve it though
For some reason when running tests $ is a function, instead of an object, so also $.getJSON is not a function but undefined
 
12:11 PM
try $().getJSON
 
Neither works
When running it in browser it just works, but through Mocha testing framework it cannot resolve $.getJSON, it did inject something for $ though
 
try printing the value of the $ object/function to see what it is. Or use JSON.stringify($)
and find out where it comes from
then change it to make sure it has the right value
easy, right? :)
 
@SimonAndréForsberg That stringify might help
I did a normal log already,b ut that's without stringify
Well, JSON is appareantly just {}
Doesn't seem like I can use it in tests or something
That seems okay
but JSON.stringify($) returns undefined
 
Hey everyone!
 
12:27 PM
hey @Marc-Andre
 
hey @skiwi :D
 
Just realizing that I totally didn't realize something
4
 
12:45 PM
@Marc-Andre normally when i feel that way, i'm not as far away from working code as i think i am
 
I'm onto something
 
1:21 PM
@bazola And I was not :D ! Soon after I find a solution, but now I have more problems :D !
 
1:40 PM
Monking
 
hey @Phrancis!
 
Algorithms make my head spin.
Did not end up writing documentation last night, will make up for it today, since we are now full staff and not so busy :)
 
ArchLinux make my head spin.
 
@Marc-Andre I've spoken French all my life and just now realized how weird this character is: œ
 
1:56 PM
reminds me about the Swedish 'ö'
Or, speaking of strange characters, how about some cryllic ones? я ч ф ж й ц щ
 
Oh, we used the umlaut accent sometimes in French too
Cyrillic looks a lot like Greek to me?
 
parts of it may look similar
but it's not Greek
 
OK
 
@Phrancis I've spoken French all my life and I've never used œ always use oe ;)
 
I used the word "main-d'œuvre" pretty often and Outlook always auto-corrects oe to œ
Й
Cyrillic alphabets are exceedingly confusing :o
(at least to me ;)
 
2:11 PM
@Phrancis it was confusing for me also the first week when I learned it.
 
I'm actually surprised some of letters look uncannily similar, must be difficult to tell them apart from someone with a sloppy hand writing... У у Ц ц Ч ч Џ џ
 
the fun part is that even though some of them may look similar, some of them are pronounced entirely different :)
я и в у may look like R N B Y, but it's actually pronounced as "ya y/i v o"
 
Oh wow.
Well, I've seen code with identifiers in foreign languages before, but I can hardly imagine how difficult it would be to code like that
public static void main(String[] args) {
    String мойпеременной = "Привет Мир!";
    System.out.println(мойпеременной);
}
 
2:32 PM
30
A: Do people in non-English-speaking countries code in English?

ZzzC#, it really works (Cyrillic): [Flags] public enum Товары { Непонятно = 0, Книги = 1, Тетради = 2, Карандаши = 4, Всё = Книги | Тетради | Карандаши } .. Товары карандаши = Товары.Карандаши; There is fun (weird) in that Visual Studio allows it and someone is writing ...

 
Umlauts in French? wtf
 
They're pretty unfrequent
They are mostly used for Noël / Noëlle, which are both given name, and in the case of the masculine Noël, also the word for Christmas (go figure)
 
3:00 PM
@Phrancis you could like this : aidenet.eu/grammaire01d.htm
 
Yikes, didn't realize there were that many!
 
3:22 PM
[Cardshifter/Cardshifter] Zomis pushed commit 57477b3e to js-load: added toString of ServerQueryMessage
[Cardshifter/Cardshifter] Zomis pushed commit cb62890a to js-load: handling WebsocketNotConnected error, should fix #191
[Zomis/Server] Zomis pushed commit dab69b54 to master: fixed bug with Battleship moves only being reported if it was a hit
 
3:48 PM
> There's currently no indication whether or not it is your turn when playing
 
@Duga @Simon do you think the libGDX HTML5 version will work OK now then?
 
@Phrancis as soon as the server(s) are updated, yes.
either @bazola will have to pull the changes and do mvn package or I'll have to do mvn package and upload a new Server jar file
 
> When a client disconnects, it is still being shown as online
> Make the message sending between clients and server more flexible so that clients can choose what format they would like

- [ ] JSON
- [ ] Minimal byte serialization
- [ ] space-separated string array (already implemented, but not in a flexible way)
> The Server should have a collection of AIs that are always online and can be played at any time.

Perhaps also a possibility for clients to connect as AIs (to mark that they are allowed to be in multiple games at once, and that they are always available), in case someone wants to make a bot that supports the protocol
> When being invited by someone, it looks like you invited yourself.
> - Show username in addition to player index when game is over
- Add check that position has not already been played, to prevent the game from being stuck in an infinite loop. If a player clicks on a position that already has been played, disqualify player.
> Make it possible to construct a server dynamically, by extracting a core module, and make it possible to add different game implementations to that module.
 
The Cardshifter server is really a lot cleaner than this piece of s*** server.
 
4:13 PM
[Cardshifter/Cardshifter] build #942 for commit cb62890a on branch js-load passed
 
5:10 PM
@SimonAndréForsberg I'm guessing you couldn't just re-use the same server, eh?
 
@Phrancis both yes and no
 
5:28 PM
Makes sense, in a Simon kinda of way ;)
 
6:15 PM
@skiwi, look into Simon's Battleship repository to check out the Groovy code! And @Simon, fix that damn websocket bug!
 
@Duga I'll look into it once @SimonAndréForsberg fixes that bug!
 
3 hours ago, by Duga
[Cardshifter/Cardshifter] Zomis pushed commit cb62890a to js-load: handling WebsocketNotConnected error, should fix #191
 
@skiwi already fixed
 
6:30 PM
@SimonAndréForsberg @Duga disagrees :)
 
7:25 PM
@SimonAndréForsberg Any recommendations on where to start with your code?
And isn't a repository called Server oddly unspecific?
 
@skiwi BattleshipGUI.groovy
@skiwi okay, it could have been called "GameServer" perhaps.
 
Isn't it more like BS-Server?
 
@skiwi not when it is also intended to support Ultimate TTT at the same time.
 
@SimonAndréForsberg Oh ok
I may be tired, but I don't see the advantage of Groovy here
 
it's meant to be a flexible solution to many turn-based multiplayer games
 
7:32 PM
Scanned through quickly though
 
@skiwi oh, you're not even aware of half of it yet!
 
It looks exactly like Java, but the different syntax (missing semicolons etc.) make it hard to read
That's my first impression right now
 
for a start, it's a much more concise version of Java
you can add semicolons, if you want to
 
	private boolean canPlaceAtBoard(int x, int y) {
		for (int yy = y; yy < y + height; yy++) {
			for (int xx = x; xx < x + width; xx++) {
				if (!board.inRange(xx, yy)) {
					println "Board: $xx $yy is not in range"
					return false
				}
				if (board.ships[yy][xx]) {
					println "Board: $xx $yy contains a ship: ${board.ships[yy][xx]}"
					return false
				}
			}
		}
		return true
	}
The only advantage there is that you can print variables inline?
 
@skiwi it can do more than that, I just haven't used all the Groovy functionality yet.
but essentially, all programming languages can do the same things, you know that right? The question is just how it does them.
 
7:35 PM
I just don't see what's so special about it right now
Haven't read the link about DSLs yet though
It also may have partly to do with that you're interacting with the Swing API?
 
I don't get it @skiwi, a little while ago you complained about the verbosity about Java and saying that you wanted to create a "perfect" programming language, but you seem totally unimpressed by Groovy.
@skiwi the SwingBuilder features in Groovy are a lot better than if it would have been done through Java code.
 
@SimonAndréForsberg True, but somehow Groovy doesn't enlight me right now
One concern about your code, looking at it briefly; shouldn't the board be responsible for placing ships, rather than the ships themselves?
Does running Groovy on top of Java not lead to additional issues when interacting with standard libraries?
 
@skiwi As I said, I haven't cleaned it up yet. I am aware of that.
@skiwi No issues at all. Java libraries work like a charm so far.
 
7:52 PM
I may also be more aggressive against "yet another library/framework/language" today
One thing I am actually wondering @Simon is why you need to code "so much" to achieve a Battleship game
Such a question is perhaps closer to me thinking about 'perfect" languages
 
@skiwi a lot of the code in this case is because of the socket connection. and some of it is also because of it being a GUI
I really don't think it is "so much" though.
How many lines of code would you expect for a Battleship game?
 
I'm interested in solving it in a smaller way, not claiming it's possible though
The thing is that I can explain Battleship to you quite easily, and even add some visualization
You do need to call updates manually now, it seems?
 
what updates?
 
Model <-> GUI
 
again, what updates? when I click a button? when an enemy makes a move?
 
8:03 PM
It would seem "better" if you could only care about the model, and the language/framework would take care of updating the gui, given that you gave some instructions
@SimonAndréForsberg When a ship gets placed on the board for example
 
Groovy does take it one step closer than Java does it. Take a look at the code for entering my player name
 
def scan = new Scanner(System.in);
print "Enter your name: "
def name = scan.nextLine()
 
no no no
not that old piece of shit
 
lol
 
that's an obsolete console implementation
 
8:05 PM
Those bindings seem interesting
 
they are
I have not tested them completely so I don't know their full power. but even that little part there is really useful
 
I'm interested in creating Battleship on a web-server stack now
But I need to first find something I'm happy with
In principle React is good, and a REST API too
But for our university project it's creating headaches
What's the technology you used where you worked?
For the university project it's probably too late, but I'm trying to make something solid myself
 
@skiwi bah, you don't want to know...
 
@SimonAndréForsberg I actually do...
 
trust me, you don't.
really. it is that bad.
 
8:17 PM
Can't be giving more trouble than the problems I've been experiencing the past 2 days
 
for webdevelopment? this:
One word tag:
 
but also client-side technologies... right?
Not html embedded in php, right? right?
 
client-side: pure hand-written JS.
when I worked in Gothenburg for a short while, they used npm and some grunt scripts. but it still involved some PHP, and a lot of pure hand-written JS.
 
Oh okay, I thought you had a proper stack there
Right now my three pain points are 1) Working test tools, 2) Deploying on subdirectories (opposite to subdomains) and 3) Deploying on production
They all are very non-trivial tasks, where you don't really expect them to be
 
pfffft... I don't think they could even spell "proper stack". Maybe the ones in Gothenburg could, but the others? Heck, they barely even used git
 
8:23 PM
It's really frustrating if no technology "just works" and if tutorials are completely useless
Though I can imagine (as I've done in the past as well) that PHP + JS is not a very good solution either
Better translation: hell.
TTGTB now
My only hopes on getting unit testing to work is a Github issue ticket :|
 
8:38 PM
Night @skiwi
PHP... ouch
I can't believe at some point I wanted to learn PHP. Good thing everyone on CR talked me out of it ;)
 
 
2 hours later…
10:12 PM
@Phrancis We're always happy to help :)
How's the going?
 
TTQW
@Phrancis you're going to need this when you get home: pastebin.com/YJ7dpM3X
@SimonAndréForsberg Today's been stupid busy at work so I haven't even had time to think about that. Last couple of days have been rough for me... But I plan on working on it tonight
But, I've actually managed to find myself a little programming task for work, as you can see above
(doesn't do much now other than display the values ATM, but planning on doing some calculations and input validation)
 
@Phrancis absolutely no rush, was just wondering what the status was. I myself will probably not do any Cardshifter work within the coming weeks, I think.
@Phrancis that's nice. Learning how to write handy JavaScript like that is a very good skill to have!
Only one problem with it though: document.getElementById("input");
You should use document.getElementsByTagName("input") for that.
 
Oh, didn't even know that existed
TTGH, I'll catch you in a little bit
 
10:57 PM
And back
@SimonAndréForsberg What is the difference? I noticed document.getElementById appears to put stuff in an array
(which I would prefer it did not, rather just store the value in a regular variable)
 
Mozilla has a good documentation @Phrancis if you want more info
And finally found was was wrong with my code :D
 
True. I was working on an example from W3Schools, guess that explains it
 
11:10 PM
Yeah w3schools is not that great. Not that bad, just not the best option out there
 
It's hit & miss with W3S, I think their HTML, CSS and JS tutorials are good. The other stuff... eh
W3S is also where I started learning SQL, they have an interactive DB you can query which is pretty cool.
 
I would prefer working with the documentation at : developer.mozilla.org
 
Is Mozilla the party that maintains/created JS?
 
Mozilla -> Firefox
So yeah they do implement a JS interpreter for the browser
I think they know their stuff
 
11:26 PM
Evidently
 
So how things going at work ?
 
Meh, pretty sucky right now
The air conditioning season has picked up now, and we're very busy because our many HVAC clients are very busy. It's unfortunate that I'm the most senior person in our HVAC insurance/warranty team, because I have to do a lot of the heavy lifting as a consequence.
How are things going for you? :)
@Marc-Andre Do I need to fire up Tomcat to be able to run JS code in STS?
 
@Phrancis Good the project I'm working is leaving the stress part so I can at least take a breath at work
@Phrancis Well your JS should be executed in the browser, if the page is served by the tomcat then you need it. Maybe you could just run it inside sts but not sure
 
11:45 PM
rolfl vs. 200_success: 83 diff. Year: +788. Quarter: +631. Month: +252. Week: +276. Day: +70.
Loki Astari vs. Simon André Forsberg: 3745 diff. Year: -2021. Quarter: -722. Month: -339. Week: -29. Day: -89.
 

« first day (283 days earlier)      last day (3293 days later) »