#dev | Logs for 2019-01-15

« return
[13:03:13] -!- SoyCow4338 [SoyCow4338!~c3e48be3@zslzb7u69ud5.fixip.t-online.hu] has joined #dev
[13:05:32] -!- SoyCow4338 has quit [Client Quit]
[15:24:52] <fyngyrz> TMB, when you get a moment: what version of Perl does soylent use? 5? 6? Something else?
[15:34:08] <TheMightyBuzzard> fyngyrz, 5.21 i think. 6 is a new language not a major version update.
[15:43:34] <fyngyrz> okay. I was considering writing a class for soylent, but I guess only Perl 6 has classes
[15:44:16] <fyngyrz> kind of like what they did with Python. Python goes up to 2.7, and Python3 isn't a compatible step, it's a 'new thing"
[15:47:26] <TheMightyBuzzard> eh... http://wwwacs.gantep.edu.tr
[15:49:39] <TheMightyBuzzard> it ain't yer standard OO but it's good enough for quick n dirty.
[16:11:28] <fyngyrz> I'll take a look, thanks
[16:12:02] <fyngyrz> I should ask: is the plan to stick with perl5?
[16:16:55] <TheMightyBuzzard> yeah. perl6 is cocktastic and immature.
[16:17:21] <TheMightyBuzzard> plus it doesn't do the mod_perl thing in any way, shape, or form
[16:23:45] <fyngyrz> okay
[16:24:01] <fyngyrz> I have perl 5.18 here. Looks like it handles unicode a bit differently
[16:24:17] <fyngyrz> lemme see if I can update one of the servers to perl 5.higher
[16:26:22] <fyngyrz> uh. 5.14 on the servers, too
[16:26:35] <fyngyrz> and ubuntu freezes versions by OS level
[16:26:43] <fyngyrz> crap
[16:28:03] <fyngyrz> I have one more possibility to check, one more server, a remote one...
[16:28:25] <fyngyrz> 5.20
[16:28:28] <fyngyrz> better
[16:32:00] <fyngyrz> a little more buggery... "Feature "unicode strings" is not supported by Perl 5.20.2 at acroclass.pl line 3"
[16:32:40] <fyngyrz> do you have a recommendation as to how to approach unicode in 5.20 that will work on soylent?
[16:32:59] <fyngyrz> a link, direct explanation... I promise not to bug you once I get past this.
[16:33:09] <fyngyrz> mostly, I"m familiar with perl itself
[16:33:36] <fyngyrz> but I've never tried to do unicode in it, and the whole point of this is to work in soylent's environment
[16:49:18] <fyngyrz> hm. seems to be able to print a unicode string without problems... lemme see what it thinks of the character values on a per-character loop
[16:54:20] <fyngyrz> okay... do you have any problems with me using 'use encoding "utf-8"' ? The module is listed as deprecated
[16:59:12] <fyngyrz> if it's okay, I have utf-8 sorted. Will wait on your response... no point in moving forward if the encoding module isn't acceptable
[17:02:22] <fyngyrz> ...and in which case, hopefully you have a suggestion. :)
[17:23:34] <fyngyrz> ah. "use utf8; seems to be the thing. Yes?
[17:23:57] <fyngyrz> my google-fu is getting a workout this morning
[17:24:00] <fyngyrz> :)
[17:33:12] <TheMightyBuzzard> fyngyrz, sorry, spending most my time in bed today. what in particular are you wanting to know? how to get a new rehash instance working or how to code for SN's instance?
[17:33:38] <fyngyrz> coding for some thing you can use within rehash if you so choose
[17:34:05] <fyngyrz> it's a module that can do the <abbr> expansions. That's the plan, anyway
[17:34:06] <TheMightyBuzzard> oh, there's an environment variable that makes perl default to unicode.
[17:34:31] <TheMightyBuzzard> hafta look it up though
[17:34:32] <fyngyrz> ok. Any harm if I have "use utf8;" in the code?
[17:34:42] <fyngyrz> because here, no such default
[17:34:56] <TheMightyBuzzard> naw. it's in the codebase already in lots of places. that's so you can use unicode in the file.
[17:35:02] <fyngyrz> ok, great
[17:35:07] <TheMightyBuzzard> like directly
[17:35:07] <fyngyrz> coming along nicely
[17:37:01] <fyngyrz> although you can incorporate pythin within perl - I've done it - it's not super efficient going between, so I'm writing a perl module that does the job directly
[17:37:13] <fyngyrz> s/pythin/python/
[17:43:26] <TheMightyBuzzard> https://www.perl.com
[17:44:04] <TheMightyBuzzard> that's all you should need to do but if you run into problems have a look here: https://perldoc.perl.org
[17:44:23] <fyngyrz> I've got it working
[17:44:28] <fyngyrz> thank you
[17:44:50] <TheMightyBuzzard> kay. you won't need the funkiness when it goes into rehash, that's already taken care of.
[17:45:09] <fyngyrz> right. as long as "use utf8;" doesn't break things, we're golden
[17:45:34] <TheMightyBuzzard> doesn't. it's in most files already anyway even though it doesn't need to be.
[17:45:36] <fyngyrz> I'm handling unicode just fine now
[17:46:21] <fyngyrz> doesn't need ot be here either, as there's no actual unicode in the process, but it needs to *understand* unicode, and among other things, the "use utf8;" makes that happen so I can write a working module
[17:46:46] <fyngyrz> s'all good, I'm off and running now
[17:47:44] <TheMightyBuzzard> just watch yourself if you need to get decimal or hex character codes. that's about the only place things still go sideways.
[17:58:06] <fyngyrz> ord(#char) seems to give me the right values... no?
[17:58:17] <fyngyrz> ord($char)