Re: [Pharo-users] How should XMLHTMLParser handle strange HTML?

2020-04-03 Thread Michal Balda
Hello Peter, Those are called conditional comments. They come from MS Word which is used as the HTML rendering engine for MS Outlook. There is not much documentation available online specifically for MS Word but they were also implemented in older versions of MS Internet Explorer and used com

Re: [Pharo-users] [Stupid Benchmarks] C++ vs Pharo

2016-12-17 Thread Michal Balda
The conditions are unfair: the C++ version uses double, whereas the Pharo version uses Integers. Change the C++ version to use int and then report the results :-). Michal On 17.12.2016 13:16, Dimitris Chloupis wrote: So I was bored and decided to test how fast pharo is compared to C++. so

Re: [Pharo-users] Little challenges for a Saturday evening :): Pangram

2016-11-12 Thread Michal Balda
Hi, #isPangramIn: should probably use #asLowercase as well: 'The quick brown fox jumps over a lazy dog' isEnglishPangram "false -- now the $t is missing, there is only $T" Kicking things off, here are my solutions: isPangramAllSatisfyIn: alphabet "Just a small change to the original."

Re: [Pharo-users] [Seaside] [ANN] Zürich Smalltalk Meetup Nov 8th, 2016

2016-10-19 Thread Michal Balda
Hi, the short answer is: not yet. The back story is: We have been experimenting with GemStone and Tugrik at work. While Tugrik appears to work very well (even though it is new and not yet finished), I found the overall architecture (Tugrik+Mongo+Voyage) a bit complicated. Tugrik is meant to be

Re: [Pharo-users] Rename a file

2016-04-18 Thread Michal Balda
Hi, I think the problem is using 'aPath/cat.jpg' as a single string (= as a single component of the path). This: path1 := FileSystem root / 'a/b/c.txt'. is different to: path2 := FileSystem root / 'a' / 'b' / 'c.txt'. Compare the results when I ask for the parent directory: path1 p

Re: [Pharo-users] patterns for representing enumerations/constants

2016-03-23 Thread Michal Balda
If there are not so many options and if they do not programatically change, I would suggest creating a dedicated subclass for all of them: – BormParticipantOrganizationType – BormParticipantSystemType – BormParticipantPersonType All subclasses of BormParticipantType. And then use something lik

Re: [Pharo-users] The Pillar TextMate plugin can now preview Pillar files

2015-04-28 Thread Michal Balda
Hi, shouldn't the path start with /Ap*p*lications/ instead of /Aplications/? Michal On 28.4.2015 22:01, Ignacio Sniechowski wrote: > Luc, > Thanks to you for developing this! > Unfortunately I get this error now: > > Typeset and view: line 17: > /Aplications/Pharo4.0.app/Contents/MacOS/Pharo:

Re: [Pharo-users] partitions?

2015-04-28 Thread Michal Balda
Hi, this solution is not exactly beautiful, but it works: | input output | input := #(1 2 3). output := Array streamContents: [ :stream | 1 to: input size do: [ :take | input combinations: take atATimeDo: [

Re: [Pharo-users] Get OS uptime

2015-03-19 Thread Michal Balda
Hi, your solution does not work because files in /proc are virtual and have no size (their size will be reported as 0). FileStream>>contents sends #size to determine the length and that will return 0 for all files in /proc. So the solution is to use something that does not use #size, like: (F

Re: [Pharo-users] Running Pharo headless

2015-01-21 Thread Michal Balda
Hi all, is there any difference between -vm-display-null and --no-display (and using both)? I used this command to successfully run a Seaside app on a headless Linux server, with a standard Pharo VM (not the Squeak one from the repositories): ./pharo-vm/pharo \ -vm-display-null \ -vm-soun