I am looking for boolean operations in Io. I need to write something like this: if (a == b) or (c == d) .... Now I have created such code: divided_by :=...
13040
gatesphere
suspended_chord
Dec 1, 2011 9:32 pm
Io> a := 4 ==> 4 Io> if((a % 3 == 0) or (a % 5 == 0), writeln("true"), writeln("false")) false ==> nil Io> a = 3 ==> 3 Io> if((a % 3 == 0) or (a % 5 == 0),...
13041
Jeremy Tregunna
jeremy.tregunna@...
Dec 1, 2011 9:35 pm
Try if((a == b) or c == d) Sent from my iPhone...
13042
Mildred Ki'Lya
mildred593@...
Dec 6, 2011 7:02 pm
Hi, I'd like to start using dBus with Io to get started with a real application. But, there is no dBus binding. I thought I would re-implement dBus in pure Io....
13043
gatesphere
suspended_chord
Dec 6, 2011 7:41 pm
To regenerate the documentation, run this from the Io root directory (of the git repo, for example): $ mkdir html $ ./tools/io/docs2html.io html/ Newly...
13044
Steve Dekorte
stevedekorte
Dec 6, 2011 8:39 pm
... Hi Mildred, Did you see this? http://www.iolanguage.com/scm/io/docs/reference/index.html#/Networking/Socket/Socket...
13045
Mildred Ki'Lya
mildred593@...
Dec 8, 2011 8:21 am
... That's exactly the documentation I call outdated. I'm looking for documentation of changes introduced in commit 2a4e671a23be69115dec8c6157e089710303c49d....
13046
Mildred Ki'Lya
mildred593@...
Dec 8, 2011 8:23 am
... Thank you. ... I don't see how that would help me ... I don't see how it could help me connect with a dBus socket.. ... -- Mildred Ki'Lya http://mildred.fr...
13047
Steve Dekorte
stevedekorte
Dec 8, 2011 8:32 am
... Ah, it wasn't clear if you had found it from your description. Thanks for pointing this out - I've updated the docs on the site. - Steve...
13048
Mildred Ki'Lya
mildred593@...
Dec 8, 2011 11:30 am
Hi, The unix socket implementation is here: addons/Socket/source/IoUnixPath.c<https://github.com/stevedekorte/io/blob/master/addons/Socket/source/IoUnixPath.c>...
13049
Mildred Ki'Lya
mildred593@...
Dec 8, 2011 1:24 pm
... Look at https://github.com/stevedekorte/io/pull/173...
13050
Mildred Ki'Lya
mildred593@...
Dec 8, 2011 2:43 pm
Hi, I have a string in the forme given by String asHex. That is a collection of bytes, encoded using two hexadecimal characters, all concatenated together. i'm...
13051
Jeremy Tregunna
jeremy.tregunna@...
Dec 8, 2011 2:43 pm
I want to propose a change in direction for the standard library foreach(), select(), and friends methods. I'll supply code, don't worry about that. Right now,...
13052
Mildred Ki'Lya
mildred593@...
Dec 8, 2011 3:47 pm
Hi, I started writing a DBus client library (you can find it on github). This is also my first project in Io, so I need to grasp a few things first. I just...
13053
Steve Dekorte
stevedekorte
Dec 8, 2011 6:34 pm
Mildred, Thanks - I've pulled your patch....
13054
gatesphere
suspended_chord
Dec 8, 2011 6:43 pm
Within your DBus class, you should make a slot called Client, which loads your Client.io. DBus := Object clone do( // ... Client := doFile("Client.io") ) ......
13055
Steve Dekorte
stevedekorte
Dec 8, 2011 6:56 pm
... IIRC, aSequence fromBase(16) should work....
13056
Steve Dekorte
stevedekorte
Dec 8, 2011 7:00 pm
... In your Client.io file, instead of: Client := Object clone do( ... ) try doing: DBus Client := Object clone do( ... ) Or to specify the exact location, you...
13057
Mildred Ki'Lya
mildred593@...
Dec 9, 2011 8:45 am
... Thank you. I now have: Sequence fromHex := method( res := Sequence clone; for(i, 1, self size, 2, res append(self exSlice(i-1, i+1) fromBase(16)) ); res ) ...
13058
Mildred Ki'Lya
mildred593@...
Dec 9, 2011 8:54 am
... Thank you, it does work. With the exception that I have to use doRelativeFile() instead of doFile(). There is a slight problem though, if I use the DBus...
13059
Mildred Ki'Lya
mildred593@...
Dec 9, 2011 8:56 am
... I tried that, but then, in file toto.io. If I execute "DBus Client", how would the importer knows that this prototype is to be found in Client.io? Should I...
13060
Steve Dekorte
stevedekorte
Dec 9, 2011 6:12 pm
... It will just look in the Importer's search paths. If you want to ensure it's already loaded, you can add some doFile()s to DBus....
13061
Jeremy Tregunna
jeremy.tregunna@...
Dec 9, 2011 10:14 pm
So... no input? Should I assume that this means there's no objection to this, or either implementation strategy? Regards, Jeremy Tregunna...
13062
Steve Dekorte
stevedekorte
Dec 9, 2011 10:30 pm
Can you do a test to determine what the performance costs are?...
13063
Jeremy Tregunna
jeremy.tregunna@...
Dec 9, 2011 10:47 pm
A quick test, code below, results first: Normal foreach (the way we implement it now): 0.045998, 0.042344, 0.04463 With a single throwaway context: 0.041687,...
13064
edwakev
Dec 9, 2011 10:54 pm
Is there any difference between #1 and #2 from a user's point of view or is this strictly a question of implementation? i.e. it looks like #1 basically clears...
13065
Jeremy Tregunna
jeremy.tregunna@...
Dec 9, 2011 10:58 pm
From all three versions, there's no difference from a user point of view. It doesn't change existing code, except in the case where they depend on values...
13066
Steve Dekorte
stevedekorte
Dec 9, 2011 11:02 pm
To be fair, we should compare it to the C implementation of foreach, right? I get: 0.000341 for Date secondsToRun(lst foreach(1000000)) println 0.019947 for...
13067
Jeremy Tregunna
jeremy.tregunna@...
Dec 9, 2011 11:16 pm
If I implemented those methods in C to compare, then yes we should. Since I reproduced foreach, I think that was a fair comparison. I didn't feel like having...
13068
Jeremy Tregunna
jeremy.tregunna@...
Dec 10, 2011 12:22 am
Reposting code with the 3 arg values. Note, that "foreachNormal" is meant to replace List foreach to even the playing field. Implement all methods in Io. I'm...